public SearchJob executeSync(String searchId, SearchUser searchUser, ExecutionState executionState) {
        return searchDomain.getForUser(searchId, searchUser)
                .map(s -> executeSync(s, searchUser, executionState))
                .orElseThrow(() -> new NotFoundException("No search found with id <" + searchId + ">."));
    }
@Test
    void appliesQueryStringDecorators() {
        final SearchUser searchUser = TestSearchUser.builder()
                .allowStream("foo")
                .build();
        final Search search = Search.builder()
                .queries(ImmutableSet.of(
                        Query.builder()
                                .query(ElasticsearchQueryString.of("*"))
                                .build()
                ))
                .build();

        final SearchJob searchJob = this.searchExecutor.executeSync(search, searchUser, ExecutionState.empty());

        assertThat(searchJob.getSearch().queries())
                .are(new Condition<>(query -> query.query().queryString().equals("decorated"), "Query string is decorated"));
    }