### Question:
HullWhiteSwaptionPhysicalTradePricer { public CurrencyAmount presentValue( ResolvedSwaptionTrade trade, RatesProvider ratesProvider, HullWhiteOneFactorPiecewiseConstantParametersProvider hwProvider) { ResolvedSwaption product = trade.getProduct(); CurrencyAmount pvProduct = PRICER_PRODUCT.presentValue(product, ratesProvider, hwProvider); Payment premium = trade.getPremium(); CurrencyAmount pvPremium = PRICER_PREMIUM.presentValue(premium, ratesProvider); return pvProduct.plus(pvPremium); }  CurrencyAmount presentValue(
      ResolvedSwaptionTrade trade,
      RatesProvider ratesProvider,
      HullWhiteOneFactorPiecewiseConstantParametersProvider hwProvider); MultiCurrencyAmount currencyExposure(
      ResolvedSwaptionTrade trade,
      RatesProvider ratesProvider,
      HullWhiteOneFactorPiecewiseConstantParametersProvider hwProvider); CurrencyAmount currentCash(ResolvedSwaptionTrade trade, LocalDate valuationDate); PointSensitivities presentValueSensitivityRates(
      ResolvedSwaptionTrade trade,
      RatesProvider ratesProvider,
      HullWhiteOneFactorPiecewiseConstantParametersProvider hwProvider); DoubleArray presentValueSensitivityModelParamsHullWhite(
      ResolvedSwaptionTrade trade,
      RatesProvider ratesProvider,
      HullWhiteOneFactorPiecewiseConstantParametersProvider hwProvider); static final HullWhiteSwaptionPhysicalTradePricer DEFAULT; }### Answer:
@Test public void present_value_premium_forward() { CurrencyAmount pvTrade = PRICER_TRADE.presentValue(SWAPTION_PREFWD_LONG_REC, MULTI_USD, HW_PROVIDER); CurrencyAmount pvProduct = PRICER_PRODUCT.presentValue(SWAPTION_LONG_REC, MULTI_USD, HW_PROVIDER); CurrencyAmount pvPremium = PRICER_PAYMENT.presentValue(PREMIUM_FWD_PAY, MULTI_USD); assertThat(pvTrade.getAmount()).isCloseTo(pvProduct.getAmount() + pvPremium.getAmount(), offset(TOL * NOTIONAL)); }
@Test public void present_value_premium_valuedate() { CurrencyAmount pvTrade = PRICER_TRADE.presentValue(SWAPTION_PRETOD_LONG_REC, MULTI_USD, HW_PROVIDER); CurrencyAmount pvProduct = PRICER_PRODUCT.presentValue(SWAPTION_LONG_REC, MULTI_USD, HW_PROVIDER); CurrencyAmount pvPremium = PRICER_PAYMENT.presentValue(PREMIUM_TRA_PAY, MULTI_USD); assertThat(pvTrade.getAmount()).isCloseTo(pvProduct.getAmount() + pvPremium.getAmount(), offset(TOL * NOTIONAL)); }
@Test public void present_value_premium_past() { CurrencyAmount pvTrade = PRICER_TRADE.presentValue(SWAPTION_PREPAST_LONG_REC, MULTI_USD, HW_PROVIDER); CurrencyAmount pvProduct = PRICER_PRODUCT.presentValue(SWAPTION_LONG_REC, MULTI_USD, HW_PROVIDER); assertThat(pvTrade.getAmount()).isCloseTo(pvProduct.getAmount(), offset(TOL * NOTIONAL)); }