public static Authentication getAuthentication(final String principal, final AuthenticationHandler handler,
                                                   final Credential credential, final Map<String, List<Object>> attributes) {
        return new DefaultAuthenticationBuilder(getPrincipal(principal))
            .addCredential(credential)
            .addSuccess(handler.getName(), new DefaultAuthenticationHandlerExecutionResult(handler, credential))
            .setAttributes(attributes)
            .build();
    }
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