QualifiedRecommendation { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } QualifiedRecommendation other = (QualifiedRecommendation) obj; if (newEntry == null) { if (other.newEntry != null) { return false; } } else if (!newEntry.equals(other.newEntry)) { return false; } if (oldEntry == null) { if (other.oldEntry != null) { return false; } } else if (!oldEntry.equals(other.oldEntry)) { return false; } if (reason != other.reason) { return false; } if (recommendation != other.recommendation) { return false; } return true; } 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 @SuppressWarnings("EqualsIncompatibleType") public void testEquals() { Assert.assertEquals(DEFAULT_QUALIFIED_RECOMMENDATION, DEFAULT_QUALIFIED_RECOMMENDATION); Assert.assertEquals(DEFAULT_QUALIFIED_RECOMMENDATION, CLONED_DEFAULT_QUALIFIED_RECOMMENDATION); Assert.assertNotSame(DEFAULT_QUALIFIED_RECOMMENDATION, CLONED_DEFAULT_QUALIFIED_RECOMMENDATION); for (QualifiedRecommendation mutation : ALL_MUTATIONS) { Assert.assertNotEquals(DEFAULT_QUALIFIED_RECOMMENDATION, mutation); } Assert.assertFalse(DEFAULT_QUALIFIED_RECOMMENDATION.equals(null)); Assert.assertFalse(DEFAULT_QUALIFIED_RECOMMENDATION.equals("foo")); }