public void testisFemaleTimeline1() {
    final long caseParticipantRoleID = 11L;
    final long participantRoleID = 111L;
    final long caseID = 111L;
    final String Name = "Pavan";
    createPersonRecord(
        participantRoleID,
        Name,
        Date.fromISO8601("20110615"),
        Date.kZeroDate,
        GENDER.MALE,
        MARITALSTATUS.SINGLE);

    final CaseParticipantRole caseParticipantRole =
        createCaseParticipantRoleRecord(
            caseID, caseParticipantRoleID, participantRoleID, CASEPARTICIPANTROLETYPE.PRIMARY);

    final FamilyOfMissingCPRCalculator familyOfMissingCPRCalculatorObj =
        FamilyOfMissingCPRCalculator_Factory.getFactory()
            .newInstance(getSession(), caseParticipantRole);

    // When gender is specified as Male

    final List<Interval<CodeTableItem>> test1 = new ArrayList<Interval<CodeTableItem>>();
    test1.add(new Interval<CodeTableItem>(null, new CodeTableItem(GENDER.TABLENAME, GENDER.MALE)));
    final Timeline<CodeTableItem> firstTimeline = new Timeline<CodeTableItem>(test1);

    PDCGender pdcGender = PDCGender_Factory.getFactory().newInstance(getSession());
    pdcGender.caseID().specifyValue(caseID);
    pdcGender.gender().specifyValue(firstTimeline);
    pdcGender.person().specifyValue(caseParticipantRole.caseParticipantRoleID().getValue());

    CREOLETestHelper.assertEquals(
        Timeline.FALSE_FOREVER, familyOfMissingCPRCalculatorObj.isFemaleTimeline().getValue());
  }
  /** Creates an object of a SAHouseholdUnitMember. */
  public SAHouseholdUnitMember createASAHouseholdUnitMember(
      final CaseParticipantRole caseParticipantRole) {
    final Number participantRoleID1 = caseParticipantRole.participantRoleID().getValue();

    final curam.util.type.Date relationshipStartDate = curam.util.type.Date.fromISO8601("20000101");
    final SAHouseholdUnitMember saHouseholdUnitMember1 =
        SAHouseholdUnitMember_Factory.getFactory()
            .newInstance(
                getSession(), caseParticipantRole.caseID().getValue(), caseParticipantRole);

    return saHouseholdUnitMember1;
  }
  /**
   * Creates the CaseParticipantRole record.
   *
   * @param caseID CaseId of case to which the case participant belongs
   * @param caseParticipantRoleID Case participant Role ID
   * @param participantRoleID Participant Role ID
   * @param caseParticipantRoleType Case Participant Role Type
   * @return CaseParticipantRole
   */
  public CaseParticipantRole createCaseParticipantRoleRecord(
      final Number caseID,
      final Number caseParticipantRoleID,
      final Number participantRoleID,
      final String caseParticipantRoleType) {

    final CaseParticipantRole caseParticipantRoleRecord =
        CaseParticipantRole_Factory.getFactory().newInstance(this.getSession());

    caseParticipantRoleRecord.caseID().specifyValue(caseID);
    caseParticipantRoleRecord.caseParticipantRoleID().specifyValue(caseParticipantRoleID);
    caseParticipantRoleRecord.participantRoleID().specifyValue(participantRoleID);
    caseParticipantRoleRecord
        .typeCode()
        .specifyValue(
            new CodeTableItem(CASEPARTICIPANTROLETYPE.TABLENAME, caseParticipantRoleType));

    return caseParticipantRoleRecord;
  }
  public void testisMarriedTimeline1() {
    final long caseParticipantRoleID = 11L;
    final long participantRoleID = 111L;
    final long caseID = 111L;
    final String Name = "Pavan";
    createPersonRecord(
        participantRoleID,
        Name,
        Date.fromISO8601("20110615"),
        Date.kZeroDate,
        GENDER.FEMALE,
        MARITALSTATUS.SINGLE);

    final CaseParticipantRole caseParticipantRole =
        createCaseParticipantRoleRecord(
            caseID, caseParticipantRoleID, participantRoleID, CASEPARTICIPANTROLETYPE.PRIMARY);

    final FamilyOfMissingCPRCalculator familyOfMissingCPRCalculatorObj =
        FamilyOfMissingCPRCalculator_Factory.getFactory()
            .newInstance(getSession(), caseParticipantRole);

    // Specifying marital status as Single

    final List<Interval<CodeTableItem>> test1 = new ArrayList<Interval<CodeTableItem>>();
    test1.add(
        new Interval<CodeTableItem>(
            null, new CodeTableItem(MARITALSTATUS.TABLENAME, MARITALSTATUS.SINGLE)));
    final Timeline<CodeTableItem> maritalStatusTimeline = new Timeline<CodeTableItem>(test1);

    MaritalStatus maritalStatus = MaritalStatus_Factory.getFactory().newInstance(getSession());
    maritalStatus.caseID().specifyValue(caseID);
    maritalStatus.maritalStatus().specifyValue(maritalStatusTimeline);
    maritalStatus
        .participant()
        .specifyValue(caseParticipantRole.caseParticipantRoleID().getValue());

    CREOLETestHelper.assertEquals(
        Timeline.FALSE_FOREVER, familyOfMissingCPRCalculatorObj.isMarriedTimeline().getValue());
  }