/**
* Tests the object equal and hash code methods.
*/
public void equalHash() {
assertTrue("Black Swaption Surface: equal and hash code", BLACK_SWAPTION.equals(BLACK_SWAPTION));
final BlackFlatSwaptionParameters other = new BlackFlatSwaptionParameters(BLACK_SURFACE, EUR1YEURIBOR6M);
assertTrue("Black Swaption Surface: equal and hash code", BLACK_SWAPTION.equals(other));
assertEquals("Black Swaption Surface: equal and hash code", BLACK_SWAPTION.hashCode(), other.hashCode());
BlackFlatSwaptionParameters modified = new BlackFlatSwaptionParameters(BLACK_SURFACE, GENERATOR_SWAP_MASTER.getGenerator("EUR1YEURIBOR3M", CALENDAR));
assertFalse("Black Swaption Surface: equal and hash code", BLACK_SWAPTION.equals(modified));
InterpolatedDoublesSurface surface2 = InterpolatedDoublesSurface.from(new double[] {0.5, 1.0, 5.0, 0.5, 1.0, 5.0}, new double[] {2, 2, 2, 10, 10, 10}, new double[] {0.35, 0.34, 0.25, 0.31, 0.25,
0.20}, INTERPOLATOR_2D);
modified = new BlackFlatSwaptionParameters(surface2, EUR1YEURIBOR6M);
assertFalse("Black Swaption Surface: equal and hash code", BLACK_SWAPTION.equals(modified));
}