@Test
    void testNullQuery() {
        Logger.getLogger(IndexedBackend.class.getName()).setLevel(Level.ALL);
        IndexedBackend fastSearcher = new IndexedBackend(CLUSTER_PARAMS, MockDispatcher.create(List.of()));

        String query = "?junkparam=ignored";
        Result result = doSearch(fastSearcher, new Query(query), 0, 10);
        ErrorMessage message = result.hits().getError();

        assertNotNull(message, "Got error");
        assertEquals("Null query", message.getMessage());
        assertEquals(query, message.getDetailedMessage());
        assertEquals(Error.NULL_QUERY.code, message.getCode());
    }
Tests the Fast searcher

@author bratseth
container-search/src/test/java/com/yahoo/prelude/fastsearch/IndexedBackendTestCase.java