summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.guard/src
diff options
context:
space:
mode:
Diffstat (limited to 'models-interactions/model-actors/actor.guard/src')
-rw-r--r--models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/DecisionOperatorTest.java8
-rw-r--r--models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/GuardConfigTest.java8
2 files changed, 8 insertions, 8 deletions
diff --git a/models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/DecisionOperatorTest.java b/models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/DecisionOperatorTest.java
index 170bcdf7e..76b784101 100644
--- a/models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/DecisionOperatorTest.java
+++ b/models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/DecisionOperatorTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,13 +28,15 @@ import static org.mockito.Mockito.when;
import java.util.Map;
import org.junit.Before;
import org.junit.Test;
+import org.junit.runner.RunWith;
import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnitRunner;
import org.onap.policy.common.endpoints.http.client.HttpClient;
import org.onap.policy.common.endpoints.http.client.HttpClientFactory;
import org.onap.policy.controlloop.actorserviceprovider.Util;
import org.onap.policy.controlloop.actorserviceprovider.parameters.ParameterValidationRuntimeException;
+@RunWith(MockitoJUnitRunner.class)
public class DecisionOperatorTest {
private static final String ACTOR = "my-actor";
private static final String OPERATION = "my-name";
@@ -61,8 +63,6 @@ public class DecisionOperatorTest {
*/
@Before
public void setUp() {
- MockitoAnnotations.initMocks(this);
-
when(factory.get(CLIENT)).thenReturn(client);
oper = new MyOperator();
diff --git a/models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/GuardConfigTest.java b/models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/GuardConfigTest.java
index d30c71172..2d929d544 100644
--- a/models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/GuardConfigTest.java
+++ b/models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/GuardConfigTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,12 +29,14 @@ import static org.mockito.Mockito.when;
import java.util.concurrent.Executor;
import org.junit.Before;
import org.junit.Test;
+import org.junit.runner.RunWith;
import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnitRunner;
import org.onap.policy.common.endpoints.http.client.HttpClient;
import org.onap.policy.common.endpoints.http.client.HttpClientFactory;
import org.onap.policy.models.decisions.concepts.DecisionRequest;
+@RunWith(MockitoJUnitRunner.class)
public class GuardConfigTest {
private static final String MY_CLIENT = "my-client";
private static final String PATH = "my-path";
@@ -59,8 +61,6 @@ public class GuardConfigTest {
*/
@Before
public void setUp() {
- MockitoAnnotations.initMocks(this);
-
when(factory.get(MY_CLIENT)).thenReturn(client);
params = GuardParams.builder().onapName(ONAP_NAME).onapComponent(ONAP_COMP).onapInstance(ONAP_INST)