@Test
    void verifyOK() throws Throwable {
        val response = new MockHttpServletResponse();
        val request = new MockHttpServletRequest();
        request.setMethod("POST");
        request.setContentType(MediaType.TEXT_XML_VALUE);

        val headers = HttpUtils.createBasicAuthHeaders("casuser", "casuser");
        headers.forEach(request::addHeader);
        val envelope = getEnvelope(samlRegisteredService.getServiceId());
        val xml = SamlUtils.transformSamlObject(openSamlConfigBean, envelope).toString();
        request.setContent(xml.getBytes(StandardCharsets.UTF_8));

        controller.handleEcpRequest(response, request);
        assertEquals(HttpStatus.SC_OK, response.getStatus());
    }
This is {@link ECPSamlIdPProfileHandlerControllerTests}.

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