public static Principal getPrincipal(final String name, final Map<String, List<Object>> attributes) throws Throwable {
        return PrincipalFactoryUtils.newPrincipalFactory().createPrincipal(name, attributes);
    }
This is {@link CoreAttributesTestUtils}.

@author Misagh Moayyed
@since 5.2.0
core/cas-server-core-authentication-attributes/src/test/java/org/apereo/cas/CoreAttributesTestUtils.java