ExceptionRetryHandler implements RetryHandler { public long getRetryInterval(int retryCount) { return schedule.getInterval(retryCount); } private  ExceptionRetryHandler();  ExceptionRetryHandler(Class<?>[] exceptionClasses, ExceptionRetryingProxy proxy, RetrySchedule schedule, int maxRetries); @Override Object perform(); @Override void postFailure(Exception ex, int retryCount); @Override abstract Object operation(); long getRetryInterval(int retryCount);  }
@Test void testGetRetryInterval() { ExceptionRetryHandler handler = new ExceptionRetryHandler( exceptionClasses, proxy, schedule, 0) { @Override public Object operation() { return null; } }; assertThat(handler.getRetryInterval(8)).isEqualTo(8); }