QualifiedRecommendation { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((newEntry == null) ? 0 : newEntry.hashCode()); result = prime * result + ((oldEntry == null) ? 0 : oldEntry.hashCode()); result = prime * result + ((reason == null) ? 0 : reason.hashCode()); result = prime * result + ((recommendation == null) ? 0 : recommendation.hashCode()); return result; } QualifiedRecommendation(
      MinimalZipEntry oldEntry,
      MinimalZipEntry newEntry,
      Recommendation recommendation,
      RecommendationReason reason); MinimalZipEntry getOldEntry(); MinimalZipEntry getNewEntry(); Recommendation getRecommendation(); RecommendationReason getReason(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void testHashCode() { Set<QualifiedRecommendation> hashSet = new HashSet<>(); hashSet.add(DEFAULT_QUALIFIED_RECOMMENDATION); hashSet.add(CLONED_DEFAULT_QUALIFIED_RECOMMENDATION); Assert.assertEquals(1, hashSet.size()); hashSet.addAll(ALL_MUTATIONS); Assert.assertEquals(1 + ALL_MUTATIONS.size(), hashSet.size()); }