aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2019-12-16 13:47:56 +0000
committerGerrit Code Review <gerrit@onap.org>2019-12-16 13:47:56 +0000
commit5f8ce4adff724009dad903887cd320a0095c1437 (patch)
treee7ed2970d49147a68dfe8c6f462d2e22097cca54 /vid-app-common
parent31e02ef034fddefe26d48f497462015e7976f0b5 (diff)
parentba4a59a13e77a85d2c27398fe7314af6a80dad9e (diff)
Merge "Fix intermittent test failure"
Diffstat (limited to 'vid-app-common')
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/services/AAITreeNodeBuilderTest.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/vid-app-common/src/test/java/org/onap/vid/services/AAITreeNodeBuilderTest.java b/vid-app-common/src/test/java/org/onap/vid/services/AAITreeNodeBuilderTest.java
index 2c954b297..29041839a 100644
--- a/vid-app-common/src/test/java/org/onap/vid/services/AAITreeNodeBuilderTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/services/AAITreeNodeBuilderTest.java
@@ -30,6 +30,7 @@ import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.when;
import static org.onap.vid.services.AAIServiceTree.AAI_TREE_PATHS;
+import static org.onap.vid.testUtils.TestUtils.initMockitoMocks;
import static org.onap.vid.utils.KotlinUtilsKt.JACKSON_OBJECT_MAPPER;
import static org.testng.Assert.assertNull;
import static org.testng.Assert.assertTrue;
@@ -52,7 +53,6 @@ import java.util.concurrent.Executors;
import org.apache.commons.lang3.tuple.Pair;
import org.jetbrains.annotations.NotNull;
import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
import org.mockito.stubbing.Answer;
import org.onap.vid.aai.AaiClientInterface;
import org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.Relationship;
@@ -66,7 +66,7 @@ import org.onap.vid.utils.Logging;
import org.onap.vid.utils.Tree;
import org.onap.vid.utils.Unchecked;
import org.springframework.http.HttpMethod;
-import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
@@ -82,9 +82,9 @@ public class AAITreeNodeBuilderTest {
private static final ObjectMapper mapper = new ObjectMapper();
- @BeforeClass
+ @BeforeMethod
public void initMocks() {
- MockitoAnnotations.initMocks(this);
+ initMockitoMocks(this);
aaiTreeNodeBuilder = new AAITreeNodeBuilder(aaiClientMock, logging);
executorService = MoreExecutors.newDirectExecutorService();
}