@Test
    @Order(5)
    void verifyPostRequestWithSso() throws Throwable {
        val request = new MockHttpServletRequest();
        val response = new MockHttpServletResponse();
        val tgt = new MockTicketGrantingTicket("casuser");
        ticketRegistry.addTicket(tgt);
        ticketGrantingTicketCookieGenerator.addCookie(request, response, tgt.getId());
        request.setCookies(response.getCookies());
        request.setMethod("POST");
        val authnRequest = getAuthnRequest();
        val xml = SamlUtils.transformSamlObject(openSamlConfigBean, authnRequest).toString();
        request.addParameter(SamlProtocolConstants.PARAMETER_SAML_REQUEST, EncodingUtils.encodeBase64(xml));
        samlIdPDistributedSessionStore.set(new JEEContext(request, response),
            SamlProtocolConstants.PARAMETER_SAML_RELAY_STATE, "relay-state");
        val mv = controller.handleSaml2ProfileSsoPostRequest(response, request);
        assertNull(mv);
        assertEquals(HttpStatus.OK.value(), response.getStatus());
        assertNotNull(response.getContentAsString());
    }
This is {@link SSOSamlIdPPostProfileHandlerControllerTests}.

@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/SSOSamlIdPPostProfileHandlerControllerTests.java