class DiscountingCmsProductPricer {

  public PointSensitivityBuilder presentValueSensitivity(
      ResolvedCms cms,
      RatesProvider ratesProvider) {

    PointSensitivityBuilder pvSensiCmsLeg =
        cmsLegPricer.presentValueSensitivity(cms.getCmsLeg(), ratesProvider);
    if (!cms.getPayLeg().isPresent()) {
      return pvSensiCmsLeg;
    }
    PointSensitivityBuilder pvSensiPayLeg =
        swapPricer.getLegPricer().presentValueSensitivity(cms.getPayLeg().get(), ratesProvider);
    return pvSensiCmsLeg.combinedWith(pvSensiPayLeg);
  }

  public  DiscountingCmsProductPricer(DiscountingSwapProductPricer swapPricer);

}