public void testisEligibleWifeTimeline1() {
    final Number caseID = 1111L;
    final List<CaseParticipantRole> caseParticipantRoleList = createCaseParticipantRole();
    final List<SAHouseholdUnitMember> saHouseholdUnitMemberList =
        createSAHouseholdUnitMember(caseParticipantRoleList);

    final SAHouseholdUnitCalculator saHouseholdUnitCalculator =
        SAHouseholdUnitCalculator_Factory.getFactory().newInstance(getSession());
    saHouseholdUnitCalculator.mandatoryMembers().specifyValue(saHouseholdUnitMemberList);

    MemberCPRCalculator memberCPRCalculatorobj =
        MemberCPRCalculator_Factory.getFactory()
            .newInstance(getSession(), caseParticipantRoleList.get(0));
    memberCPRCalculatorobj.caseParticipantRoleRecord().specifyValue(caseParticipantRoleList.get(0));
    memberCPRCalculatorobj.hasEarnedIncomeTimeline().specifyValue(Timeline.FALSE_FOREVER);

    final FamilyOfMissingCPRCalculator familyOfMissingCPRCalculatorObj =
        FamilyOfMissingCPRCalculator_Factory.getFactory()
            .newInstance(getSession(), caseParticipantRoleList.get(0));

    familyOfMissingCPRCalculatorObj
        .caseParticipantRoleRecord()
        .specifyValue(caseParticipantRoleList.get(0));
    familyOfMissingCPRCalculatorObj.isFemaleTimeline().specifyValue(Timeline.FALSE_FOREVER);
    familyOfMissingCPRCalculatorObj.isMarriedTimeline().specifyValue(Timeline.TRUE_FOREVER);
    familyOfMissingCPRCalculatorObj.memberCPRCalculator().specifyValue(memberCPRCalculatorobj);

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

    final List<Interval<CodeTableItem>> test11 = new ArrayList<Interval<CodeTableItem>>();
    test11.add(
        new Interval<CodeTableItem>(null, new CodeTableItem(RESIDENCY.TABLENAME, RESIDENCY.YES)));
    final Timeline<CodeTableItem> first1Timeline = new Timeline<CodeTableItem>(test11);

    HouseholdMember hh = HouseholdMember_Factory.getFactory().newInstance(getSession());
    hh.exists().specifyValue(Timeline.TRUE_FOREVER);
    hh.caseID().specifyValue(caseID);
    hh.citizenship().specifyValue(firstTimeline);
    hh.residency().specifyValue(first1Timeline);
    hh.participant()
        .specifyValue(caseParticipantRoleList.get(0).caseParticipantRoleID().getValue());

    final SANonFinancialCPRCalculator testObj =
        SANonFinancialCPRCalculator_Factory.getFactory()
            .newInstance(getSession(), caseParticipantRoleList.get(0));
    testObj.caseParticipantRoleRecord().specifyValue(caseParticipantRoleList.get(0));
    testObj.hasPassedNonFinancialTestTimeline().specifyValue(Timeline.TRUE_FOREVER);
    testObj.householdMemberRecord().specifyValue(hh);

    CREOLETestHelper.assertEquals(
        Timeline.FALSE_FOREVER,
        familyOfMissingCPRCalculatorObj.isEligibleWifeTimeline().getValue());
  }
  /**
   * Test case for 'totalExpenseAmountTimeline' attribute. Test Data: Expense records Test Class :
   * FamilyOfMissingEligibilityUnitCalculator
   */
  public void testTotalExpenseAmountTimeline() {
    final Number caseID = 1111L;
    final List<CaseParticipantRole> caseParticipantRoleList = createCaseParticipantRole();
    final List<SAHouseholdUnitMember> saHouseholdUnitMemberList =
        createSAHouseholdUnitMember(caseParticipantRoleList);

    final SAHouseholdUnitCalculator saHouseholdUnitCalculator =
        SAHouseholdUnitCalculator_Factory.getFactory().newInstance(getSession());
    saHouseholdUnitCalculator.mandatoryMembers().specifyValue(saHouseholdUnitMemberList);
    final FamilyOfMissingEligibilityUnitCalculator familyOfMissingObj =
        FamilyOfMissingEligibilityUnitCalculator_Factory.getFactory()
            .newInstance(getSession(), caseID, saHouseholdUnitCalculator);

    final List<Interval<Number>> amount = new ArrayList<Interval<Number>>();
    amount.add(new Interval<Number>(null, 0));
    amount.add(new Interval<Number>(Date.fromISO8601("20040601"), 0));
    final Timeline<Number> amountTimeline = new Timeline<Number>(amount);

    final List<Interval<Number>> amount2 = new ArrayList<Interval<Number>>();
    amount2.add(new Interval<Number>(null, 0));
    amount2.add(new Interval<Number>(Date.fromISO8601("20040601"), 1000));
    final Timeline<Number> amount2Timeline = new Timeline<Number>(amount2);

    // When income type is not COMMERCIAL

    Expense expenseObj = Expense_Factory.getFactory().newInstance(getSession());
    expenseObj.rentAmount().specifyValue(amount2Timeline);
    expenseObj.rentType().specifyValue(new CodeTableItem(EXPENSE.TABLENAME, EXPENSE.COMMERCIAL));
    expenseObj
        .frequency()
        .specifyValue(new CodeTableItem(FREQUENCYCODE.TABLENAME, FREQUENCYCODE.MONTHLY));
    expenseObj
        .participant()
        .specifyValue(caseParticipantRoleList.get(0).caseParticipantRoleID().getValue());
    expenseObj.caseID().specifyValue(caseID);

    final List<Expense> expenseList = new ArrayList<Expense>();
    expenseList.add(expenseObj);

    MemberCPRCalculator memberCPRCalculatorobj =
        MemberCPRCalculator_Factory.getFactory()
            .newInstance(getSession(), caseParticipantRoleList.get(0));
    memberCPRCalculatorobj.caseParticipantRoleRecord().specifyValue(caseParticipantRoleList.get(0));
    memberCPRCalculatorobj.expenseRecords().specifyValue(expenseList);

    familyOfMissingObj.caseID().specifyValue(caseParticipantRoleList.get(0).caseID().getValue());

    CREOLETestHelper.assertEquals(
        amountTimeline, familyOfMissingObj.totalExpenseAmountTimeline().getValue());
  }