public static <T> RetryTransformer<T> of(Retry retry) {
        return new RetryTransformer<>(retry);
    }
@Test(expected = StackOverflowError.class)
    public void shouldNotRetryUsingSingleStackOverFlow() {
        RetryConfig config = retryConfig();
        Retry retry = Retry.of("testName", config);
        given(helloWorldService.returnHelloWorld())
            .willThrow(new StackOverflowError("BAM!"));

        Single.fromCallable(helloWorldService::returnHelloWorld)
            .compose(RetryTransformer.of(retry))
            .test();

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