@Test
    void verifySessionOpsWithEmbeddedId() throws Throwable {
        val request = new MockHttpServletRequest();
        val response = new MockHttpServletResponse();
        val webContext = new JEEContext(request, response);
        val service = getSamlRegisteredServiceForTestShib();
        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);
        val serviceUrl = new URIBuilder("https://localhost")
            .appendPath(SamlIdPConstants.ENDPOINT_SAML2_SSO_PROFILE_CALLBACK)
            .addParameter(SamlIdPConstants.AUTHN_REQUEST_ID, authnRequest.getID())
            .build()
            .toASCIIString();
        request.setParameter(CasProtocolConstants.PARAMETER_SERVICE, serviceUrl);
        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