@Override
        public Result search(Query query, Execution execution) {
            String s = query.properties().getString("mutatecontext");
            Set<Integer> indexSet = new HashSet<>();
            for (String num : s.split(",")) {
                indexSet.add(Integer.valueOf(num));
            }

            if (indexSet.contains(index)) {
                execution.context().setIndexFacts(new IndexFacts());
            }
            contextsBefore[index] = execution.context().getIndexFacts();
            Result r =  execution.search(query);
            contextsAfter[index] = execution.context().getIndexFacts();
            return r;
        }
Tests basic search chain execution functionality

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