class SabrExtrapolationReplicationCmsLegPricer {

  public PointSensitivityBuilder presentValueSensitivityRates(
      ResolvedCmsLeg cmsLeg,
      RatesProvider ratesProvider,
      SabrSwaptionVolatilities swaptionVolatilities) {

    validate(ratesProvider, swaptionVolatilities);
    return cmsLeg.getCmsPeriods().stream()
        .map(cmsPeriod -> cmsPeriodPricer.presentValueSensitivityRates(cmsPeriod, ratesProvider, swaptionVolatilities))
        .reduce((p1, p2) -> p1.combinedWith(p2))
        .get();
  }

  public  SabrExtrapolationReplicationCmsLegPricer(SabrExtrapolationReplicationCmsPeriodPricer cmsPeriodPricer);

}