From 0fbe309f797b4cdac9d507a6f3dfd193644aa224 Mon Sep 17 00:00:00 2001 From: vasraz Date: Mon, 10 Jan 2022 19:23:57 +0000 Subject: Improve testing stability Signed-off-by: Vasyl Razinkov Change-Id: I3f631642a97e65d6628816767e0a5408f02f4bc6 Issue-ID: SDC-3839 --- .../be/model/jsonjanusgraph/operations/CapabilitiesOperationTest.java | 2 +- .../be/model/jsonjanusgraph/operations/ToscaOperationFacadeTest.java | 2 +- .../sdc/be/model/operations/impl/InterfaceLifecycleOperationTest.java | 2 +- .../sdc/be/model/operations/impl/RelationshipTypeOperationTest.java | 2 +- .../openecomp/sdc/be/model/operations/impl/UserAdminOperationTest.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'catalog-model/src') diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/CapabilitiesOperationTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/CapabilitiesOperationTest.java index 556e362c2f..6b5a210d7a 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/CapabilitiesOperationTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/CapabilitiesOperationTest.java @@ -51,7 +51,7 @@ public class CapabilitiesOperationTest { @Before public void setUp() { - MockitoAnnotations.initMocks(this); + MockitoAnnotations.openMocks(this); when(mockJanusGraphDao.commit()).thenReturn(JanusGraphOperationStatus.OK); when(mockJanusGraphDao.getVertexById(anyString(), any())).thenReturn(Either.left(new GraphVertex())); diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaOperationFacadeTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaOperationFacadeTest.java index 753953f33e..c0c417a324 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaOperationFacadeTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaOperationFacadeTest.java @@ -140,7 +140,7 @@ public class ToscaOperationFacadeTest { @Before public void setUp() throws Exception { testInstance = new ToscaOperationFacade(); - MockitoAnnotations.initMocks(this); + MockitoAnnotations.openMocks(this); } @SuppressWarnings("unchecked") diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/InterfaceLifecycleOperationTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/InterfaceLifecycleOperationTest.java index 7ccf1f6d6b..b8230ff87a 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/InterfaceLifecycleOperationTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/InterfaceLifecycleOperationTest.java @@ -80,7 +80,7 @@ public class InterfaceLifecycleOperationTest { @BeforeEach public void createUserAndCategory() { - MockitoAnnotations.initMocks(this); + MockitoAnnotations.openMocks(this); CategoryData categoryData = new CategoryData(NodeTypeEnum.ResourceCategory); when(janusGraphGenericDao.createNode(any(), any())).thenReturn(Either.left(categoryData)); deleteAndCreateCategory(CATEGORY_NAME); diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/RelationshipTypeOperationTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/RelationshipTypeOperationTest.java index ee3ea9e026..73a60079c3 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/RelationshipTypeOperationTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/RelationshipTypeOperationTest.java @@ -100,7 +100,7 @@ public class RelationshipTypeOperationTest extends ModelTestBase { @BeforeEach public void setUp() throws Exception { - MockitoAnnotations.initMocks(this); + MockitoAnnotations.openMocks(this); Mockito.doReturn(JanusGraphOperationStatus.OK).when(janusGraphGenericDao).commit(); Mockito.doReturn(JanusGraphOperationStatus.OK).when(janusGraphGenericDao).rollback(); diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/UserAdminOperationTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/UserAdminOperationTest.java index e17c61e248..e8e6d0b485 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/UserAdminOperationTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/UserAdminOperationTest.java @@ -81,7 +81,7 @@ public class UserAdminOperationTest extends ModelTestBase { @Before public void initMocks() { - MockitoAnnotations.initMocks(this); + MockitoAnnotations.openMocks(this); Mockito.reset(janusGraphGenericDao); mockJanusGraphUpdate(); mockJanusGraphDelete(); -- cgit 1.2.3-korg