@Override
        public Result search(Query query, Execution execution) {
            int count = 10;
            List<FutureResult> futures = new ArrayList<>(count);
            for (int i = 0; i < count; i++) {
                Query subQuery = query.clone();
                FutureResult future = new AsyncExecution(execution).search(subQuery);
                futures.add(future);
            }
            AsyncExecution.waitForAll(futures, 10 * 60 * 1000);
            Result combinedResult = new Result(query);
            for (FutureResult resultFuture : futures) {
                Result result = resultFuture.get();
                combinedResult.mergeWith(result);
                combinedResult.hits().add(result.hits());
            }
            return combinedResult;
        }
Tests async execution of search chains.

@author Peter Thomas
@author bratseth
container-search/src/test/java/com/yahoo/search/searchchain/VespaAsyncSearcherTest.java