### Question:
DiscountingBillTradePricer { public CurrencyAmount currentCash(ResolvedBillTrade trade, LocalDate valuationDate) { if (trade.getProduct().getNotional().getDate().equals(valuationDate)) { return trade.getProduct().getNotional().getValue().multipliedBy(trade.getQuantity()); } if (trade.getSettlement().isPresent() && trade.getSettlement().get().getDate().equals(valuationDate)) { return trade.getSettlement().get().getValue(); } return CurrencyAmount.zero(trade.getProduct().getCurrency()); } DiscountingBillTradePricer(
      DiscountingBillProductPricer productPricer,
      DiscountingPaymentPricer paymentPricer); CurrencyAmount presentValue(ResolvedBillTrade trade, LegalEntityDiscountingProvider provider); CurrencyAmount presentValueWithZSpread(
      ResolvedBillTrade trade,
      LegalEntityDiscountingProvider provider,
      double zSpread,
      CompoundedRateType compoundedRateType,
      int periodsPerYear); PointSensitivities presentValueSensitivity(ResolvedBillTrade trade, LegalEntityDiscountingProvider provider); PointSensitivities presentValueSensitivityWithZSpread(
      ResolvedBillTrade trade,
      LegalEntityDiscountingProvider provider,
      double zSpread,
      CompoundedRateType compoundedRateType,
      int periodsPerYear); MultiCurrencyAmount currencyExposure(ResolvedBillTrade trade, LegalEntityDiscountingProvider provider); MultiCurrencyAmount currencyExposureWithZSpread(
      ResolvedBillTrade trade,
      LegalEntityDiscountingProvider provider,
      double zSpread,
      CompoundedRateType compoundedRateType,
      int periodsPerYear); CurrencyAmount currentCash(ResolvedBillTrade trade, LocalDate valuationDate); static final DiscountingBillTradePricer DEFAULT; }### Answer:
@Test public void test_currentcash_on_maturity() { CurrencyAmount cashComputed = PRICER_TRADE.currentCash(BILL_TRADE_SETTLE_AFTER_VAL, MATURITY_DATE); assertThat(cashComputed.getCurrency()).isEqualTo(EUR); assertThat(cashComputed.getAmount()).isCloseTo(NOTIONAL_AMOUNT * QUANTITY, offset(TOLERANCE_PV)); }