protected MockRequestContext buildRequestContextFor(final String user, final String email,
                                                        final String phone) throws Exception {
        val attributes = new HashMap<String, List<Object>>();
        if (StringUtils.isNotBlank(email)) {
            attributes.put("mail", CollectionUtils.wrap(email));
        }
        if (StringUtils.isNotBlank(phone)) {
            attributes.put("phone", CollectionUtils.wrap(phone));
        }
        val principal = RegisteredServiceTestUtils.getPrincipal(user, attributes);
        return buildRequestContextFor(principal);
    }
This is {@link BaseCasSimpleMultifactorSendTokenActionTests}.

@author Misagh Moayyed
@since 6.4.0
support/cas-server-support-simple-mfa/src/test/java/org/apereo/cas/mfa/simple/web/flow/BaseCasSimpleMultifactorSendTokenActionTests.java