CouponIbor extends CouponFloating implements DepositIndexCoupon<IborIndex> { @SuppressWarnings("deprecation") @Override public CouponIbor withNotional(final double notional) { try { return new CouponIbor(getCurrency(), getPaymentTime(), getFundingCurveName(), getPaymentYearFraction(), notional, getFixingTime(), _index, getFixingPeriodStartTime(), getFixingPeriodEndTime(), getFixingAccrualFactor(), getForwardCurveName()); } catch (final IllegalStateException e) { return new CouponIbor(getCurrency(), getPaymentTime(), getPaymentYearFraction(), notional, getFixingTime(), _index, getFixingPeriodStartTime(), getFixingPeriodEndTime(), getFixingAccrualFactor()); } } @Deprecated  CouponIbor(final Currency currency, final double paymentTime, final String fundingCurveName, final double paymentYearFraction, final double notional, final double fixingTime,
      final IborIndex index, final double fixingPeriodStartTime, final double fixingPeriodEndTime, final double fixingYearFraction, final String forwardCurveName);  CouponIbor(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 fixingYearFraction); double getFixingPeriodStartTime(); double getFixingPeriodEndTime(); double getFixingAccrualFactor(); @Deprecated String getForwardCurveName(); @Override IborIndex getIndex(); @SuppressWarnings("deprecation") @Override CouponIbor withNotional(final double notional); @Override String toString(); @Override int hashCode(); @Override boolean equals(final Object obj); @SuppressWarnings("deprecation") CouponFixed withUnitCoupon(); @Override T accept(final InstrumentDerivativeVisitor<S, T> visitor, final S data); @Override T accept(final InstrumentDerivativeVisitor<?, T> visitor);  }
@Test public void testWithNotional() { final double notional = NOTIONAL + 1000; final CouponIbor expected = new CouponIbor(EUR, PAYMENT_TIME, ACCRUAL_FACTOR, notional, FIXING_TIME, INDEX_EURIBOR3M, FIXING_START_TIME, FIXING_END_TIME, FIXING_ACCRUAL_FACTOR); assertEquals(expected, CPN_IBOR.withNotional(notional)); }