CouponIborRatchet extends CouponIborSpread { @SuppressWarnings("deprecation") @Override public CouponIborRatchet withNotional(final double notional) { try { return new CouponIborRatchet(getCurrency(), getPaymentTime(), getFundingCurveName(), getPaymentYearFraction(), notional, getFixingTime(), getFixingPeriodStartTime(), getFixingPeriodEndTime(), getFixingAccrualFactor(), getForwardCurveName(), _index, _mainCoefficients, _floorCoefficients, _capCoefficients); } catch (final IllegalStateException e) { return new CouponIborRatchet(getCurrency(), getPaymentTime(), getPaymentYearFraction(), notional, getFixingTime(), getFixingPeriodStartTime(), getFixingPeriodEndTime(), getFixingAccrualFactor(), _index, _mainCoefficients, _floorCoefficients, _capCoefficients); } } @Deprecated  CouponIborRatchet(final Currency currency, final double paymentTime, final String discountingCurveName, final double paymentYearFraction,
      final double notional, final double fixingTime, final double fixingPeriodStartTime,
      final double fixingPeriodEndTime, final double fixingYearFraction, final String forwardCurveName, final IborIndex index, final double[] mainCoefficients,
      final double[] floorCoefficients, final double[] capCoefficients);  CouponIborRatchet(final Currency currency, final double paymentTime, final double paymentYearFraction, final double notional, final double fixingTime, final double fixingPeriodStartTime,
      final double fixingPeriodEndTime, final double fixingYearFraction, final IborIndex index, final double[] mainCoefficients, final double[] floorCoefficients, final double[] capCoefficients); double[] getMainCoefficients(); double[] getFloorCoefficients(); double[] getCapCoefficients(); @SuppressWarnings("deprecation") @Override CouponIborRatchet withNotional(final double notional); @Override int hashCode(); @Override boolean equals(final Object obj);  }
@Test public void testWithNotional() { final double notional = NOTIONAL + 100; final CouponIborRatchet expected = new CouponIborRatchet(CUR, 0.25, 0.25, notional, 0.1, 0.1, 0.2, 0.25, INDEX_IBOR, MAIN_COEF, FLOOR_COEF, CAP_COEF); final CouponIborRatchet coupon = new CouponIborRatchet(CUR, 0.25, 0.25, NOTIONAL, 0.1, 0.1, 0.2, 0.25, INDEX_IBOR, MAIN_COEF, FLOOR_COEF, CAP_COEF); assertEquals(expected, coupon.withNotional(notional)); }