NonExecutingEventScheduler extends TypedEventScheduler { @Override public Cancelable doAt(double time, Runnable r, String description, boolean isDaemon) { Event event = new Event(time, description, r, this, isDaemon); events.add(event); return event; } NonExecutingEventScheduler(EventSchedulerType schedulerType, TimeProvider timeProvider); @Override TimeProvider getTimeProvider(); @Override Cancelable doNow(Runnable r, String description); @Override Cancelable doAt(double time, Runnable r, String description, boolean isDaemon); @Override long getThreadId(); @Override boolean hasOnlyDaemonEvents(); @Override void cancel(Event e); @Override void stop(); void executeAllEvents(); void executeOverdueEvents(); void reset();  }
@Test public void scheduledRunnablesNotExecutedAutomaticallyWhenTimeAdvances() { double delay = 20; eventScheduler.doAt(delay, runnable); timeProvider.advanceTime(delay + 1); Assertions.assertEquals(0, runnable.runCount()); }