### Question:
NtpTimeStamp { @Override public int hashCode() { int hash = 37; hash = hash * 17 + Long.valueOf( seconds ).hashCode(); hash = hash * 17 + Long.valueOf( fraction ).hashCode(); return hash; } NtpTimeStamp();  NtpTimeStamp( Date date );  NtpTimeStamp( ByteBuffer data ); void writeTo( ByteBuffer buffer ); String toString(); @Override int hashCode(); @Override boolean equals( Object o );  }### Answer:
@Test public void testHashCodeReflexive() throws Exception { assertEquals( ntpTimeStampA.hashCode(), ntpTimeStampA.hashCode() ); assertEquals( ntpTimeStampA1.hashCode(), ntpTimeStampA1.hashCode() ); }
@Test public void testHashCodeSymmetric() throws Exception { assertEquals( ntpTimeStampA1.hashCode(), ntpTimeStampACopy1.hashCode() ); assertEquals( ntpTimeStampACopy1.hashCode(), ntpTimeStampA1.hashCode() ); }
@Test public void testHashCodeTransitive() throws Exception { assertEquals( ntpTimeStampA1.hashCode(), ntpTimeStampACopy1.hashCode() ); assertEquals( ntpTimeStampACopy1.hashCode(), ntpTimeStampB1.hashCode() ); assertEquals( ntpTimeStampA1.hashCode(), ntpTimeStampB1.hashCode() ); }