ExecutorEventScheduler extends TypedEventScheduler { public int getQueueSize() { return executor.getQueue().size(); } @Deprecated  ExecutorEventScheduler(TimeProvider timeProvider, String name, boolean daemon, EventSchedulerType type);  ExecutorEventScheduler(TimeUnit timeUnit, String name, boolean daemon, EventSchedulerType type);  ExecutorEventScheduler(UtcTimeProvider timeProvider, String name, boolean daemon, EventSchedulerType type); @Override Cancelable doNow(Runnable r, String description); @Override Cancelable doAt(double time, Runnable r, String description, boolean isDaemon); @Override boolean hasOnlyDaemonEvents(); @Override void cancel(Event e); @Override void stop(); boolean isStopped(); @Override TimeProvider getTimeProvider(); @Override long getThreadId(); int getQueueSize(); void registerFailureListener(Consumer<Throwable> failureListener); void registerOnShutDown(Runnable onShutDown);  }
@Test void testGetQueueSize() { Assertions.assertEquals(0, scheduler.getQueueSize()); scheduler.doAt(1000, Runnables.doNothing()); Assertions.assertEquals(1, scheduler.getQueueSize()); }