@Test
public void testSimulatorExercisesRandomExponentialBackoff() {
SimpleRetryPolicy retryPolicy = new SimpleRetryPolicy();
retryPolicy.setMaxAttempts(5);
ExponentialBackOffPolicy backOffPolicy = new ExponentialRandomBackOffPolicy();
backOffPolicy.setMultiplier(2);
backOffPolicy.setMaxInterval(30000);
backOffPolicy.setInitialInterval(100);
RetrySimulator simulator = new RetrySimulator(backOffPolicy, retryPolicy);
RetrySimulation simulation = simulator.executeSimulation(10000);
System.out.println(backOffPolicy);
System.out.println("Longest sequence " + simulation.getLongestTotalSleepSequence());