AbstractID implements IOReadableWritable { @Override public int hashCode() { return (int) (this.lowerPart ^ (this.upperPart >>> 32)); } AbstractID(final byte[] bytes);  AbstractID(); void setID(final AbstractID src); @Override boolean equals(final Object obj); @Override int hashCode(); @Override void read(final DataInput in); @Override void write(final DataOutput out); @Override String toString();  }
@Test public void testSerialization() { final ChannelID origID = new ChannelID(); try { final ChannelID copyID = (ChannelID) CommonTestUtils.createCopy(origID); assertEquals(origID.hashCode(), copyID.hashCode()); assertEquals(origID, copyID); } catch (IOException e) { e.printStackTrace(); } }