verify(clock, times(0)).switchToSimulatedTime(); model.afterTick(TimeLapseFactory.ms(0, 100)); final long start = System.nanoTime(); while (model.manager.isComputing()) { verify(clock, times(0)).switchToSimulatedTime(); model.manager.checkExceptions(); model.afterTick(TimeLapseFactory.ms(100, 200)); try { Thread.sleep(10); assertThat(duration).isIn(Range.open(0.9, 1.1)); model.afterTick(TimeLapseFactory.ms(100, 200)); verify(clock, times(3)).switchToRealTime(); verify(clock, times(0)).switchToSimulatedTime(); model.afterTick(TimeLapseFactory.ms(200, 300)); verify(clock, times(3)).switchToRealTime(); verify(clock, times(1)).switchToSimulatedTime();