public static <T> RetryOperator<T> of(Retry retry) {
        return new RetryOperator<>(retry);
    }
@Test
    public void returnOnCompleteUsingMono() {
        RetryConfig config = retryConfig();
        Retry retry = Retry.of("testName", config);
        RetryOperator<String> retryOperator = RetryOperator.of(retry);
        given(helloWorldService.returnHelloWorld())
            .willReturn("Hello world")
            .willThrow(new HelloWorldException())
            .willThrow(new HelloWorldException())
            .willReturn("Hello world");

        StepVerifier.create(Mono.fromCallable(helloWorldService::returnHelloWorld)
            .transformDeferred(retryOperator))
            .expectNext("Hello world")
            .expectComplete()
            .verify(Duration.ofSeconds(1));
        StepVerifier.create(Mono.fromCallable(helloWorldService::returnHelloWorld)
            .transformDeferred(retryOperator))
            .expectNext("Hello world")
            .expectComplete()
            .verify(Duration.ofSeconds(1));

        then(helloWorldService).should(times(4)).returnHelloWorld();
        Retry.Metrics metrics = retry.getMetrics();
        assertThat(metrics.getNumberOfSuccessfulCallsWithoutRetryAttempt()).isEqualTo(1);
        assertThat(metrics.getNumberOfSuccessfulCallsWithRetryAttempt()).isEqualTo(1);
        assertThat(metrics.getNumberOfFailedCallsWithRetryAttempt()).isZero();
        assertThat(metrics.getNumberOfFailedCallsWithoutRetryAttempt()).isZero();
    }