@Test public void testEqualsAndHashCode() { FXVannaVolgaVolatilityCurveDataBundle other = new FXVannaVolgaVolatilityCurveDataBundle(DELTA, RR, ATM, VWB, DATE); assertEquals(DATA, other); assertEquals(DATA.hashCode(), other.hashCode()); other = new FXVannaVolgaVolatilityCurveDataBundle(-DELTA, RR, ATM, VWB, DATE); assertFalse(other.equals(DATA)); other = new FXVannaVolgaVolatilityCurveDataBundle(DELTA, -RR, ATM, VWB, DATE); assertFalse(other.equals(DATA)); other = new FXVannaVolgaVolatilityCurveDataBundle(DELTA, RR, ATM + 1, VWB, DATE); assertFalse(other.equals(DATA)); other = new FXVannaVolgaVolatilityCurveDataBundle(DELTA, RR, ATM, -VWB, DATE); assertFalse(other.equals(DATA)); other = new FXVannaVolgaVolatilityCurveDataBundle( DELTA, RR, ATM, VWB, DateUtils.getDateOffsetWithYearFraction(DATE, 1)); assertFalse(other.equals(DATA)); }