@Test
    void testNGramRecombining() {
        Query q = new Query("?query=ignored");
        Result r = new Execution(new Chain<>(createSearcher(), new MockBackend1()), createContextStub(createIndexFacts())).search(q);
        Hit h1 = r.hits().get("hit1");
        assertEquals("Should be untouched,\u001feven if containing \u001f",
                     h1.getField("test").toString());
        assertInstanceOf(String.class, h1.getField("test"));

        assertEquals("Blue red Ed A", h1.getField("gram2").toString());
        assertInstanceOf(XMLString.class, h1.getField("gram2"));

        assertEquals("Blue red ed a\u001f",
                     h1.getField("gram3").toString(),
                     "Separators on borders work");
        assertInstanceOf(String.class, h1.getField("gram3"));

        Hit h2 = r.hits().get("hit2");
        assertEquals("katt  i...morgen", h2.getField("gram3").toString());
        assertInstanceOf(JSONString.class, h2.getField("gram3"));

        Hit h3 = r.hits().get("hit3");
        assertEquals("\u001ffin\u001f \u001fen\u001f \u001fa\u001f", h3.getField("gram2").toString());
        assertEquals("#Logging in #Java is like that \"Judean P\u001fopul\u001far Front\" scene from \"Life of Brian\".",
                     h3.getField("gram3").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