@Test
        void verifyOperation() throws Throwable {
            val context = MockRequestContext.create(applicationContext);
            val authentication = RegisteredServiceTestUtils.getAuthentication(
                RegisteredServiceTestUtils.getPrincipal(Map.of("email", List.of("casuser@example.org"))));
            WebUtils.putAuthentication(authentication, context);
            WebUtils.putAuthenticationResult(RegisteredServiceTestUtils.getAuthenticationResult(authentication.getPrincipal().getId()), context);
            WebUtils.putRegisteredService(context, RegisteredServiceTestUtils.getRegisteredService());
            val provider = MultifactorAuthenticationUtils.getMultifactorAuthenticationProviderById(
                DuoSecurityMultifactorAuthenticationProperties.DEFAULT_IDENTIFIER, applicationContext).orElseThrow();
            MultifactorAuthenticationWebflowUtils.putMultifactorAuthenticationProvider(context, provider);
            val result = duoUniversalPromptPrepareLoginAction.execute(context);
            assertNotNull(result);
            val sessionStorage = (BrowserStorage) result.getAttributes().get("result");
            assertNotNull(sessionStorage);

            val request = new URIBuilder(sessionStorage.getDestinationUrl()).getFirstQueryParam("request").getValue();
            val duoUsername = SignedJWT.parse(request).getJWTClaimsSet().getStringClaim("duo_uname");
            assertEquals("casuser@example.org", duoUsername);
            assertTrue(context.getFlowScope().contains("duoUniversalPromptLoginUrl"));
        }
This is {@link DuoSecurityUniversalPromptPrepareLoginActionTests}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-duo/src/test/java/org/apereo/cas/adaptors/duo/web/flow/action/DuoSecurityUniversalPromptPrepareLoginActionTests.java