FilterReport { public List<String> getMessages() { return messages; } 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 testGetMessages() { List<String> expectedMessages = new ArrayList<>(); expectedMessages.add(MESSAGE); assertThat(instance.getMessages(), equalTo(expectedMessages)); }