CompositeRetryListener implements RetryListener { @Override public void onRetry(final RequestArguments arguments, final ExecutionAttemptedEvent<ClientHttpResponse> event) { listeners.forEach(listener -> listener.onRetry(arguments, event)); } CompositeRetryListener(final RetryListener... listeners); @Override void onRetry(final RequestArguments arguments,
            final ExecutionAttemptedEvent<ClientHttpResponse> event);  }
@Test void shouldPropagateRetryToEveryListener() { final AtomicBoolean success = new AtomicBoolean(false); final RequestArguments arguments = RequestArguments.create(); final IllegalStateException exception = new IllegalStateException(); Failsafe.with(new RetryPolicy<ClientHttpResponse>() .withMaxRetries(3) .onRetry(new RetryRequestPolicy.RetryListenerAdapter(unit, arguments))) .run(() -> { if (!success.getAndSet(true)) { throw exception; } }); verify(first).onRetry(eq(arguments), argThat(hasFeature(ExecutionAttemptedEvent::getLastResult, nullValue()))); verify(first).onRetry(eq(arguments), argThat(hasFeature(ExecutionAttemptedEvent::getLastFailure, notNullValue()))); verify(second).onRetry(eq(arguments), argThat(hasFeature(ExecutionAttemptedEvent::getLastResult, nullValue()))); verify(second).onRetry(eq(arguments), argThat(hasFeature(ExecutionAttemptedEvent::getLastFailure, notNullValue()))); }