### Question:
DiscountingSwapLegPricer { public PointSensitivityBuilder pvbpSensitivity(ResolvedSwapLeg fixedLeg, RatesProvider provider) { PointSensitivityBuilder builder = PointSensitivityBuilder.none(); for (SwapPaymentPeriod period : fixedLeg.getPaymentPeriods()) { builder = builder.combinedWith(paymentPeriodPricer.pvbpSensitivity(period, provider)); } return builder; } DiscountingSwapLegPricer(
      SwapPaymentPeriodPricer<SwapPaymentPeriod> paymentPeriodPricer,
      SwapPaymentEventPricer<SwapPaymentEvent> paymentEventPricer); SwapPaymentPeriodPricer<SwapPaymentPeriod> getPeriodPricer(); SwapPaymentEventPricer<SwapPaymentEvent> getEventPricer(); CurrencyAmount presentValue(ResolvedSwapLeg leg, Currency currency, RatesProvider provider); CurrencyAmount presentValue(ResolvedSwapLeg leg, RatesProvider provider); CurrencyAmount forecastValue(ResolvedSwapLeg leg, RatesProvider provider); CurrencyAmount accruedInterest(ResolvedSwapLeg leg, RatesProvider provider); double pvbp(ResolvedSwapLeg leg, RatesProvider provider); double couponEquivalent(ResolvedSwapLeg leg, RatesProvider provider, double pvbp); PointSensitivityBuilder presentValueSensitivity(ResolvedSwapLeg leg, RatesProvider provider); PointSensitivityBuilder forecastValueSensitivity(ResolvedSwapLeg leg, RatesProvider provider); PointSensitivityBuilder pvbpSensitivity(ResolvedSwapLeg fixedLeg, RatesProvider provider); double annuityCash(ResolvedSwapLeg fixedLeg, double yield); double annuityCash(int nbPaymentsPerYear, int nbPeriods, double yield); ValueDerivatives annuityCash1(int nbPaymentsPerYear, int nbPeriods, double yield); ValueDerivatives annuityCash2(int nbPaymentsPerYear, int nbPeriods, double yield); ValueDerivatives annuityCash3(int nbPaymentsPerYear, int nbPeriods, double yield); ValueDerivatives annuityCashDerivative(ResolvedSwapLeg fixedLeg, double yield); CashFlows cashFlows(ResolvedSwapLeg leg, RatesProvider provider); ExplainMap explainPresentValue(ResolvedSwapLeg leg, RatesProvider provider); MultiCurrencyAmount currencyExposure(ResolvedSwapLeg leg, RatesProvider provider); CurrencyAmount currentCash(ResolvedSwapLeg leg, RatesProvider provider); static final DiscountingSwapLegPricer DEFAULT; }### Answer:
@Test public void test_pvbpSensitivity_FxReset() { DiscountingSwapLegPricer test = DiscountingSwapLegPricer.DEFAULT; assertThatIllegalArgumentException() .isThrownBy(() -> test.pvbpSensitivity(FIXED_FX_RESET_SWAP_LEG_PAY_GBP, MOCK_PROV)); }
@Test public void test_pvbpSensitivity_Compounding() { DiscountingSwapLegPricer test = DiscountingSwapLegPricer.DEFAULT; assertThatIllegalArgumentException() .isThrownBy(() -> test.pvbpSensitivity(FIXED_CMP_NONE_SWAP_LEG_PAY_GBP, MOCK_PROV)); }