CouponCMSDefinition extends CouponFloatingDefinition { public SwapFixedIborDefinition getUnderlyingSwap() { return _underlyingSwap; } 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 public void test() { assertEquals(CMS_COUPON_DEFINITION.getPaymentDate(), COUPON.getPaymentDate()); assertEquals(CMS_COUPON_DEFINITION.getAccrualStartDate(), COUPON.getAccrualStartDate()); assertEquals(CMS_COUPON_DEFINITION.getAccrualEndDate(), COUPON.getAccrualEndDate()); assertEquals(CMS_COUPON_DEFINITION.getPaymentYearFraction(), COUPON.getPaymentYearFraction(), 1E-10); assertEquals(CMS_COUPON_DEFINITION.getNotional(), COUPON.getNotional(), 1E-2); assertEquals(CMS_COUPON_DEFINITION.getFixingDate(), FIXING_DATE); assertEquals(CMS_COUPON_DEFINITION.getUnderlyingSwap(), SWAP_DEFINITION); assertEquals(CMS_COUPON_2.getPaymentDate(), COUPON.getPaymentDate()); assertEquals(CMS_COUPON_2.getAccrualStartDate(), COUPON.getAccrualStartDate()); assertEquals(CMS_COUPON_2.getAccrualEndDate(), COUPON.getAccrualEndDate()); assertEquals(CMS_COUPON_2.getPaymentYearFraction(), COUPON.getPaymentYearFraction(), 1E-10); assertEquals(CMS_COUPON_2.getNotional(), COUPON.getNotional(), 1E-2); assertEquals(CMS_COUPON_2.getFixingDate(), FIXING_DATE); assertEquals(CMS_COUPON_2.getUnderlyingSwap(), SWAP_DEFINITION); }