public static Principal getPrincipal(final String id, final Map<String, List<Object>> attributes) {
        val principal = mock(Principal.class);
        when(principal.getAttributes()).thenReturn(attributes);
        when(principal.getId()).thenReturn(id);
        return principal;
    }
This is {@link MultifactorAuthenticationTestUtils}.

@author Misagh Moayyed
@since 5.2.0
core/cas-server-core-authentication-mfa-api/src/test/java/org/apereo/cas/authentication/mfa/MultifactorAuthenticationTestUtils.java