@Test
    void verifySessionOps() throws Throwable {
        val request = new MockHttpServletRequest();
        val response = new MockHttpServletResponse();
        val webContext = new JEEContext(request, response);

        val service = getSamlRegisteredServiceForTestShib();
        for (var i = 1; i < 5; i++) {
            val authnRequest = getAuthnRequestFor(service);
            val messageContext = new MessageContext();
            messageContext.setMessage(authnRequest);
            val payload = Pair.of(authnRequest, messageContext);
            val sessionManager = SamlIdPSessionManager.of(openSamlConfigBean, samlIdPDistributedSessionStore);
            sessionManager.store(webContext, payload);

            request.setParameter(SamlIdPConstants.AUTHN_REQUEST_ID, authnRequest.getID());
            assertDoesNotThrow(() -> sessionManager.fetch(webContext, AuthnRequest.class).orElseThrow());
        }
    }
This is {@link SamlIdPSessionManagerTests}.

@author Misagh Moayyed
@since 7.0.0
support/cas-server-support-saml-idp/src/test/java/org/apereo/cas/support/saml/idp/SamlIdPSessionManagerTests.java