### Question:
SabrExtrapolationReplicationCmsTradePricer { public PointSensitivities presentValueSensitivityRates( ResolvedCmsTrade trade, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities) { PointSensitivityBuilder pvSensiCms = productPricer.presentValueSensitivityRates(trade.getProduct(), ratesProvider, swaptionVolatilities); if (!trade.getPremium().isPresent()) { return pvSensiCms.build(); } PointSensitivityBuilder pvSensiPremium = paymentPricer.presentValueSensitivity(trade.getPremium().get(), ratesProvider); return pvSensiCms.combinedWith(pvSensiPremium).build(); } SabrExtrapolationReplicationCmsTradePricer(
      SabrExtrapolationReplicationCmsProductPricer cmsProductPricer);  SabrExtrapolationReplicationCmsTradePricer(
      SabrExtrapolationReplicationCmsProductPricer cmsProductPricer,
      DiscountingPaymentPricer paymentPricer); MultiCurrencyAmount presentValue(
      ResolvedCmsTrade trade,
      RatesProvider ratesProvider,
      SabrSwaptionVolatilities swaptionVolatilities); ExplainMap explainPresentValue(
      ResolvedCms cms,
      RatesProvider ratesProvider,
      SabrSwaptionVolatilities swaptionVolatilities); PointSensitivities presentValueSensitivityRates(
      ResolvedCmsTrade trade,
      RatesProvider ratesProvider,
      SabrSwaptionVolatilities swaptionVolatilities); PointSensitivities presentValueSensitivityModelParamsSabr(
      ResolvedCmsTrade trade,
      RatesProvider ratesProvider,
      SabrSwaptionVolatilities swaptionVolatilities); double presentValueSensitivityStrike(
      ResolvedCmsTrade trade,
      RatesProvider ratesProvider,
      SabrSwaptionVolatilities swaptionVolatilities); MultiCurrencyAmount currencyExposure(
      ResolvedCmsTrade trade,
      RatesProvider ratesProvider,
      SabrSwaptionVolatilities swaptionVolatilities); MultiCurrencyAmount currentCash(
      ResolvedCmsTrade trade,
      RatesProvider ratesProvider,
      SabrSwaptionVolatilities swaptionVolatilities);  }### Answer:
@Test public void test_presentValueSensitivity() { PointSensitivities pt1 = TRADE_PRICER.presentValueSensitivityRates(CMS_TRADE_PREMIUM, RATES_PROVIDER, VOLATILITIES); PointSensitivities pt2 = TRADE_PRICER.presentValueSensitivityRates(CMS_TRADE, RATES_PROVIDER, VOLATILITIES); PointSensitivityBuilder ptProd1 = PRODUCT_PRICER.presentValueSensitivityRates(CMS_ONE_LEG, RATES_PROVIDER, VOLATILITIES); PointSensitivityBuilder ptProd2 = PRODUCT_PRICER.presentValueSensitivityRates(CMS_TWO_LEGS, RATES_PROVIDER, VOLATILITIES); PointSensitivityBuilder ptPrem = PREMIUM_PRICER.presentValueSensitivity(PREMIUM, RATES_PROVIDER); assertThat(pt1).isEqualTo(ptProd1.combinedWith(ptPrem).build()); assertThat(pt2).isEqualTo(ptProd2.build()); }