/**
* Tests the equal and hash-code methods.
*/
public void equalHash() {
assertEquals(ZERO_COUPON, ZERO_COUPON);
CouponInflationZeroCouponMonthly couponDuplicate = new CouponInflationZeroCouponMonthly(CUR, PAYMENT_TIME, 1.0, NOTIONAL, PRICE_INDEX, INDEX_APRIL_2008, REFERENCE_END_TIME,
NATURAL_PAYMENT_TIME, false);
assertEquals(ZERO_COUPON, couponDuplicate);
assertEquals(ZERO_COUPON.hashCode(), couponDuplicate.hashCode());
CouponInflationZeroCouponMonthly modified;
modified = new CouponInflationZeroCouponMonthly(CUR, PAYMENT_TIME, 1.0, NOTIONAL, PRICE_INDEX, INDEX_APRIL_2008 + 0.1, REFERENCE_END_TIME, NATURAL_PAYMENT_TIME, false);
assertFalse(ZERO_COUPON.equals(modified));
modified = new CouponInflationZeroCouponMonthly(CUR, PAYMENT_TIME, 1.0, NOTIONAL, PRICE_INDEX, INDEX_APRIL_2008, REFERENCE_END_TIME + 0.1, NATURAL_PAYMENT_TIME, false);
assertFalse(ZERO_COUPON.equals(modified));
double modifiedNaturalPaymentTime = NATURAL_PAYMENT_TIME + .01;
modified = new CouponInflationZeroCouponMonthly(CUR, PAYMENT_TIME, 1.0, NOTIONAL, PRICE_INDEX, INDEX_APRIL_2008, REFERENCE_END_TIME, modifiedNaturalPaymentTime, false);
assertFalse(ZERO_COUPON.equals(modified));
}