### Question:
DiscountingBulletPaymentTradePricer { public PointSensitivities presentValueSensitivity(ResolvedBulletPaymentTrade trade, BaseProvider provider) { return paymentPricer.presentValueSensitivity(trade.getProduct().getPayment(), provider).build(); } DiscountingBulletPaymentTradePricer(
      DiscountingPaymentPricer paymentPricer); DiscountingPaymentPricer getPaymentPricer(); CurrencyAmount presentValue(ResolvedBulletPaymentTrade trade, BaseProvider provider); ExplainMap explainPresentValue(ResolvedBulletPaymentTrade trade, BaseProvider provider); PointSensitivities presentValueSensitivity(ResolvedBulletPaymentTrade trade, BaseProvider provider); CashFlows cashFlows(ResolvedBulletPaymentTrade trade, BaseProvider provider); CurrencyAmount currencyExposure(ResolvedBulletPaymentTrade trade, BaseProvider provider); CurrencyAmount currentCash(ResolvedBulletPaymentTrade trade, BaseProvider provider); static final DiscountingBulletPaymentTradePricer DEFAULT; }### Answer:
@Test public void test_presentValueSensitivity_provider() { PointSensitivities point = PRICER.presentValueSensitivity(TRADE, PROVIDER); double relativeYearFraction = ACT_365F.relativeYearFraction(VAL_DATE_2014_01_22, PAYMENT_DATE); double expected = -DF * relativeYearFraction * NOTIONAL_USD; ZeroRateSensitivity actual = (ZeroRateSensitivity) point.getSensitivities().get(0); assertThat(actual.getCurrency()).isEqualTo(USD); assertThat(actual.getCurveCurrency()).isEqualTo(USD); assertThat(actual.getYearFraction()).isEqualTo(relativeYearFraction); assertThat(actual.getSensitivity()).isCloseTo(expected, offset(NOTIONAL_USD * TOL)); }
@Test public void test_presentValueSensitivity_provider_ended() { PointSensitivities computed = PRICER.presentValueSensitivity(TRADE_PAST, PROVIDER); assertThat(computed).isEqualTo(PointSensitivities.empty()); }