@Test
public void testEqualHash() {
CouponIborDefinition other = new CouponIborDefinition(CUR, PAYMENT_DATE, ACCRUAL_START_DATE, ACCRUAL_END_DATE, ACCRUAL_FACTOR, NOTIONAL, FIXING_DATE, INDEX, CALENDAR);
assertEquals(IBOR_COUPON_DEFINITION, other);
assertEquals(IBOR_COUPON_DEFINITION.hashCode(), other.hashCode());
other = new CouponIborDefinition(Currency.AUD, PAYMENT_DATE, ACCRUAL_START_DATE, ACCRUAL_END_DATE, ACCRUAL_FACTOR, NOTIONAL, FIXING_DATE, new IborIndex(Currency.AUD, TENOR, SETTLEMENT_DAYS,
DAY_COUNT_INDEX, BUSINESS_DAY, IS_EOM, "Ibor"), CALENDAR);
assertFalse(IBOR_COUPON_DEFINITION.equals(other));
other = new CouponIborDefinition(CUR, PAYMENT_DATE.plusDays(1), ACCRUAL_START_DATE, ACCRUAL_END_DATE, ACCRUAL_FACTOR, NOTIONAL, FIXING_DATE, INDEX, CALENDAR);
assertFalse(IBOR_COUPON_DEFINITION.equals(other));
other = new CouponIborDefinition(CUR, PAYMENT_DATE, ACCRUAL_START_DATE.plusDays(1), ACCRUAL_END_DATE, ACCRUAL_FACTOR, NOTIONAL, FIXING_DATE, INDEX, CALENDAR);
assertFalse(IBOR_COUPON_DEFINITION.equals(other));
other = new CouponIborDefinition(CUR, PAYMENT_DATE, ACCRUAL_START_DATE, ACCRUAL_END_DATE.plusDays(1), ACCRUAL_FACTOR, NOTIONAL, FIXING_DATE, INDEX, CALENDAR);
assertFalse(IBOR_COUPON_DEFINITION.equals(other));
other = new CouponIborDefinition(CUR, PAYMENT_DATE, ACCRUAL_START_DATE, ACCRUAL_END_DATE, ACCRUAL_FACTOR + 0.01, NOTIONAL, FIXING_DATE, INDEX, CALENDAR);
assertFalse(IBOR_COUPON_DEFINITION.equals(other));
other = new CouponIborDefinition(CUR, PAYMENT_DATE, ACCRUAL_START_DATE, ACCRUAL_END_DATE, ACCRUAL_FACTOR, NOTIONAL + 100, FIXING_DATE, INDEX, CALENDAR);
assertFalse(IBOR_COUPON_DEFINITION.equals(other));
other = new CouponIborDefinition(CUR, PAYMENT_DATE, ACCRUAL_START_DATE, ACCRUAL_END_DATE, ACCRUAL_FACTOR, NOTIONAL, FIXING_DATE.plusDays(1), INDEX, CALENDAR);
assertFalse(IBOR_COUPON_DEFINITION.equals(other));
other = new CouponIborDefinition(CUR, PAYMENT_DATE, ACCRUAL_START_DATE, ACCRUAL_END_DATE, ACCRUAL_FACTOR, NOTIONAL, FIXING_DATE, new IborIndex(CUR, TENOR, SETTLEMENT_DAYS + 1,
DAY_COUNT_INDEX, BUSINESS_DAY, IS_EOM, "Ibor"), CALENDAR);
assertFalse(IBOR_COUPON_DEFINITION.equals(other));
other = new CouponIborDefinition(CUR, FIXING_END_DATE, FIXING_START_DATE, FIXING_END_DATE, ACCRUAL_FACTOR_FIXING, NOTIONAL, FIXING_DATE, INDEX, CALENDAR);
assertEquals(IBOR_COUPON_DEFINITION_2, other);
assertEquals(IBOR_COUPON_DEFINITION_2.hashCode(), other.hashCode());