    @Test
    public void retryOnResultFailAfterMaxAttemptsUsingFlowable() throws InterruptedException {

        RetryConfig config = RetryConfig.<String>custom()
            .retryOnResult("retry"::equals)
            .waitDuration(Duration.ofMillis(50))
            .maxAttempts(3).build();
        Retry retry = Retry.of("testName", config);
        given(helloWorldService.returnHelloWorld())
            .willReturn("retry");

        Flowable.fromCallable(helloWorldService::returnHelloWorld)
            .compose(RetryTransformer.of(retry))
            .test()
            .await()
            .assertValueCount(1)
            .assertValue("retry")
            .assertComplete();

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