@Test
    void verifyEmptyBody() {
        val body = "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" "
            + "xmlns=\"urn:oasis:names:tc:SAML:1.0:protocol\"><soap:Header/></soap:Envelope>";
        val request = new MockHttpServletRequest();
        request.setMethod(HttpMethod.POST.name());
        request.setParameter(SamlProtocolConstants.CONST_PARAM_TARGET, "test");
        request.setAttribute(SamlProtocolConstants.PARAMETER_SAML_REQUEST, body);
        request.setRequestURI(SamlProtocolConstants.ENDPOINT_SAML_VALIDATE);
        val service = samlServiceFactory.createService(request);
        assertNull(service.getArtifactId());
        assertNull(service.getRequestId());
    }
Test cases for {@link SamlServiceFactory}

@author Misagh Moayyed
@since 4.2
support/cas-server-support-saml/src/test/java/org/apereo/cas/support/saml/authentication/principal/SamlServiceFactoryTests.java