public void testEqualHash() {
final CapFloorCMSSpread newCMSSpread = new CapFloorCMSSpread(CUR, PAYMENT_TIME, PAYMENT_ACCRUAL_FACTOR, NOTIONAL, FIXING_TIME, SWAP_1, CMS_INDEX_1, SWAP_2, CMS_INDEX_2, SETTLEMENT_TIME, STRIKE,
IS_CAP, FUNDING_CURVE_NAME);
assertEquals(newCMSSpread.equals(CMS_SPREAD), true);
assertEquals(newCMSSpread.hashCode() == CMS_SPREAD.hashCode(), true);
final Currency newCur = Currency.USD;
CapFloorCMSSpread modifiedCMSSpread;
modifiedCMSSpread = new CapFloorCMSSpread(newCur, PAYMENT_TIME, PAYMENT_ACCRUAL_FACTOR, NOTIONAL, FIXING_TIME, SWAP_1, CMS_INDEX_1, SWAP_2, CMS_INDEX_2, SETTLEMENT_TIME, STRIKE, IS_CAP,
FUNDING_CURVE_NAME);
assertEquals(modifiedCMSSpread.equals(CMS_SPREAD), false);
modifiedCMSSpread = new CapFloorCMSSpread(CUR, PAYMENT_TIME + 1.0, PAYMENT_ACCRUAL_FACTOR, NOTIONAL, FIXING_TIME, SWAP_1, CMS_INDEX_1, SWAP_2, CMS_INDEX_2, SETTLEMENT_TIME, STRIKE, IS_CAP,