@Test public void testHashCode() { Assertions.assertThat(one.hashCode()) .isEqualTo(two.hashCode()); Assertions.assertThat(one.hashCode()) .isNotEqualTo(three.hashCode()); }
@Override public int hashCode() { return Objects.hashCode(getId()); }
BaseEntity implements Entity<I> { @Override public int hashCode() { return Objects.hashCode(getId()); } }
BaseEntity implements Entity<I> { @Override public int hashCode() { return Objects.hashCode(getId()); }  }
BaseEntity implements Entity<I> { @Override public int hashCode() { return Objects.hashCode(getId()); }  @Override @SuppressWarnings("unchecked") I getId(); @Override int hashCode(); @Override boolean equals(Object other); @Override String toString(); }
BaseEntity implements Entity<I> { @Override public int hashCode() { return Objects.hashCode(getId()); }  @Override @SuppressWarnings("unchecked") I getId(); @Override int hashCode(); @Override boolean equals(Object other); @Override String toString();  }