@Test
    void verifyAllowsAccessToHighSecurityServiceWithPasswordAndOTPViaRenew() throws Throwable {
        val ctx2 = processAuthenticationAttempt(HIGH_SERVICE, newUserPassCredentials(ALICE, ALICE),
            new OneTimePasswordCredential(ALICE, PASSWORD_31415));

        val tgt = cas.createTicketGrantingTicket(ctx2);
        assertNotNull(tgt);

        val st = cas.grantServiceTicket(tgt.getId(), HIGH_SERVICE, ctx2);

        assertNotNull(st);
        /*
         * Confirm the authentication in the assertion
         * is the one that satisfies security policy
         */
        val assertion = cas.validateServiceTicket(st.getId(), HIGH_SERVICE);
        val authn = assertion.getPrimaryAuthentication();
        assertEquals(2, authn.getSuccesses().size());
        assertTrue(authn.getSuccesses().containsKey(AcceptUsersAuthenticationHandler.class.getSimpleName()));
        assertTrue(authn.getSuccesses().containsKey(TestOneTimePasswordAuthenticationHandler.class.getSimpleName()));
        assertTrue(authn.containsAttribute(AuthenticationHandler.SUCCESSFUL_AUTHENTICATION_HANDLERS));
    }
High-level MFA functionality tests that leverage registered service metadata
to drive authentication policy.

@author Marvin S. Addison
@since 4.0.0
core/cas-server-core-webflow-mfa/src/test/java/org/apereo/cas/MultifactorAuthenticationTests.java