class DiscountingCmsProductPricer {

  public MultiCurrencyAmount currentCash(
      ResolvedCms cms,
      RatesProvider ratesProvider) {

    CurrencyAmount ccCmsLeg = cmsLegPricer.currentCash(cms.getCmsLeg(), ratesProvider);
    if (!cms.getPayLeg().isPresent()) {
      return MultiCurrencyAmount.of(ccCmsLeg);
    }
    CurrencyAmount ccPayLeg = swapPricer.getLegPricer().currentCash(cms.getPayLeg().get(), ratesProvider);
    return MultiCurrencyAmount.of(ccPayLeg).plus(ccCmsLeg);
  }

  public  DiscountingCmsProductPricer(DiscountingSwapProductPricer swapPricer);

}