CouponFixedCompounding extends Coupon { @Override public Coupon withNotional(final double notional) { return new CouponFixedCompounding(getCurrency(), getPaymentTime(), getPaymentYearFraction(), notional, _paymentAccrualFactors, _fixedRate); } CouponFixedCompounding(final Currency currency, final double paymentTime, final double paymentYearFraction, final double notional,
      final double[] paymentAccrualFactors, final double rate); double getFixedRate(); double[] getPaymentAccrualFactors(); double getNotionalAccrued(); @Override Coupon withNotional(final double notional); @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 + 10000; final CouponFixedCompounding expected = new CouponFixedCompounding(USDLIBOR1M.getCurrency(), PAYMENT_TIME, PAYMENT_ACCRUAL_FACTOR, notional, PAYMENT_ACCRUAL_FACTORS, FIXED_RATE); assertEquals(expected, CPN.withNotional(notional)); }