public Bson createDbQuery(final List<String> filters, final String query) {
        try {
            final var searchQuery = searchQueryParser.parse(query);
            final var filterExpressionFilters = dbFilterParser.parse(filters, attributes);
            return buildDbQuery(searchQuery, filterExpressionFilters);
        } catch (IllegalArgumentException e) {
            throw new BadRequestException("Invalid argument in search query: " + e.getMessage());
        }
    }
@Test
    void throwsBadRequestExceptionIfSearchQueryParserThrowsIllegalArgumentException() {
        doThrow(IllegalArgumentException.class).when(searchQueryParser).parse(eq("wrong #$%#$%$ query"));

        assertThrows(BadRequestException.class, () -> toTest.createDbQuery(List.of(), "wrong #$%#$%$ query"));
    }