public static <T> RetryTransformer<T> of(Retry retry) {
        return new RetryTransformer<>(retry);
    }
@Test
    public void returnOnCompleteUsingFlowable() throws InterruptedException {
        RetryConfig config = retryConfig();
        Retry retry = Retry.of("testName", config);
        RetryTransformer<Object> retryTransformer = RetryTransformer.of(retry);
        given(helloWorldService.returnHelloWorld())
            .willThrow(new HelloWorldException());

        Flowable.fromCallable(helloWorldService::returnHelloWorld)
            .compose(retryTransformer)
            .test()
            .await()
            .assertError(HelloWorldException.class)
            .assertNotComplete()
            .assertSubscribed();

        Flowable.fromCallable(helloWorldService::returnHelloWorld)
            .compose(retryTransformer)
            .test()
            .await()
            .assertError(HelloWorldException.class)
            .assertNotComplete()
            .assertSubscribed();

        then(helloWorldService).should(times(6)).returnHelloWorld();
        Retry.Metrics metrics = retry.getMetrics();
        assertThat(metrics.getNumberOfFailedCallsWithRetryAttempt()).isEqualTo(2);
        assertThat(metrics.getNumberOfFailedCallsWithoutRetryAttempt()).isZero();
    }