@Test public void getNextChaosTime () { final long Millis1 = 11240648L; final double Gauss1 = 0D; doReturn(Gauss1).when(random).nextGaussian(); doReturn(now.plusMillis(Millis1)).when(holidayManager).getInstantAfterWorkingMillis(any(Instant.class), eq(Millis1)); assertEquals(now.plusMillis(Millis1), scheduler.getNextChaosTime()); verify(holidayManager, times(1)).getInstantAfterWorkingMillis(any(Instant.class), eq(Millis1)); assertEquals(now.plusMillis(Millis1), scheduler.getNextChaosTime()); }
@Override public Instant getNextChaosTime () { if (nextChaosTime != null) return nextChaosTime; if (lastChaosTime != null) return calculateNextChaosTime(); return calculateFirstChaosTime(); }
ChaosScheduler implements Scheduler { @Override public Instant getNextChaosTime () { if (nextChaosTime != null) return nextChaosTime; if (lastChaosTime != null) return calculateNextChaosTime(); return calculateFirstChaosTime(); } }
ChaosScheduler implements Scheduler { @Override public Instant getNextChaosTime () { if (nextChaosTime != null) return nextChaosTime; if (lastChaosTime != null) return calculateNextChaosTime(); return calculateFirstChaosTime(); }  }
ChaosScheduler implements Scheduler { @Override public Instant getNextChaosTime () { if (nextChaosTime != null) return nextChaosTime; if (lastChaosTime != null) return calculateNextChaosTime(); return calculateFirstChaosTime(); }  static ChaosSchedulerBuilder builder(); @Override Instant getNextChaosTime(); @Override void startExperiment(); }
ChaosScheduler implements Scheduler { @Override public Instant getNextChaosTime () { if (nextChaosTime != null) return nextChaosTime; if (lastChaosTime != null) return calculateNextChaosTime(); return calculateFirstChaosTime(); }  static ChaosSchedulerBuilder builder(); @Override Instant getNextChaosTime(); @Override void startExperiment();  }