### Question:
DiscountingFraProductPricer { public CurrencyAmount presentValue(ResolvedFra fra, RatesProvider provider) { double df = provider.discountFactor(fra.getCurrency(), fra.getPaymentDate()); double pv = forecastValue0(fra, provider) * df; return CurrencyAmount.of(fra.getCurrency(), pv); } 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_presentValue_inPast() { ResolvedFra fra = FRA_PAID.resolve(REF_DATA); SimpleRatesProvider prov = createProvider(fra); DiscountingFraProductPricer test = DiscountingFraProductPricer.DEFAULT; CurrencyAmount computed = test.presentValue(fra, prov); assertThat(computed.getAmount()).isCloseTo(0d, offset(TOLERANCE)); }