@Override
    public Map<String, PluginMetadataSummary> test(ViewDTO view) {
        final Optional<Search> optionalSearch = searchDbService.get(view.searchId());
        return optionalSearch.map(searchRequiresParameterSupport::test)
                .orElseThrow(() -> new IllegalStateException("Search " + view.searchId() + " for view " + view + " is missing."));
    }
@Test
    public void throwsExceptionIfSearchIsMissing() {
        when(searchDbService.get("searchId")).thenReturn(Optional.empty());

        assertThatThrownBy(() -> this.requiresParameterSupport.test(view))
                .isInstanceOf(IllegalStateException.class)
                .hasMessageStartingWith("Search searchId for view")
                .hasMessageEndingWith("is missing.");
    }