### Question:
SabrExtrapolationReplicationCmsProductPricer { public ExplainMap explainPresentValue( ResolvedCms cms, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities) { ExplainMapBuilder builder = ExplainMap.builder(); builder.put(ExplainKey.ENTRY_TYPE, "CmsSwap"); List<ExplainMap> legsExplain = new ArrayList<>(); legsExplain.add(cmsLegPricer.explainPresentValue(cms.getCmsLeg(), ratesProvider, swaptionVolatilities)); if (cms.getPayLeg().isPresent()) { legsExplain.add(payLegPricer.explainPresentValue(cms.getPayLeg().get(), ratesProvider)); } builder.put(ExplainKey.LEGS, legsExplain); return builder.build(); } SabrExtrapolationReplicationCmsProductPricer(
      SabrExtrapolationReplicationCmsLegPricer cmsLegPricer);  SabrExtrapolationReplicationCmsProductPricer(
      SabrExtrapolationReplicationCmsLegPricer cmsLegPricer,
      DiscountingSwapLegPricer payLegPricer); MultiCurrencyAmount presentValue(
      ResolvedCms cms,
      RatesProvider ratesProvider,
      SabrSwaptionVolatilities swaptionVolatilities); ExplainMap explainPresentValue(
      ResolvedCms cms,
      RatesProvider ratesProvider,
      SabrSwaptionVolatilities swaptionVolatilities); PointSensitivityBuilder presentValueSensitivityRates(
      ResolvedCms cms,
      RatesProvider ratesProvider,
      SabrSwaptionVolatilities swaptionVolatilities); PointSensitivityBuilder presentValueSensitivityModelParamsSabr(
      ResolvedCms cms,
      RatesProvider ratesProvider,
      SabrSwaptionVolatilities swaptionVolatilities); double presentValueSensitivityStrike(
      ResolvedCms cms,
      RatesProvider ratesProvider,
      SabrSwaptionVolatilities swaptionVolatilities); MultiCurrencyAmount currencyExposure(
      ResolvedCms cms,
      RatesProvider ratesProvider,
      SabrSwaptionVolatilities swaptionVolatilities); MultiCurrencyAmount currentCash(
      ResolvedCms cms,
      RatesProvider ratesProvider,
      SabrSwaptionVolatilities swaptionVolatilities);  }### Answer:
@Test public void test_pvExplain() { ExplainMap explain1 = PRODUCT_PRICER.explainPresentValue(CMS_ONE_LEG, RATES_PROVIDER, VOLATILITIES); assertThat(explain1.get(ExplainKey.ENTRY_TYPE).get()).isEqualTo("CmsSwap"); assertThat(explain1.get(ExplainKey.LEGS).get()).hasSize(1); ExplainMap explain2 = PRODUCT_PRICER.explainPresentValue(CMS_TWO_LEGS, RATES_PROVIDER, VOLATILITIES); assertThat(explain2.get(ExplainKey.ENTRY_TYPE).get()).isEqualTo("CmsSwap"); assertThat(explain2.get(ExplainKey.LEGS).get()).hasSize(2); ExplainMap explainCms = CMS_LEG_PRICER.explainPresentValue(CMS_LEG, RATES_PROVIDER, VOLATILITIES); ExplainMap explainOther = SWAP_LEG_PRICER.explainPresentValue(CMS_TWO_LEGS.getPayLeg().get(), RATES_PROVIDER); assertThat(explain2.get(ExplainKey.LEGS).get().get(0)).isEqualTo(explainCms); assertThat(explain2.get(ExplainKey.LEGS).get().get(1)).isEqualTo(explainOther); }