private void assertTargetHitsIsPropagatedInUserInput(String grammar) {
        URIBuilder builder = searchUri();
        builder.setParameter("yql",
                             "select * from sources * where {grammar: \"" + grammar + "\", targetHits: 17, defaultIndex: \"f\"}userInput(\"a test\")");
        Query query = searchAndAssertNoErrors(builder);
        assertEquals("select * from sources * where ({targetNumHits: 17}weakAnd(f contains \"a\", f contains \"test\"))", query.yqlRepresentation());
        WeakAndItem weakAnd = (WeakAndItem)query.getModel().getQueryTree().getRoot();
        assertEquals(17, weakAnd.getN());
    }
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