CouponIborAverage extends CouponFloating { @Override public CouponIborAverage withNotional(final double notional) { return new CouponIborAverage(getCurrency(), getPaymentTime(), getPaymentYearFraction(), notional, getFixingTime(), _index1, getFixingPeriodStartTime1(), getFixingPeriodEndTime1(), getFixingAccrualFactor1(), _index2, getFixingPeriodStartTime2(), getFixingPeriodEndTime2(), getFixingAccrualFactor2(), getWeight1(), getWeight2()); } CouponIborAverage(final Currency currency, final double paymentTime, final double paymentYearFraction, final double notional, final double fixingTime,
      final IborIndex index1, final double fixingPeriodStartTime1, final double fixingPeriodEndTime1, final double fixingYearFraction1,
      final IborIndex index2, final double fixingPeriodStartTime2, final double fixingPeriodEndTime2, final double fixingYearFraction2,
      final double weight1, final double weight2); IborIndex getIndex1(); IborIndex getIndex2(); double getWeight1(); double getWeight2(); double getFixingPeriodStartTime1(); double getFixingPeriodEndTime1(); double getFixingAccrualFactor1(); double getFixingPeriodStartTime2(); double getFixingPeriodEndTime2(); double getFixingAccrualFactor2(); @Override CouponIborAverage withNotional(final double notional); @Override String toString(); @Override int hashCode(); @Override boolean equals(final Object obj); @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 CouponIborAverage expected = new CouponIborAverage(EUR, PAYMENT_TIME, ACCRUAL_FACTOR, notional, FIXING_TIME, INDEX_EURIBOR3M, FIXING_START_TIME_1, FIXING_END_TIME_1, FIXING_ACCRUAL_FACTOR_1, INDEX_EURIBOR6M, FIXING_START_TIME_2, FIXING_END_TIME_2, FIXING_ACCRUAL_FACTOR_2, WEIGHT_1, WEIGHT_2); assertEquals(expected, CPN_IBOR_AVERAGE.withNotional(notional)); }