private void populateSecurityContext(final MvcResult result) throws Exception {
        val requestContext = MockRequestContext.create(webApplicationContext);
        requestContext.setExternalContext(new ServletExternalContext(new MockServletContext(), result.getRequest(), result.getResponse()));
        WebUtils.putAuthentication(RegisteredServiceTestUtils.getAuthentication(), requestContext);
        populateSecurityContextAction.execute(requestContext);
    }
This is {@link WebAuthnControllerMvcTests}.

@author Misagh Moayyed
@since 7.0.0
support/cas-server-support-webauthn/src/test/java/org/apereo/cas/webauthn/web/WebAuthnControllerMvcTests.java