### Question:
FilterRepository { <T extends Filter> Collection<T> getFiltersOfType(final Class<T> filterClass) { return filters.values().stream() .flatMap(f -> getIfTypeMatches(f, filterClass).map(Stream::of).orElseGet(Stream::empty)) .collect(Collectors.toList()); } FilterRepository();   }### Answer:
@Test public void getFilterCollectionShouldReturnEmptyListForEmptyRepository() { final Collection<BlockFilter> filters = repository.getFiltersOfType(BlockFilter.class); assertThat(filters).isEmpty(); }