### Question:
DiscountingFxSingleProductPricer { public MultiCurrencyAmount currentCash(ResolvedFxSingle fx, LocalDate valuationDate) { if (valuationDate.isEqual(fx.getPaymentDate())) { return MultiCurrencyAmount.of(fx.getBaseCurrencyPayment().getValue(), fx.getCounterCurrencyPayment().getValue()); } return MultiCurrencyAmount.empty(); } DiscountingFxSingleProductPricer(
      DiscountingPaymentPricer paymentPricer); MultiCurrencyAmount presentValue(ResolvedFxSingle fx, RatesProvider provider); PointSensitivities presentValueSensitivity(ResolvedFxSingle fx, RatesProvider provider); double parSpread(ResolvedFxSingle fx, RatesProvider provider); MultiCurrencyAmount currencyExposure(ResolvedFxSingle product, RatesProvider provider); MultiCurrencyAmount currentCash(ResolvedFxSingle fx, LocalDate valuationDate); FxRate forwardFxRate(ResolvedFxSingle fx, RatesProvider provider); PointSensitivityBuilder forwardFxRatePointSensitivity(ResolvedFxSingle fx, RatesProvider provider); double forwardFxRateSpotSensitivity(ResolvedFxSingle fx, RatesProvider provider); static final DiscountingFxSingleProductPricer DEFAULT; }### Answer:
@Test public void test_currentCash_zero() { MultiCurrencyAmount computed = PRICER.currentCash(FWD, PROVIDER.getValuationDate()); assertThat(computed).isEqualTo(MultiCurrencyAmount.empty()); }
@Test public void test_currentCash_onPayment() { MultiCurrencyAmount computed = PRICER.currentCash(FWD, PAYMENT_DATE); assertThat(computed).isEqualTo(MultiCurrencyAmount.of( FWD.getBaseCurrencyPayment().getValue(), FWD.getCounterCurrencyPayment().getValue())); }