### Question:
DiscountingFxResetNotionalExchangePricer implements SwapPaymentEventPricer<FxResetNotionalExchange> { @Override public double presentValue(FxResetNotionalExchange event, RatesProvider provider) { double df = provider.discountFactor(event.getCurrency(), event.getPaymentDate()); return forecastValue(event, provider) * df; } DiscountingFxResetNotionalExchangePricer(); @Override double presentValue(FxResetNotionalExchange event, RatesProvider provider); @Override PointSensitivityBuilder presentValueSensitivity(FxResetNotionalExchange event, RatesProvider provider); @Override double forecastValue(FxResetNotionalExchange event, RatesProvider provider); @Override PointSensitivityBuilder forecastValueSensitivity(FxResetNotionalExchange event, RatesProvider provider); @Override void explainPresentValue(FxResetNotionalExchange event, RatesProvider provider, ExplainMapBuilder builder); @Override MultiCurrencyAmount currencyExposure(FxResetNotionalExchange event, RatesProvider provider); @Override double currentCash(FxResetNotionalExchange event, RatesProvider provider); static final DiscountingFxResetNotionalExchangePricer DEFAULT; }### Answer:
@Test public void test_presentValue() { SimpleRatesProvider prov = createProvider(FX_RESET_NOTIONAL_EXCHANGE_REC_USD); DiscountingFxResetNotionalExchangePricer test = new DiscountingFxResetNotionalExchangePricer(); double calculated = test.presentValue(FX_RESET_NOTIONAL_EXCHANGE_REC_USD, prov); assertThat(calculated).isCloseTo(FX_RESET_NOTIONAL_EXCHANGE_REC_USD.getNotional() * FX_RATE * DISCOUNT_FACTOR, offset(0d)); }