public static <T> T instantiate(
            final String className, final Class<T> targetType, final ClassLoader classLoader)
            throws FlinkException {
        final Class<? extends T> clazz;
        try {
            clazz = Class.forName(className, false, classLoader).asSubclass(targetType);
        } catch (ClassNotFoundException e) {
            throw new FlinkException(
                    String.format(
                            "Could not instantiate class '%s' of type '%s'. Please make sure that this class is on your class path.",
                            className, targetType.getName()),
                    e);
        }

        return instantiate(clazz);
    }
@Test
    void testInstantiationOfStringValueAndCastToValue() {
        Object stringValue = InstantiationUtil.instantiate(StringValue.class, Value.class);
        assertThat(stringValue).isNotNull();
    }