@Test
    void verifyPostSignRequest() {
        val request = new MockHttpServletRequest();
        request.setMethod("POST");
        request.addHeader(HttpHeaders.USER_AGENT, "Firefox");
        samlIdPDistributedSessionCookieGenerator.setCookiePath(StringUtils.EMPTY);
        request.setContextPath("/custompath");
        val response = new MockHttpServletResponse();
        val xml = SamlUtils.transformSamlObject(openSamlConfigBean, getAuthnRequest()).toString();
        request.addParameter(SamlProtocolConstants.PARAMETER_SAML_REQUEST, EncodingUtils.encodeBase64(xml));
        val mv = controller.handleSaml2ProfileSsoPostRequest(response, request);
        assertEquals(HttpStatus.FOUND, mv.getStatus());
        assertEquals("/custompath/", samlIdPDistributedSessionCookieGenerator.getCookiePath());
        samlIdPDistributedSessionCookieGenerator.setCookiePath("/custom");
        controller.handleSaml2ProfileSsoPostRequest(response, request);
        assertEquals("/custom", samlIdPDistributedSessionCookieGenerator.getCookiePath());
    }
This is {@link SSOSamlIdPPostProfileHandlerControllerWithTicketRegistryTests}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-saml-idp/src/test/java/org/apereo/cas/support/saml/web/idp/profile/sso/SSOSamlIdPPostProfileHandlerControllerWithTicketRegistryTests.java