@Test
    void testIllegalGrammar() {
        URIBuilder builder = searchUri();
        builder.setParameter("yql", "select * from sources * where {grammar: \"nonesuch\"}userInput('foo bar')");
        Query query = new Query(builder.toString());
        Result r = execution.search(query);
        assertNotNull(r.hits().getError());
        assertEquals("Could not create query from YQL: No query type 'nonesuch'",
                r.hits().getError().getDetailedMessage());
    }
Tests where you really test YqlParser but need the full Query infrastructure.

@author steinar
container-search/src/test/java/com/yahoo/search/yql/UserInputTestCase.java