public static <T> RetryOperator<T> of(Retry retry) {
        return new RetryOperator<>(retry);
    }
@Test
    public void shouldFailWithExceptionFlux() {
        RetryConfig config = retryConfig();
        Retry retry = Retry.of("testName", config);
        RetryOperator<Object> retryOperator = RetryOperator.of(retry);

        StepVerifier.create(Flux.error(new HelloWorldException())
            .transformDeferred(retryOperator))
            .expectSubscription()
            .expectError(HelloWorldException.class)
            .verify(Duration.ofSeconds(1));

        Retry.Metrics metrics = retry.getMetrics();
        assertThat(metrics.getNumberOfSuccessfulCallsWithoutRetryAttempt()).isZero();
        assertThat(metrics.getNumberOfSuccessfulCallsWithRetryAttempt()).isZero();
        assertThat(metrics.getNumberOfFailedCallsWithRetryAttempt()).isEqualTo(1);
        assertThat(metrics.getNumberOfFailedCallsWithoutRetryAttempt()).isZero();
    }