@Test
    void requireThatGroupingStepsAreAttachedToQuery() {
        URIBuilder builder = new URIBuilder();
        builder.setPath("search/");

        builder.setParameter("yql", "select foo from bar where baz contains 'cox';");
        Query query = new Query(builder.toString());
        execution.search(query);
        assertEquals("baz:cox", query.getModel().getQueryTree().toString());
        assertGrouping("[]", query);

        assertEquals(1, query.getPresentation().getSummaryFields().size());
        assertEquals("foo", query.getPresentation().getSummaryFields().toArray(new String[1])[0]);

        builder.setParameter("yql", "select foo from bar where baz contains 'cox' " +
                "| all(group(a) each(output(count())))");
        query = new Query(builder.toString());
        execution.search(query);
        assertEquals("baz:cox", query.getModel().getQueryTree().toString());
        assertGrouping("[[]all(group(a) each(output(count())))]", query);

        builder.setParameter("yql", "select foo from bar where baz contains 'cox' " +
                "| all(group(a) each(output(count()))) " +
                "| all(group(b) each(output(count())))");
        query = new Query(builder.toString());
        execution.search(query);
        assertEquals("baz:cox", query.getModel().getQueryTree().toString());
        assertGrouping("[[]all(group(a) each(output(count())))," +
                " []all(group(b) each(output(count())))]", query);
    }
Smoke test for first generation YQL+ integration.
container-search/src/test/java/com/yahoo/search/yql/MinimalQueryInserterTestCase.java