public MockRequestContext setMessageContext(final MessageContext messageContext) throws Exception {
        val field = ReflectionUtils.findField(getClass(), "messageContext");
        Objects.requireNonNull(field).trySetAccessible();
        field.set(this, messageContext);
        return this;
    }
This is {@link MockRequestContext}.

@author Misagh Moayyed
@since 6.6.0
core/cas-server-core-util-api/src/test/java/org/apereo/cas/util/MockRequestContext.java