### Question:
SabrExtrapolationReplicationCmsPeriodPricer { public double adjustedForwardRate( CmsPeriod cmsPeriod, RatesProvider provider, SabrSwaptionVolatilities swaptionVolatilities) { CmsPeriod coupon = cmsPeriod.toCouponEquivalent(); Currency ccy = cmsPeriod.getCurrency(); double dfPayment = provider.discountFactor(ccy, coupon.getPaymentDate()); double pv = presentValue(coupon, provider, swaptionVolatilities).getAmount(); return pv / (coupon.getNotional() * coupon.getYearFraction() * dfPayment); } private  SabrExtrapolationReplicationCmsPeriodPricer(
      DiscountingSwapProductPricer swapPricer,
      double cutOffStrike,
      double mu); static SabrExtrapolationReplicationCmsPeriodPricer of(
      DiscountingSwapProductPricer swapPricer,
      double cutOffStrike,
      double mu); static SabrExtrapolationReplicationCmsPeriodPricer of(double cutOffStrike, double mu); CurrencyAmount presentValue(
      CmsPeriod cmsPeriod,
      RatesProvider provider,
      SabrSwaptionVolatilities swaptionVolatilities); double adjustedForwardRate(
      CmsPeriod cmsPeriod,
      RatesProvider provider,
      SabrSwaptionVolatilities swaptionVolatilities); double adjustmentToForwardRate(
      CmsPeriod cmsPeriod,
      RatesProvider provider,
      SabrSwaptionVolatilities swaptionVolatilities); PointSensitivityBuilder presentValueSensitivityRates(
      CmsPeriod cmsPeriod,
      RatesProvider provider,
      SabrSwaptionVolatilities swaptionVolatilities); PointSensitivityBuilder presentValueSensitivityModelParamsSabr(
      CmsPeriod cmsPeriod,
      RatesProvider provider,
      SabrSwaptionVolatilities swaptionVolatilities); double presentValueSensitivityStrike(
      CmsPeriod cmsPeriod,
      RatesProvider provider,
      SabrSwaptionVolatilities swaptionVolatilities); void explainPresentValue(
      CmsPeriod period,
      RatesProvider ratesProvider,
      SabrSwaptionVolatilities swaptionVolatilities,
      ExplainMapBuilder builder);  }### Answer:
@Test public void test_adjusted_forward_rate_cap_floor() { double adjustedForwardRateCoupon = PRICER.adjustedForwardRate(COUPON, RATES_PROVIDER, VOLATILITIES); double adjustedForwardRateFloor = PRICER.adjustedForwardRate(FLOORLET, RATES_PROVIDER, VOLATILITIES); assertThat(adjustedForwardRateCoupon).isCloseTo(adjustedForwardRateFloor, offset(TOL)); double adjustedForwardRateCap = PRICER.adjustedForwardRate(CAPLET, RATES_PROVIDER, VOLATILITIES); assertThat(adjustedForwardRateCoupon).isCloseTo(adjustedForwardRateCap, offset(TOL)); }
@Test public void test_adjusted_forward_rate_afterFix() { double adjustedForward = PRICER.adjustedForwardRate(COUPON, RATES_PROVIDER_AFTER_FIX, VOLATILITIES_AFTER_FIX); assertThat(adjustedForward).isCloseTo(OBS_INDEX, offset(TOL)); }