Added a test for service supervision
[nonrtric.git] / policy-agent / src / main / java / org / oransc / policyagent / repository / Services.java
index 568f002..f6c55dc 100644 (file)
@@ -20,6 +20,7 @@
 
 package org.oransc.policyagent.repository;
 
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -50,7 +51,7 @@ public class Services {
     }
 
     public synchronized Iterable<Service> getAll() {
-        return registeredServices.values();
+        return Collections.unmodifiableCollection(registeredServices.values());
     }
 
     public synchronized void remove(String name) {