public SearchBuilder query(QueryBuilder queryBuilder) {
        checkState(this.queryBuilder == null, "queryBuilder is already set");
        this.queryBuilder = requireNonNull(queryBuilder, "queryBuilder");
        return this;
    }
@Test
    public void searchQueryBuilderShouldNotBeSetMultipleTimes() {
        assertThrows(IllegalStateException.class, () -> {
            final BoolQueryBuilder queryBuilder = Query.bool();
            final SearchBuilder searchBuilder = Search.builder().query(queryBuilder);
            searchBuilder.query(Query.bool());
        });
    }