@Test
    void testAsync() {
        List<Searcher> searchList = new ArrayList<>();
        searchList.add(new WaitingSearcher("one", 60000));
        searchList.add(new WaitingSearcher("two", 0));
        Chain<Searcher> searchChain = new Chain<>(new ComponentId("chain"), searchList);

        AsyncExecution asyncExecution = new AsyncExecution(searchChain, Execution.Context.createContextStub());
        FutureResult future = asyncExecution.search(new Query("?hits=0"));
        Result result = future.get(0, TimeUnit.MILLISECONDS);

        assertNotNull(result.hits().getError());
    }
Test for aynchrounous execution

@author Arne Bergene Fossaa
container-search/src/test/java/com/yahoo/search/searchchain/AsyncExecutionTestCase.java