@Test public void testBackOffs() { long[] backOffs = new ExponentialBackOffTimesPolicy().getBackOffTimeoutsInMillis(); assertNotNull(backOffs); assertTrue(backOffs.length % 2 == 0); int couples = backOffs.length / 2; long lastEventValue = BackOffTimesPolicy.MIN_TIME_TO_BACK_OFF_IN_MILLS; for (int i = 0; i < couples; ++i) { if (i % 2 == 0) { assertEquals(BackOffTimesPolicy.MIN_TIME_TO_BACK_OFF_IN_MILLS, backOffs[i]); } else { assertThat(lastEventValue, lessThan(backOffs[i])); lastEventValue = backOffs[i]; } } }
@Override public long[] getBackOffTimeoutsInMillis() { return s_exponentialBackOffInMillis; }
ExponentialBackOffTimesPolicy implements BackOffTimesPolicy { @Override public long[] getBackOffTimeoutsInMillis() { return s_exponentialBackOffInMillis; } }
ExponentialBackOffTimesPolicy implements BackOffTimesPolicy { @Override public long[] getBackOffTimeoutsInMillis() { return s_exponentialBackOffInMillis; }  }
ExponentialBackOffTimesPolicy implements BackOffTimesPolicy { @Override public long[] getBackOffTimeoutsInMillis() { return s_exponentialBackOffInMillis; }  @Override long[] getBackOffTimeoutsInMillis(); }
ExponentialBackOffTimesPolicy implements BackOffTimesPolicy { @Override public long[] getBackOffTimeoutsInMillis() { return s_exponentialBackOffInMillis; }  @Override long[] getBackOffTimeoutsInMillis();  }