@Override
    public String resolve(Method method, Object[] arguments, String spelExpression) {
        if (StringUtils.isEmpty(spelExpression)) {
            return spelExpression;
        }

        if (spelExpression.matches(PLACEHOLDER_SPEL_REGEX) && stringValueResolver != null) {
            return stringValueResolver.resolveStringValue(spelExpression);
        }

        if (spelExpression.matches(METHOD_SPEL_REGEX)) {
            SpelRootObject rootObject = new SpelRootObject(method, arguments);
            MethodBasedEvaluationContext evaluationContext = new MethodBasedEvaluationContext(rootObject, method, arguments, parameterNameDiscoverer);
            Object evaluated = expressionParser.parseExpression(spelExpression).getValue(evaluationContext);

            return (String) evaluated;
        }

        if (spelExpression.matches(BEAN_SPEL_REGEX)) {
            SpelRootObject rootObject = new SpelRootObject(method, arguments);

            MethodBasedEvaluationContext evaluationContext = new MethodBasedEvaluationContext(rootObject, method, arguments, parameterNameDiscoverer);
            evaluationContext.setBeanResolver(new BeanFactoryResolver(this.beanFactory));

            Object evaluated = expressionParser.parseExpression(spelExpression).getValue(evaluationContext);

            return (String) evaluated;
        }

        return spelExpression;
    }
@Test
    public void testRootClassName() throws Exception {
        String testExpression = "#root.className";

        DefaultSpelResolverTest target = new DefaultSpelResolverTest();
        Method testMethod = target.getClass().getMethod("testMethod", String.class);

        String result = sut.resolve(testMethod, new Object[]{}, testExpression);

        assertThat(result).isEqualTo("io.github.resilience4j.spring6.spelresolver.DefaultSpelResolverTest");
    }