### Question:
HullWhiteSwaptionPhysicalTradePricer { public CurrencyAmount currentCash(ResolvedSwaptionTrade trade, LocalDate valuationDate) { Payment premium = trade.getPremium(); if (premium.getDate().equals(valuationDate)) { return CurrencyAmount.of(premium.getCurrency(), premium.getAmount()); } return CurrencyAmount.of(premium.getCurrency(), 0.0); }  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 current_cash_forward() { CurrencyAmount ccTrade = PRICER_TRADE.currentCash(SWAPTION_PREFWD_LONG_REC, VAL_DATE); assertThat(ccTrade.getAmount()).isCloseTo(0, offset(TOL * NOTIONAL)); }
@Test public void current_cash_vd() { CurrencyAmount ccTrade = PRICER_TRADE.currentCash(SWAPTION_PRETOD_LONG_REC, VAL_DATE); assertThat(ccTrade.getAmount()).isCloseTo(-PREMIUM_AMOUNT, offset(TOL * NOTIONAL)); }
@Test public void current_cash_past() { CurrencyAmount ccTrade = PRICER_TRADE.currentCash(SWAPTION_PREPAST_LONG_REC, VAL_DATE); assertThat(ccTrade.getAmount()).isCloseTo(0, offset(TOL * NOTIONAL)); }