@Test
    void verifyObtainService() {
        val request = new MockHttpServletRequest();
        request.setMethod(HttpMethod.POST.name());
        request.setParameter(SamlProtocolConstants.CONST_PARAM_TARGET, "test");

        val service = samlServiceFactory.createService(request);
        assertEquals("test", service.getId());
    }
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