CouponCMSDefinition extends CouponFloatingDefinition { public static CouponCMSDefinition from(final ZonedDateTime paymentDate, final ZonedDateTime accrualStartDate, final ZonedDateTime accrualEndDate, final double accrualFactor, final double notional, final ZonedDateTime fixingDate, final SwapFixedIborDefinition underlyingSwap, final IndexSwap cmsIndex) { ArgumentChecker.notNull(underlyingSwap, "underlying swap"); return new CouponCMSDefinition(underlyingSwap.getCurrency(), paymentDate, accrualStartDate, accrualEndDate, accrualFactor, notional, fixingDate, underlyingSwap, cmsIndex); } CouponCMSDefinition(final Currency currency, final ZonedDateTime paymentDate, final ZonedDateTime accrualStartDate, final ZonedDateTime accrualEndDate, final double accrualFactor,
      final double notional, final ZonedDateTime fixingDate, final SwapFixedIborDefinition underlyingSwap, final IndexSwap cmsIndex); static CouponCMSDefinition from(final ZonedDateTime paymentDate, final ZonedDateTime accrualStartDate, final ZonedDateTime accrualEndDate, final double accrualFactor, final double notional,
      final ZonedDateTime fixingDate, final SwapFixedIborDefinition underlyingSwap, final IndexSwap cmsIndex); static CouponCMSDefinition from(final ZonedDateTime paymentDate, final ZonedDateTime accrualStartDate, final ZonedDateTime accrualEndDate, final double accrualFactor, final double notional,
      final IndexSwap cmsIndex, final Calendar iborCalendar); static CouponCMSDefinition from(final CouponFloatingDefinition coupon, final SwapFixedIborDefinition underlyingSwap, final IndexSwap cmsIndex); static CouponCMSDefinition from(final CouponFloatingDefinition coupon, final IndexSwap cmsIndex, final Calendar iborCalendar); SwapFixedIborDefinition getUnderlyingSwap(); IndexSwap getCMSIndex(); @Override String toString(); @Override Coupon toDerivative(final ZonedDateTime date); @Override Coupon toDerivative(final ZonedDateTime dateTime, final DoubleTimeSeries<ZonedDateTime> indexFixingTimeSeries); @Override V accept(final InstrumentDefinitionVisitor<U, V> visitor, final U data); @Override V accept(final InstrumentDefinitionVisitor<?, V> visitor); @Override int hashCode(); @Override boolean equals(final Object obj);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullPaymentDate() { CouponCMSDefinition.from(null, ACCRUAL_START_DATE, ACCRUAL_END_DATE, ACCRUAL_FACTOR, NOTIONAL, FIXING_DATE, SWAP_DEFINITION, CMS_INDEX); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullAccrualStartDate() { CouponCMSDefinition.from(PAYMENT_DATE, null, ACCRUAL_END_DATE, ACCRUAL_FACTOR, NOTIONAL, FIXING_DATE, SWAP_DEFINITION, CMS_INDEX); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullAccrualEndDate() { CouponCMSDefinition.from(PAYMENT_DATE, ACCRUAL_START_DATE, null, ACCRUAL_FACTOR, NOTIONAL, FIXING_DATE, SWAP_DEFINITION, CMS_INDEX); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullFixingDate() { CouponCMSDefinition.from(PAYMENT_DATE, ACCRUAL_START_DATE, ACCRUAL_END_DATE, ACCRUAL_FACTOR, NOTIONAL, null, SWAP_DEFINITION, CMS_INDEX); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullSwap() { CouponCMSDefinition.from(PAYMENT_DATE, ACCRUAL_START_DATE, ACCRUAL_END_DATE, ACCRUAL_FACTOR, NOTIONAL, FIXING_DATE, null, CMS_INDEX); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullCMSIndex() { CouponCMSDefinition.from(PAYMENT_DATE, ACCRUAL_START_DATE, ACCRUAL_END_DATE, ACCRUAL_FACTOR, NOTIONAL, FIXING_DATE, SWAP_DEFINITION, null); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testFromNullCoupon() { CouponCMSDefinition.from(null, SWAP_DEFINITION, CMS_INDEX); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testFromNullSwap() { CouponCMSDefinition.from(FLOAT_COUPON, (SwapFixedIborDefinition) null, CMS_INDEX); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testFromNullCoupons() { CouponCMSDefinition.from(null, CMS_INDEX, CALENDAR); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testFromNullIndex() { CouponCMSDefinition.from(FLOAT_COUPON, null, CALENDAR); }