@Test
public void shouldNotRunOnSuccess() {

  // given
  final int count = 3;
  final JustRetryFailoverHandler justRetryFailoverHandler = new JustRetryFailoverHandler(count,
      Time.of(100L, TimeUnit.MILLISECONDS));
  final AtomicInteger countDown = new AtomicInteger(count);
  final RequestMethod<String> requestMethod = new RequestMethod<String>() {
    @Getter
    protected final String name = randomUUID().toString();
    @Override
    protected String runInternal(List<Object> parameters) throws Exception {
      countDown.decrementAndGet();
      return null;
    }
  };
  // then
  final String expected = randomUUID().toString();
  final Response<String> response = Response.success(expected);
  final Response<String> handled = justRetryFailoverHandler
      .handle(new TestInvocation<>(requestMethod), response);
  assertEquals(expected, handled.getValue());
  assertEquals(count, countDown.get());
}