ConstantRetryStrategy extends RetryStrategy { @Override public int getNextIntervalMillis(int retryCount) { return config.getRetryIntervalMillis(); } ConstantRetryStrategy(Config config); @Override int getNextIntervalMillis(int retryCount); @Override String toString();  }
@Test void testGetNextIntervalMillis() { ConstantRetryStrategy.Config config = new ConstantRetryStrategy.Config(); config.setRetryIntervalMillis(600); config.setMaxRetryCount(6); RetryStrategy strategy = new ConstantRetryStrategy(config); assertEquals(600, strategy.getNextIntervalMillis(0)); assertEquals(600, strategy.getNextIntervalMillis(1)); assertEquals(600, strategy.getNextIntervalMillis(2)); assertEquals(600, strategy.getNextIntervalMillis(6)); assertFalse(strategy.isRetriedOver(6)); assertEquals(600, strategy.getNextIntervalMillis(7)); assertTrue(strategy.isRetriedOver(7)); }