FilterReport { @Override public int hashCode() { int hash = 5; hash = 97 * hash + Objects.hashCode(this.filterType); hash = 97 * hash + Objects.hashCode(this.messages); hash = 97 * hash + this.passed; hash = 97 * hash + this.failed; return hash; } 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 testHashCode() { FilterReport other = new FilterReport(FilterType.FREQUENCY_FILTER, PASSED, FAILED, ImmutableList.of(MESSAGE)); int expResult = other.hashCode(); assertThat(instance.hashCode(), equalTo(expResult)); }