summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors
diff options
context:
space:
mode:
authorRam Krishna Verma <ram_krishna.verma@bell.ca>2020-02-26 21:03:39 +0000
committerGerrit Code Review <gerrit@onap.org>2020-02-26 21:03:39 +0000
commit1bba8b33d25069f61d27bbd125cccccde9947f3d (patch)
tree19756d1422911023d8013d74c7a4f6f15037b6c6 /models-interactions/model-actors
parent72b4a13723049c5d4a066879aa67d08ec5e86180 (diff)
parent7cf4ed6d9a5701be62f50facb4661461a5b15f09 (diff)
Merge "ActorService constructor should be public"
Diffstat (limited to 'models-interactions/model-actors')
-rw-r--r--models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/ActorService.java2
-rw-r--r--models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/ActorServiceProviderTest.java7
2 files changed, 8 insertions, 1 deletions
diff --git a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/ActorService.java b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/ActorService.java
index 82f744421..e1b875dd0 100644
--- a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/ActorService.java
+++ b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/ActorService.java
@@ -50,7 +50,7 @@ public class ActorService extends StartConfigPartial<Map<String, Map<String, Obj
/**
* Constructs the object and loads the list of actors.
*/
- protected ActorService() {
+ public ActorService() {
super("actors");
Map<String, Actor> map = new HashMap<>();
diff --git a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/ActorServiceProviderTest.java b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/ActorServiceProviderTest.java
index cca0694d7..abf156b58 100644
--- a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/ActorServiceProviderTest.java
+++ b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/ActorServiceProviderTest.java
@@ -23,6 +23,8 @@
package org.onap.policy.controlloop.actorserviceprovider;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
@@ -50,5 +52,10 @@ public class ActorServiceProviderTest {
assertEquals(2, dummyActor.recipeTargets(DOROTHY).size());
assertEquals(2, dummyActor.recipePayloads(DOROTHY).size());
+
+ // verify that we get a new actor object if we create a new service
+ Actor dummyActor2 = new ActorService().getActor(DummyActor.class.getSimpleName());
+ assertNotNull(dummyActor2);
+ assertNotSame(dummyActor, dummyActor2);
}
}