@Override
  public Future<?> schedule(Executor executor, Runnable command, long delay, TimeUnit unit) {
    requireNonNull(executor);
    requireNonNull(command);
    requireNonNull(unit);

    if (scheduledExecutorService.isShutdown()) {
      return DisabledFuture.INSTANCE;
    }
    return scheduledExecutorService.schedule(() -> {
      try {
        executor.execute(command);
      } catch (Throwable t) {
        logger.log(Level.WARNING, "Exception thrown when submitting scheduled task", t);
        throw t;
      }
    }, delay, unit);
  }
@Test(dataProvider = "runnableSchedulers")
  public void scheduler(Scheduler scheduler) {
    var executed = new AtomicBoolean();
    Runnable task = () -> executed.set(true);
    var future = scheduler.schedule(executor, task, 1L, TimeUnit.NANOSECONDS);
    assertThat(future).isNotNull();
    await().untilTrue(executed);
  }