FilterReport { public boolean hasMessages() { return !messages.isEmpty(); } 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 testHasMessagesIsFalseWhenNoMessagesAdded() { FilterReport instance = new FilterReport(FilterType.FREQUENCY_FILTER, 0, 0, Collections.emptyList()); assertThat(instance.hasMessages(), is(false)); }
@Test public void testHasMessagesIsTrueWhenMessagesAdded() { assertThat(instance.hasMessages(), is(true)); }