SimpleIdentified implements Identified<T> { @Override public final boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } final SimpleIdentified<?, ?> that = (SimpleIdentified<?, ?>) o; return id.equals(that.id); } SimpleIdentified(I id); @Override final I getId(); @Override final int hashCode(); @Override final boolean equals(Object o);  }
@Test @SuppressWarnings({"ObjectEqualsNull", "ConstantConditions", "SimplifiableJUnitAssertion"}) void isNotEqualToNull() { assertFalse(simpleIdentified.equals(null)); }