@Test
public void shouldReturnEmptyListForFilterOfEmptyList() {

  final Predicate<String> predicate = mock(Predicate.class);
  when(predicate.apply(anyString())).thenReturn(true);
  final Function<List<String>, List<String>> function = functionFromListOf(String.class)
      .thenFilter(predicate);
  assertThat(function.apply(new ArrayList<String>()),
      sameInstance(Collections.<String>emptyList()));
}