ProjectHistory extends OwnedEntity { public void setHistory(History history) { this.history = history; } ProjectHistory();  ProjectHistory(OwnedEntity entity, History history);  ProjectHistory(ProjectHistory project); History getHistory(); void setHistory(History history); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void hashCodeAndEquals() { basicEqualsTest(entity); ProjectHistory another = new ProjectHistory(entity); assertEqualsAndHashCode(entity, another); another.setHistory(new HistoryStub2()); assertNotEqualsAndHashCode(entity, another); }