public Object getSessionAttribute(final String name) {
        return Objects.requireNonNull(getHttpServletRequest().getSession(true)).getAttribute(name);
    }
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