### Question:
DiscountingFraProductPricer { public CashFlows cashFlows(ResolvedFra fra, RatesProvider provider) { LocalDate paymentDate = fra.getPaymentDate(); double forecastValue = forecastValue0(fra, provider); double df = provider.discountFactor(fra.getCurrency(), paymentDate); CashFlow cashFlow = CashFlow.ofForecastValue(paymentDate, fra.getCurrency(), forecastValue, df); return CashFlows.of(cashFlow); } DiscountingFraProductPricer(
      RateComputationFn<RateComputation> rateComputationFn); CurrencyAmount presentValue(ResolvedFra fra, RatesProvider provider); PointSensitivities presentValueSensitivity(ResolvedFra fra, RatesProvider provider); CurrencyAmount forecastValue(ResolvedFra fra, RatesProvider provider); PointSensitivities forecastValueSensitivity(ResolvedFra fra, RatesProvider provider); double parRate(ResolvedFra fra, RatesProvider provider); PointSensitivities parRateSensitivity(ResolvedFra fra, RatesProvider provider); double parSpread(ResolvedFra fra, RatesProvider provider); PointSensitivities parSpreadSensitivity(ResolvedFra fra, RatesProvider provider); CashFlows cashFlows(ResolvedFra fra, RatesProvider provider); ExplainMap explainPresentValue(ResolvedFra fra, RatesProvider provider); static final DiscountingFraProductPricer DEFAULT; }### Answer:
@Test public void test_cashFlows_ISDA() { ResolvedFra fraExp = RFRA; SimpleRatesProvider prov = createProvider(fraExp); double fixedRate = FRA.getFixedRate(); double yearFraction = fraExp.getYearFraction(); double notional = fraExp.getNotional(); double expected = notional * yearFraction * (FORWARD_RATE - fixedRate) / (1.0 + yearFraction * FORWARD_RATE); DiscountingFraProductPricer test = DiscountingFraProductPricer.DEFAULT; CashFlows computed = test.cashFlows(fraExp, prov); assertThat(computed.getCashFlows()).hasSize(1); assertThat(computed.getCashFlows().get(0).getPaymentDate()).isEqualTo(fraExp.getPaymentDate()); assertThat(computed.getCashFlows().get(0).getForecastValue().getCurrency()).isEqualTo(fraExp.getCurrency()); assertThat(computed.getCashFlows().get(0).getForecastValue().getAmount()).isCloseTo(expected, offset(TOLERANCE)); DiscountingFraTradePricer testTrade = new DiscountingFraTradePricer(test); assertThat(testTrade.cashFlows(RFRA_TRADE, prov)).isEqualTo(test.cashFlows(fraExp, prov)); }