@Override
  public Future<@Nullable ?> submit(Runnable command) {
    if (command == null) {
      throw new NullPointerException();
    }
    ScheduledFutureTask<Void> task = new ScheduledFutureTask<>(command, null, triggerTime(0));
    threadPoolExecutor.execute(task);
    return task;
  }
@Test
  public void testSubmit() throws Exception {
    List<AtomicInteger> callCounts = new ArrayList<>();
    List<ScheduledFutureTask<?>> futures = new ArrayList<>();

    FastNanoClockAndSleeper fastNanoClockAndSleeper = new FastNanoClockAndSleeper();
    UnboundedScheduledExecutorService executorService =
        new UnboundedScheduledExecutorService(fastNanoClockAndSleeper);

    callCounts.add(new AtomicInteger());
    futures.add(
        (ScheduledFutureTask<?>)
            executorService.submit(
                (Runnable) callCounts.get(callCounts.size() - 1)::incrementAndGet));
    callCounts.add(new AtomicInteger());
    futures.add(
        (ScheduledFutureTask<?>)
            executorService.submit(
                callCounts.get(callCounts.size() - 1)::incrementAndGet, "Result"));
    callCounts.add(new AtomicInteger());
    futures.add(
        (ScheduledFutureTask<?>)
            executorService.submit(callCounts.get(callCounts.size() - 1)::incrementAndGet));

    assertNull(futures.get(0).get());
    assertEquals("Result", futures.get(1).get());
    assertEquals(1, futures.get(2).get());

    for (int i = 0; i < callCounts.size(); ++i) {
      assertFalse(futures.get(i).isPeriodic());
      assertEquals(1, callCounts.get(i).get());
    }
  }