### Question:
DiscountingBillProductPricer { public PointSensitivities presentValueSensitivity(ResolvedBill bill, LegalEntityDiscountingProvider provider) { if (provider.getValuationDate().isAfter(bill.getNotional().getDate())) { return PointSensitivities.empty(); } IssuerCurveDiscountFactors issuerDf = issuerCurveDf(bill, provider); double dfEndBar = bill.getNotional().getAmount(); PointSensitivityBuilder sensMaturity = issuerDf.zeroRatePointSensitivity(bill.getNotional().getDate()) .multipliedBy(dfEndBar); return sensMaturity.build(); }  CurrencyAmount presentValue(ResolvedBill bill, LegalEntityDiscountingProvider provider); CurrencyAmount presentValueWithZSpread(
      ResolvedBill bill,
      LegalEntityDiscountingProvider provider,
      double zSpread,
      CompoundedRateType compoundedRateType,
      int periodsPerYear); PointSensitivities presentValueSensitivity(ResolvedBill bill, LegalEntityDiscountingProvider provider); PointSensitivities presentValueSensitivityWithZSpread(
      ResolvedBill bill,
      LegalEntityDiscountingProvider provider,
      double zSpread,
      CompoundedRateType compoundedRateType,
      int periodsPerYear); double priceFromCurves(ResolvedBill bill, LegalEntityDiscountingProvider provider, LocalDate settlementDate); double priceFromCurvesWithZSpread(
      ResolvedBill bill,
      LegalEntityDiscountingProvider provider,
      LocalDate settlementDate,
      double zSpread,
      CompoundedRateType compoundedRateType,
      int periodsPerYear); double yieldFromCurves(ResolvedBill bill, LegalEntityDiscountingProvider provider, LocalDate settlementDate); double yieldFromCurvesWithZSpread(
      ResolvedBill bill,
      LegalEntityDiscountingProvider provider,
      LocalDate settlementDate,
      double zSpread,
      CompoundedRateType compoundedRateType,
      int periodsPerYear); static final DiscountingBillProductPricer DEFAULT; }### Answer:
@Test public void presentValueSensitivity() { PointSensitivities sensiComputed = PRICER.presentValueSensitivity(BILL, PROVIDER); PointSensitivities sensiExpected = IssuerCurveDiscountFactors.of(DSC_FACTORS_ISSUER, GROUP_ISSUER) .zeroRatePointSensitivity(MATURITY_DATE) .multipliedBy(NOTIONAL.getAmount()).build(); assertThat(sensiComputed.equalWithTolerance(sensiExpected, TOLERANCE_PV)).isTrue(); CurrencyParameterSensitivities paramSensiComputed = PROVIDER.parameterSensitivity(sensiComputed); CurrencyParameterSensitivities paramSensiExpected = FD_CALC.sensitivity(PROVIDER, p -> PRICER.presentValue(BILL, p)); assertThat(paramSensiComputed.equalWithTolerance(paramSensiExpected, EPS * NOTIONAL_AMOUNT)).isTrue(); }
@Test public void presentValueSensitivity_aftermaturity() { PointSensitivities sensiComputed = PRICER.presentValueSensitivity(BILL_PAST, PROVIDER); PointSensitivities sensiExpected = PointSensitivities.empty(); assertThat(sensiComputed.equalWithTolerance(sensiExpected, TOLERANCE_PV)).isTrue(); }