@Test
    void test() {
        Chain<Searcher> searchChain = makeSearchChain("{1: 2}", new JSONDebugSearcher());
        Execution e = new Execution(searchChain, Execution.Context.createContextStub());
        e.search(new Query(NODUMPJSON));
        Trace t = e.trace();
        LookForJson visitor = new LookForJson();
        t.accept(visitor);
        assertFalse(visitor.gotJson);
        e = new Execution(searchChain, Execution.Context.createContextStub());
        e.search(new Query(DUMPJSON));
        t = e.trace();
        t.accept(visitor);
        assertTrue(visitor.gotJson);
    }
Visit the trace and check JSON payload is stored there when requested.

@author Steinar Knutsen
container-search/src/test/java/com/yahoo/prelude/searcher/test/JSONDebugSearcherTestCase.java