public void assertGramsWithSegmentation(Chain<Searcher> chain) {
        // "first" "second" and "third" are segments in the "test" language
        Item item = parseQuery("gram14:firstsecondthird", Query.Type.ANY);
        Query q = new Query("?query=ignored");
        q.getModel().setLanguage(Language.UNKNOWN);
        q.getModel().getQueryTree().setRoot(item);
        new Execution(chain, createContextStub(createIndexFacts())).search(q);
        assertEquals("AND gram14:firstsecondthi gram14:irstsecondthir gram14:rstsecondthird", q.getModel().getQueryTree().toString());
    }
Note that single-term phrases are simplified to just the term at parse time,
so the ngram rewriter cannot know to keep the grams as a phrase in this case.
container-search/src/test/java/com/yahoo/search/querytransform/test/NGramSearcherTestCase.java