@Override
    public RegisteredService save(final RegisteredService registeredService) {
        registeredService.assignIdIfNecessary();
        invokeServiceRegistryListenerPreSave(registeredService);
        val svc = findServiceById(registeredService.getId());
        if (svc != null) {
            registeredServices.remove(svc);
        }
        registeredServices.add(registeredService);
        return registeredService;
    }
Default In Memory Service Registry Dao for test/demonstration purposes.

@author Scott Battaglia
@since 3.1
core/cas-server-core-services-registry/src/main/java/org/apereo/cas/services/InMemoryServiceRegistry.java