AbstractID implements IOReadableWritable { public void setID(final AbstractID src) { this.lowerPart = src.lowerPart; this.upperPart = src.upperPart; } 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 testSetID() { final ChannelID id1 = new ChannelID(); final ChannelID id2 = new ChannelID(); id1.setID(id2); assertEquals(id1.hashCode(), id2.hashCode()); assertEquals(id1, id2); }