/**
   * Validates that validateEndowmentTransactionTypeCode returns false when the etran code type is
   * not income or expense.
   */
  public void testEtranCodeIncomeOrExpense_False() {

    EndowmentTransactionLine endowmentTargetTransactionLine =
        EndowmentTransactionLineFixture.ENDOWMENT_TRANSACTIONAL_LINE_POSITIVE_AMT
            .createEndowmentTransactionLine(false);
    EndowmentTransactionCode endowmentTransactionCode =
        EndowmentTransactionCodeFixture.ASSET_TRANSACTION_CODE.createEndowmentTransactionCode();
    endowmentTargetTransactionLine.setEtranCode(endowmentTransactionCode.getCode());
    endowmentTargetTransactionLine.setEtranCodeObj(endowmentTransactionCode);

    assertFalse(
        rule.validateEndowmentTransactionTypeCode(
            document,
            endowmentTargetTransactionLine,
            rule.getErrorPrefix(endowmentTargetTransactionLine, -1)));
  }
  /**
   * Validates that validateChartMatch returns false when etran code gl chart does not match the
   * chart for KEMID general ledger account.
   */
  public void testKemidEtranCodeMatch_False() {
    EndowmentTransactionLine endowmentTargetTransactionLine =
        EndowmentTransactionLineFixture.ENDOWMENT_TRANSACTIONAL_LINE_INCOME
            .createEndowmentTransactionLine(false);
    EndowmentTransactionCode endowmentTransactionCode =
        EndowmentTransactionCodeFixture.INCOME_TRANSACTION_CODE.createEndowmentTransactionCode();
    KEMID kemid = KemIdFixture.OPEN_KEMID_RECORD.createKemidRecord();
    GLLink glLink = GLLinkFixture.GL_LINK_UA_CHART.createGLLink();
    KemidGeneralLedgerAccount generalLedgerAccount =
        KemidGeneralLedgerAccountFixture.KEMID_GL_ACCOUNT.createKemidGeneralLedgerAccount();

    kemid.getKemidGeneralLedgerAccounts().add(generalLedgerAccount);
    endowmentTransactionCode.getGlLinks().add(glLink);
    endowmentTargetTransactionLine.setKemid(kemid.getKemid());
    endowmentTargetTransactionLine.setKemidObj(kemid);
    endowmentTargetTransactionLine.setEtranCode(endowmentTransactionCode.getCode());
    endowmentTargetTransactionLine.setEtranCodeObj(endowmentTransactionCode);

    assertFalse(
        rule.validateChartMatch(
            endowmentTargetTransactionLine,
            rule.getErrorPrefix(endowmentTargetTransactionLine, -1)));
  }