@Test
public void whenCancelled_thenRunnableDoesNotRunAgain() {

    ArrayList<Double> executionTimes = new ArrayList<>();
    simpleDiscreteEventScheduler.pause();
    Cancelable cancelable = RepeatingRunnable.startIn(0, 1, "Test Event", executionTimes::add, simpleDiscreteEventScheduler);
    simpleDiscreteEventScheduler.doAt(10, cancelable::cancel);
    simpleDiscreteEventScheduler.doAt(100, simpleDiscreteEventScheduler::stop); // Don't run indefinitely if someone breaks the functionality
    simpleDiscreteEventScheduler.unPause();
    Assertions.assertEquals(10, executionTimes.size());
}