private MockRequestContext getMockRequestContext() throws Throwable {
        val context = MockRequestContext.create(applicationContext);
        context.setRemoteAddr("123.456.789.123");
        context.setLocalAddr("123.456.789.123");
        context.withUserAgent();
        context.setClientInfo();
        val authn = RegisteredServiceTestUtils.getAuthentication(UUID.randomUUID().toString());
        WebUtils.putAuthentication(authn, context);
        return context;
    }
This is {@link DefaultMultifactorAuthenticationTrustedDeviceProviderActionTests}.

@author Misagh Moayyed
@since 7.0.0
support/cas-server-support-trusted-mfa/src/test/java/org/apereo/cas/trusted/web/flow/DefaultMultifactorAuthenticationTrustedDeviceProviderActionTests.java