@Test
    void verifySaveInRegistryAndGetByServiceId() {
        val registeredService = new CasRegisteredService();
        registeredService.setId(RandomUtils.nextLong());
        registeredService.setName(UUID.randomUUID().toString());
        registeredService.setServiceId(registeredService.getName());
        assertFalse(isServiceInCache(registeredService.getName(), 0));
        serviceRegistry.save(registeredService);
        assertNotNull(serviceRegistry.findServiceByExactServiceId(registeredService.getName()));
        val svc = webApplicationServiceFactory.createService(registeredService.getName());
        assertNotNull(servicesManager.findServiceBy(svc, CasRegisteredService.class));
        assertTrue(isServiceInCache(registeredService.getName(), 0));
    }
This is {@link AbstractServicesManagerTests}.

@author Misagh Moayyed
@since 5.2.0
core/cas-server-core-services/src/test/java/org/apereo/cas/services/AbstractServicesManagerTests.java