### Question:
DiscountingFxSingleProductPricer { public FxRate forwardFxRate(ResolvedFxSingle fx, RatesProvider provider) { FxForwardRates fxForwardRates = provider.fxForwardRates(fx.getCurrencyPair()); Payment basePayment = fx.getBaseCurrencyPayment(); Payment counterPayment = fx.getCounterCurrencyPayment(); double forwardRate = fxForwardRates.rate(basePayment.getCurrency(), fx.getPaymentDate()); return FxRate.of(basePayment.getCurrency(), counterPayment.getCurrency(), forwardRate); } 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_forwardFxRate() { FxRate computed = PRICER.forwardFxRate(FWD, PROVIDER); double df1 = PROVIDER.discountFactor(USD, PAYMENT_DATE); double df2 = PROVIDER.discountFactor(KRW, PAYMENT_DATE); double spot = PROVIDER.fxRate(USD, KRW); FxRate expected = FxRate.of(USD, KRW, spot * df1 / df2); assertThat(computed).isEqualTo(expected); }