public static <T> Class<? extends T> convertStringToClassType(String className, Class<? extends T> targetClassType) {
        try {
            Class<?> clazz = Class.forName(className);
            if (!targetClassType.isAssignableFrom(clazz)){
                throw new ConfigParseException("Class " + className + " is not a subclass of " + targetClassType.getName());
            }
            return (Class<? extends T>) clazz;
        } catch (ClassNotFoundException e) {
            throw new ConfigParseException("Class not found: " + className, e);
        }
    }
@Test
    public void testConvertPredicate() {
        String predicateString = "io.github.resilience4j.commons.configuration.dummy.DummyPredicateThrowable";

        Class<Predicate<Throwable>> clazz = (Class<Predicate<Throwable>>) ClassParseUtil.convertStringToClassType(predicateString, Predicate.class);

        Assertions.assertThat(clazz).isEqualTo(DummyPredicateThrowable.class);
    }