public static Authentication getAuthentication(final Principal principal, final Map<String, List<Object>> attributes) {
        val handler = new SimpleTestUsernamePasswordAuthenticationHandler();
        val credential = new UsernamePasswordCredential();
        return new DefaultAuthenticationBuilder(principal)
            .addCredential(credential)
            .addSuccess("testHandler", 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