public static <T extends BaseWebBasedRegisteredService> T getRegisteredService(final String id, final Class<T> clazz) {
        return getRegisteredService(id, clazz, true);
    }
Gets web application service factory.

@return the web application service factory
core/cas-server-core-services/src/test/java/org/apereo/cas/services/RegisteredServiceTestUtils.java