@Test
    void testContextCacheSingleLengthSearchChain() {
        IndexFacts[] contextsBefore = new IndexFacts[1];
        IndexFacts[] contextsAfter = new IndexFacts[1];
        List<Searcher> l = new ArrayList<>(1);
        l.add(new ContextCacheSearcher(0, contextsBefore, contextsAfter));
        Chain<Searcher> chain = new Chain<>(l);
        Query query = new Query("?mutatecontext=0");
        new Execution(chain, Execution.Context.createContextStub()).search(query);
        assertEquals(contextsBefore[0], contextsAfter[0]);
        assertSame(contextsBefore[0], contextsAfter[0]);
    }
Tests basic search chain execution functionality

@author bratseth
container-search/src/test/java/com/yahoo/search/searchchain/test/ExecutionTestCase.java