CouponIborGearing extends CouponFloating { @SuppressWarnings("deprecation") @Override public CouponIborGearing withNotional(final double notional) { try { return new CouponIborGearing(getCurrency(), getPaymentTime(), getFundingCurveName(), getPaymentYearFraction(), notional, getFixingTime(), _index, _fixingPeriodStartTime, _fixingPeriodEndTime, _fixingAccrualFactor, _spread, _factor, _forwardCurveName); } catch (final IllegalStateException e) { return new CouponIborGearing(getCurrency(), getPaymentTime(), getPaymentYearFraction(), notional, getFixingTime(), _index, _fixingPeriodStartTime, _fixingPeriodEndTime, _fixingAccrualFactor, _spread, _factor); } } @Deprecated  CouponIborGearing(final Currency currency, final double paymentTime, final String discountingCurveName, final double paymentYearFraction,
      final double notional, final double fixingTime, final IborIndex index, final double fixingPeriodStartTime, final double fixingPeriodEndTime,
      final double fixingAccrualFactor, final double spread, final double factor, final String forwardCurveName);  CouponIborGearing(final Currency currency, final double paymentTime, final double paymentYearFraction, final double notional, final double fixingTime, final IborIndex index,
      final double fixingPeriodStartTime, final double fixingPeriodEndTime, final double fixingAccrualFactor, final double spread, final double factor); IborIndex getIndex(); double getFixingPeriodStartTime(); double getFixingPeriodEndTime(); double getFixingAccrualFactor(); double getSpread(); double getSpreadAmount(); double getFactor(); @Deprecated String getForwardCurveName(); @SuppressWarnings("deprecation") @Override CouponIborGearing withNotional(final double notional); @Override String toString(); @Override T accept(final InstrumentDerivativeVisitor<S, T> visitor, final S data); @Override T accept(final InstrumentDerivativeVisitor<?, T> visitor); @Override int hashCode(); @Override boolean equals(final Object obj);  }
@Test public void testWithNotional() { final double notional = NOTIONAL + 100; final CouponIborGearing expected = new CouponIborGearing(CUR, ACCRUAL_END_TIME, ACCRUAL_FACTOR, notional, FIXING_TIME, INDEX, FIXING_START_TIME, FIXING_END_TIME, FIXING_ACCRUAL_FACTOR, SPREAD, FACTOR); assertEquals(expected, COUPON.withNotional(notional)); }