### Question:
DiscountingFxNdfProductPricer { public FxRate forwardFxRate(ResolvedFxNdf ndf, RatesProvider provider) { Currency ccySettle = ndf.getSettlementCurrency(); Currency ccyOther = ndf.getNonDeliverableCurrency(); double forwardRate = provider.fxIndexRates(ndf.getIndex()).rate(ndf.getObservation(), ccySettle); return FxRate.of(ccySettle, ccyOther, forwardRate); } DiscountingFxNdfProductPricer(); CurrencyAmount presentValue(ResolvedFxNdf ndf, RatesProvider provider); PointSensitivities presentValueSensitivity(ResolvedFxNdf ndf, RatesProvider provider); MultiCurrencyAmount currencyExposure(ResolvedFxNdf ndf, RatesProvider provider); CurrencyAmount currentCash(ResolvedFxNdf ndf, RatesProvider provider); FxRate forwardFxRate(ResolvedFxNdf ndf, RatesProvider provider); static final DiscountingFxNdfProductPricer DEFAULT; }### Answer:
@Test public void test_forwardRateVsForex() { FxRate fwdNDF = PRICER.forwardFxRate(NDF, PROVIDER); FxRate fwdFX = PRICER_FX.forwardFxRate(FOREX, PROVIDER); assertThat(fwdNDF.fxRate(fwdNDF.getPair())).isCloseTo(fwdFX.fxRate(fwdFX.getPair()), offset(1e-10)); }