### Question:
FilterRepository { <T extends Filter> Optional<T> getFilter(final String filterId, final Class<T> filterClass) { final Filter filter = filters.get(filterId); return getIfTypeMatches(filter, filterClass); } FilterRepository();   }### Answer:
@Test public void getSingleFilterShouldReturnEmptyForEmptyRepository() { final Optional<BlockFilter> optional = repository.getFilter("id", BlockFilter.class); assertThat(optional.isPresent()).isFalse(); }