public Set<String> getReferencedSearchFiltersIds(final Collection<UsesSearchFilters> searchFiltersOwners) {
        return searchFiltersOwners
                .stream()
                .map(UsesSearchFilters::filters)
                .filter(Objects::nonNull)
                .flatMap(Collection::stream)
                .filter(usedSearchFilter -> usedSearchFilter instanceof ReferencedSearchFilter)
                .map(usedSearchFilter -> (ReferencedSearchFilter) usedSearchFilter)
                .map(ReferencedSearchFilter::id)
                .collect(Collectors.toSet());
    }
@Test
    void testGetReferencedSearchFiltersIdsReturnsEmptyCollectionOnOwnersWithoutFilters() {
        final Query query = TestData.validQueryBuilder().build();
        final WidgetDTO widget = WidgetDTO.builder().id("nvmd").type("nvmd").config(UnknownWidgetConfigDTO.create(Collections.emptyMap())).build();
        final Set<String> referencedSearchFiltersIds = toTest.getReferencedSearchFiltersIds(ImmutableSet.of(query, widget));
        assertTrue(referencedSearchFiltersIds.isEmpty());
    }