@Override
    public <T> Mono<T> run(final Mono<T> run, final Function<Throwable, Mono<T>> fallback, final Resilience4JConf resilience4JConf) {
        RateLimiter rateLimiter = Resilience4JRegistryFactory.rateLimiter(resilience4JConf.getId(), resilience4JConf.getRateLimiterConfig());
        CircuitBreaker circuitBreaker = Resilience4JRegistryFactory.circuitBreaker(resilience4JConf.getId(), resilience4JConf.getCircuitBreakerConfig());
        final Duration timeoutDuration = resilience4JConf.getTimeLimiterConfig().getTimeoutDuration();
        Mono<T> to = run.transformDeferred(CircuitBreakerOperator.of(circuitBreaker))
                .transformDeferred(RateLimiterOperator.of(rateLimiter))
                .timeout(timeoutDuration, Mono.error(() -> new TimeoutException("Response took longer than timeout: " + timeoutDuration)))
                .doOnError(TimeoutException.class, t -> circuitBreaker.onError(
                        resilience4JConf.getTimeLimiterConfig().getTimeoutDuration().toMillis(),
                        TimeUnit.MILLISECONDS,
                        t));
        if (Objects.nonNull(fallback)) {
            to = to.onErrorResume(fallback);
        }
        return to;
    }
@Test
    public void fallbackUriTest() {
        Resilience4JConf conf = mock(Resilience4JConf.class);
        when(conf.getId()).thenReturn("SHENYU");
        when(conf.getRateLimiterConfig()).thenReturn(RateLimiterConfig.ofDefaults());
        when(conf.getTimeLimiterConfig()).thenReturn(TimeLimiterConfig.ofDefaults());
        when(conf.getCircuitBreakerConfig()).thenReturn(CircuitBreakerConfig.ofDefaults());

        ServerWebExchange exchange = MockServerWebExchange.from(MockServerHttpRequest.get("localhost").build());

        StepVerifier.create(combinedExecutor.run(Mono.error(new RuntimeException()), t -> combinedExecutor.fallback(exchange, UriUtils.createUri("https://example.com"), t),
                        conf))
                .expectSubscription()
                .expectComplete()
                .verify();

        assertEquals(HttpStatus.FOUND, exchange.getResponse().getStatusCode());
        assertEquals("https://example.com", exchange.getResponse().getHeaders().getLocation().toString());
    }