FilterReport { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final FilterReport other = (FilterReport) obj; if (this.filterType != other.filterType) { return false; } if (!Objects.equals(this.messages, other.messages)) { return false; } if (this.passed != other.passed) { return false; } return this.failed == other.failed; } FilterReport(FilterType filterType, int pass, int fail, List<String> messages); FilterType getFilterType(); List<String> getMessages(); boolean hasMessages(); int getPassed(); int getFailed(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void testEqualsNullIsFalse() { Object obj = null; assertThat(instance.equals(obj), is(false)); }
@Test public void testEqualsOtherClassIsFalse() { Object obj = "string"; assertThat(instance.equals(obj), is(false)); }
@Test public void testEqualsOtherFilterReportWithDifferentMessageIsFalse() { FilterReport other = new FilterReport(FilterType.FREQUENCY_FILTER, PASSED, FAILED, Collections.emptyList()); assertThat(instance.equals(other), is(false)); }
@Test public void testEqualsOtherFilterReportWithOtherPassFailIsFalse() { FilterReport other = new FilterReport(FilterType.FREQUENCY_FILTER, FAILED, PASSED, Collections.emptyList()); assertThat(instance.equals(other), is(false)); }
@Test public void testEqualsOtherFilterReport() { FilterReport other = new FilterReport(FilterType.FREQUENCY_FILTER, PASSED, FAILED, ImmutableList.of(MESSAGE)); assertThat(instance.equals(other), is(true)); }
@Test public void testNotEqualsOtherFilterReportWithDifferentFailedNumber() { FilterReport other = new FilterReport(FilterType.FREQUENCY_FILTER, PASSED, PASSED, Collections.emptyList()); assertThat(instance.equals(other), is(false)); }
@Test public void testNotEqualsOtherFilterReportOfDifferentFilterType() { FilterReport other = new FilterReport(FilterType.INHERITANCE_FILTER, PASSED, FAILED, Collections.emptyList()); assertThat(instance.equals(other), is(false)); }