private static <T> Optional<T> getBean(final String name, final Class<T> clazz) {
        return getBean(APPLICATION_CONTEXT, name, clazz);
    }
Gets bean.

@param <T>                the type parameter
@param applicationContext the application context
@param name               the name
@param clazz              the clazz
@return the bean
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/spring/ApplicationContextProvider.java