@Test
    void testSimple() {
        Hit blockingHit = new Hit("blocking");
        Hit nonblockingHit = new Hit("nonblocking");
        BlockingBackendSearcher blockingSearcher  = new BlockingBackendSearcher(blockingHit);
        List<Searcher> searchers = new ArrayList<>();
        searchers.add(blockingSearcher);
        searchers.add(new TestingBackendSearcher(nonblockingHit));
        ClusterSearcher<?> provider = new SearcherClusterSearcher(new ComponentId("simple"), searchers, new SimpleHasher<>());

        Result blockingResult = new Execution(provider, Execution.Context.createContextStub()).search(new SimpleQuery(0));
        assertEquals(blockingHit, blockingResult.hits().get(0));
        Result nonblockingResult = new Execution(provider, Execution.Context.createContextStub()).search(new SimpleQuery(1));
        assertEquals(nonblockingHit, nonblockingResult.hits().get(0));

        blockingSearcher.setBlocking(true);

        blockingResult = new Execution(provider, Execution.Context.createContextStub()).search(new SimpleQuery(0));
        assertEquals(blockingResult.hits().get(0), nonblockingHit);
        nonblockingResult = new Execution(provider, Execution.Context.createContextStub()).search(new SimpleQuery(1));
        assertEquals(nonblockingResult.hits().get(0), nonblockingHit);
    }
A cluster searcher which clusters over a set of alternative searchers (search chains would be more realistic)
container-search/src/test/java/com/yahoo/search/cluster/test/ClusterSearcherTestCase.java