@Test
    void verifySavingSamlService() {
        val appCtx = new StaticApplicationContext();
        appCtx.refresh();

        val registeredService = new SamlRegisteredService();
        registeredService.setName(SAML_SERVICE);
        registeredService.setServiceId("http://mmoayyed.unicon.net");
        registeredService.setMetadataLocation(METADATA_LOCATION);

        val dao = new JsonServiceRegistry(RESOURCE, WatcherService.noOp(),
            appCtx, new NoOpRegisteredServiceReplicationStrategy(),
            new DefaultRegisteredServiceResourceNamingStrategy(),
            new ArrayList<>());
        dao.save(registeredService);
        dao.load();
    }
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