@Test
    void checkPattern() {
        val registeredService = new SamlRegisteredService();
        registeredService.setId(RandomUtils.nextLong());
        registeredService.setName(SAML_SERVICE);
        registeredService.setServiceId("^http://.+");
        registeredService.setMetadataLocation(METADATA_LOCATION);
        servicesManager.save(registeredService);
        val service = RegisteredServiceTestUtils.getService("http://mmoayyed.unicon.net:8081/sp/saml/SSO");
        service.getAttributes().put(SamlProtocolConstants.PARAMETER_ENTITY_ID, List.of(registeredService.getServiceId()));
        val foundService = servicesManager.findServiceBy(service);
        assertNotNull(foundService);
    }
The {@link SamlRegisteredServiceTests} handles test cases for {@link SamlRegisteredService}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-saml-idp/src/test/java/org/apereo/cas/support/saml/services/SamlRegisteredServiceTests.java