@Test public void properListOfStringIsReturned_whenListOfObjectsIsProvided() { final List<?> list = newArrayList("a", "b", "c"); assertThat(Events.ensureListOfStrings(list)).containsExactly("a", "b", "c"); }
static List<String> ensureListOfStrings(final List<?> list) { return list.stream().map(String.class::cast).collect(toList()); }
Events { static List<String> ensureListOfStrings(final List<?> list) { return list.stream().map(String.class::cast).collect(toList()); } }
Events { static List<String> ensureListOfStrings(final List<?> list) { return list.stream().map(String.class::cast).collect(toList()); }  }
Events { static List<String> ensureListOfStrings(final List<?> list) { return list.stream().map(String.class::cast).collect(toList()); }   }
Events { static List<String> ensureListOfStrings(final List<?> list) { return list.stream().map(String.class::cast).collect(toList()); }    }