public static <T> RetryTransformer<T> of(Retry retry) {
        return new RetryTransformer<>(retry);
    }
@Test
    public void doNotRetryFromPredicateUsingMaybe() {
        RetryConfig config = RetryConfig.custom()
            .retryOnException(t -> t instanceof IOException)
            .waitDuration(Duration.ofMillis(50))
            .maxAttempts(3).build();
        Retry retry = Retry.of("testName", config);
        given(helloWorldService.returnHelloWorld())
            .willThrow(new HelloWorldException());

        Maybe.fromCallable(helloWorldService::returnHelloWorld)
            .compose(RetryTransformer.of(retry))
            .test()
            .assertError(HelloWorldException.class)
            .assertNotComplete()
            .assertSubscribed();

        then(helloWorldService).should().returnHelloWorld();

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