public static <T> RetryOperator<T> of(Retry retry) {
        return new RetryOperator<>(retry);
    }
@Test
    public void retryOnResultFailAfterMaxAttemptsWithExceptionUsingMono() {
        RetryConfig config = RetryConfig.<String>custom()
            .retryOnResult("retry"::equals)
            .waitDuration(Duration.ofMillis(10))
            .maxAttempts(3)
            .failAfterMaxAttempts(true)
            .build();
        Retry retry = Retry.of("testName", config);
        given(helloWorldService.returnHelloWorld())
            .willReturn("retry");

        StepVerifier.create(Mono.fromCallable(helloWorldService::returnHelloWorld)
            .transformDeferred(RetryOperator.of(retry)))
            .expectSubscription()
            .expectError(MaxRetriesExceededException.class)
            .verify(Duration.ofSeconds(1));

        then(helloWorldService).should(times(3)).returnHelloWorld();
    }