public Collection<ViewParameterSummaryDTO> forValue() {
        final Set<String> searches = viewService.streamAll()
                .map(ViewDTO::searchId)
                .collect(Collectors.toSet());
        final Map<String, Search> qualifyingSearches = this.searchDbService.findByIds(searches).stream()
                .filter(search -> !search.parameters().isEmpty())
                .collect(Collectors.toMap(Search::id, Functions.identity()));

        return viewService.streamAll()
                .filter(view -> qualifyingSearches.keySet().contains(view.searchId()))
                .map(view -> ViewParameterSummaryDTO.create(view, qualifyingSearches.get(view.searchId())))
                .collect(Collectors.toSet());
    }
@Test
    public void returnEmptyListWhenNoSearchesWithParametersArePresent() {
        final ViewDTO view1 = createView("a-view", "viewWithParameter");

        final Search search = Search.builder()
                .parameters(ImmutableSet.of())
                .build();

        final QualifyingViewsService service = new QualifyingViewsService(mockSearchService(search), mockViewService(view1));
        final Collection<ViewParameterSummaryDTO> result = service.forValue();

        assertThat(result).isEmpty();
    }