@Test
    void verifyOperation() throws Throwable {
        ApplicationContextProvider.holdApplicationContext(applicationContext);
        val context = MockRequestContext.create(applicationContext);
        WebUtils.putAuthentication(CoreAuthenticationTestUtils.getAuthentication(), context);
        val result = populateSpringSecurityContextAction.execute(context);
        assertNull(result);
        val sec = securityContextRepository.loadDeferredContext(context.getHttpServletRequest()).get();
        assertNotNull(sec);
        assertNotNull(sec.getAuthentication());
        assertTrue(securityContextRepository.containsContext(context.getHttpServletRequest()));
    }
This is {@link PopulateSpringSecurityContextActionTests}.

@author Misagh Moayyed
@since 6.4.0
support/cas-server-support-actions/src/test/java/org/apereo/cas/web/flow/PopulateSpringSecurityContextActionTests.java