AbstractID implements IOReadableWritable, Comparable<AbstractID>, java.io.Serializable { @Override public int hashCode() { return ((int) this.lowerPart) ^ ((int) (this.lowerPart >>> 32)) ^ ((int) this.upperPart) ^ ((int) (this.upperPart >>> 32)); } AbstractID(byte[] bytes);  AbstractID(long lowerPart, long upperPart);  AbstractID(AbstractID id);  AbstractID(); long getLowerPart(); long getUpperPart(); byte[] getBytes(); @Override void read(DataInputView in); @Override void write(DataOutputView out); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); @Override int compareTo(AbstractID o); static final int SIZE; }
@Test public void testSerialization() { final AbstractID origID = new AbstractID(); try { final AbstractID copyID = CommonTestUtils.createCopyWritable(origID); assertEquals(origID.hashCode(), copyID.hashCode()); assertEquals(origID, copyID); } catch (Exception e) { e.printStackTrace(); fail(e.getMessage()); } }