SimpleIdentified implements Identified<T> { @Override public final int hashCode() { return id.hashCode(); } SimpleIdentified(I id); @Override final I getId(); @Override final int hashCode(); @Override final boolean equals(Object o);  }
@Test void hashCodeReturnsHashCodeOfId() { assertEquals(id.hashCode(), simpleIdentified.hashCode()); }