HandicapGroupApiEntity extends ApiEntity { @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); }  String getId(); void setId(String id); String getName(); void setName(String name); BigDecimal getFactor(); void setFactor(BigDecimal factor); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void hashCodeTest() throws Exception { HandicapGroupApiEntity otherHandicapGroup = ApiEntityTestUtils.fullHandicapGroup(); assertThat(handicapGroup.hashCode()).isEqualTo(otherHandicapGroup.hashCode()); }