AbsoluteRecordIdImpl implements AbsoluteRecordId { @Override public boolean equals(Object obj) { return EqualsBuilder.reflectionEquals(this, obj); } AbsoluteRecordIdImpl(String table, RecordId recordId); @Override RecordId getRecordId(); @Override String getTable(); @Override byte[] toBytes(); static AbsoluteRecordId fromBytes(byte[] bytes, IdGenerator idGenerator); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void testEquals() { AbsoluteRecordId idA1 = new AbsoluteRecordIdImpl("mytable", idGenerator.fromString("USER.myId")); AbsoluteRecordId idA2 = new AbsoluteRecordIdImpl("mytable", idGenerator.fromString("USER.myId")); AbsoluteRecordId idB = new AbsoluteRecordIdImpl("othertable", idGenerator.fromString("USER.myId")); AbsoluteRecordId idC = new AbsoluteRecordIdImpl("mytable", idGenerator.fromString("USER.otherId")); assertEquals(idA1, idA2); assertFalse(idA1.equals(idB)); assertFalse(idA1.equals(idC)); }