@Override
  public <T> Future<T> submit(final Callable<T> task) {
    ExecutorTask<T> execTask = new ExecutorTask<>(task::call);
    tasks.add(execTask);
    if (autoRun) {
      execTask.run();
    }

    return execTask.getFuture();
  }
Run pending futures in separate threads.

@param executorService the executor service
testutil/src/main/java/org/hyperledger/besu/testutil/MockExecutorService.java