@Test
public void executeAsyncCall_calls_delegate_with_future_that_provides_converted_event_and_returns_future_that_provides_original_event() {

    // given
    CircuitBreaker<String> delegateCbSpy = spy(new CircuitBreakerImpl<>());
    CircuitBreakerDelegate<Integer, String> wrapperCb = new CircuitBreakerDelegate<>(delegateCbSpy, eventConverter);
    int event = 42;
    Supplier<CompletableFuture<Integer>> wrapperFutureSupplier = () -> CompletableFuture.completedFuture(event);
    // when
    CompletableFuture<Integer> wrapperCallResult = wrapperCb.executeAsyncCall(wrapperFutureSupplier);
    // then
    ArgumentCaptor<Supplier> delegateCallArgumentCaptor = ArgumentCaptor.forClass(Supplier.class);
    verify(delegateCbSpy).executeAsyncCall(delegateCallArgumentCaptor.capture());
    Supplier<CompletableFuture<String>> delegateFutureSupplier = delegateCallArgumentCaptor.getValue();
    assertThat(wrapperCallResult.join()).isEqualTo(event);
    assertThat(delegateFutureSupplier.get().join()).isEqualTo(eventConverter.apply(event));
}