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 --- .../sdcrests/vsp/rest/services/ComponentDependenciesImplTest.java | 4 ++-- .../org/openecomp/sdcrests/vsp/rest/services/ComponentImplTest.java | 4 ++-- .../vsp/rest/services/ComponentMonitoringUploadsImplTest.java | 4 ++-- .../sdcrests/vsp/rest/services/ComponentProcessesImplTest.java | 4 ++-- .../org/openecomp/sdcrests/vsp/rest/services/ComputeImplTest.java | 4 ++-- .../sdcrests/vsp/rest/services/DeploymentFlavorsImplTest.java | 4 ++-- .../java/org/openecomp/sdcrests/vsp/rest/services/ImagesImplTest.java | 4 ++-- .../org/openecomp/sdcrests/vsp/rest/services/NetworksImplTest.java | 4 ++-- .../java/org/openecomp/sdcrests/vsp/rest/services/NicsImplTest.java | 4 ++-- 9 files changed, 18 insertions(+), 18 deletions(-) (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest') diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/ComponentDependenciesImplTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/ComponentDependenciesImplTest.java index fe90ed2528..1bc1e33eab 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/ComponentDependenciesImplTest.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/ComponentDependenciesImplTest.java @@ -43,7 +43,7 @@ import java.util.Collection; import java.util.Collections; import java.util.UUID; -import static org.mockito.MockitoAnnotations.initMocks; +import static org.mockito.MockitoAnnotations.openMocks; import static org.mockito.Mockito.when; public class ComponentDependenciesImplTest { @@ -66,7 +66,7 @@ public class ComponentDependenciesImplTest { @Before public void setUp() { try { - initMocks(this); + openMocks(this); ComponentDependencyModelEntity e = new ComponentDependencyModelEntity(); e.setSourceComponentId("sourceid"); diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/ComponentImplTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/ComponentImplTest.java index ab64bfca11..85429065c1 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/ComponentImplTest.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/ComponentImplTest.java @@ -47,7 +47,7 @@ import java.util.Collection; import java.util.Collections; import java.util.UUID; -import static org.mockito.MockitoAnnotations.initMocks; +import static org.mockito.MockitoAnnotations.openMocks; import static org.mockito.Mockito.when; public class ComponentImplTest { @@ -67,7 +67,7 @@ public class ComponentImplTest { @Before public void setUp() { try { - initMocks(this); + openMocks(this); ComponentEntity ce = new ComponentEntity(); ce.setId(vspId); diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/ComponentMonitoringUploadsImplTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/ComponentMonitoringUploadsImplTest.java index 119a5dbe53..28dc1cbb85 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/ComponentMonitoringUploadsImplTest.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/ComponentMonitoringUploadsImplTest.java @@ -41,7 +41,7 @@ import javax.ws.rs.core.Response; import java.io.ByteArrayInputStream; import java.util.UUID; -import static org.mockito.MockitoAnnotations.initMocks; +import static org.mockito.MockitoAnnotations.openMocks; import static org.mockito.Mockito.when; public class ComponentMonitoringUploadsImplTest { @@ -64,7 +64,7 @@ public class ComponentMonitoringUploadsImplTest { @Before public void setUp() { try { - initMocks(this); + openMocks(this); MonitoringUploadStatus result = new MonitoringUploadStatus(); result.setSnmpPoll("p"); diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/ComponentProcessesImplTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/ComponentProcessesImplTest.java index 48011ea740..6320a38720 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/ComponentProcessesImplTest.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/ComponentProcessesImplTest.java @@ -47,7 +47,7 @@ import java.util.Collection; import java.util.Collections; import java.util.UUID; -import static org.mockito.MockitoAnnotations.initMocks; +import static org.mockito.MockitoAnnotations.openMocks; import static org.mockito.Mockito.when; import static org.mockito.Mockito.mock; @@ -75,7 +75,7 @@ public class ComponentProcessesImplTest { @Before public void setUp() { try { - initMocks(this); + openMocks(this); ProcessEntity pe = new ProcessEntity(); pe.setId(vspId); diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/ComputeImplTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/ComputeImplTest.java index 7cd78e0c1d..8195ae0a5e 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/ComputeImplTest.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/ComputeImplTest.java @@ -48,7 +48,7 @@ import java.util.Collection; import java.util.Collections; import java.util.UUID; -import static org.mockito.MockitoAnnotations.initMocks; +import static org.mockito.MockitoAnnotations.openMocks; import static org.mockito.Mockito.when; public class ComputeImplTest { @@ -72,7 +72,7 @@ public class ComputeImplTest { @Before public void setUp() { try { - initMocks(this); + openMocks(this); ListComputeResponse lcr = new ListComputeResponse(); lcr.setAssociatedWithDeploymentFlavor(false); diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/DeploymentFlavorsImplTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/DeploymentFlavorsImplTest.java index 008ef8134f..4b0710a277 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/DeploymentFlavorsImplTest.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/DeploymentFlavorsImplTest.java @@ -44,7 +44,7 @@ import java.util.Collection; import java.util.Collections; import java.util.UUID; -import static org.mockito.MockitoAnnotations.initMocks; +import static org.mockito.MockitoAnnotations.openMocks; import static org.mockito.Mockito.when; public class DeploymentFlavorsImplTest { @@ -64,7 +64,7 @@ public class DeploymentFlavorsImplTest { @Before public void setUp() { try { - initMocks(this); + openMocks(this); DeploymentFlavorEntity e = new DeploymentFlavorEntity(); e.setId(deploymentFlavorId); diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/ImagesImplTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/ImagesImplTest.java index 349ab9b401..e7dc2843a7 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/ImagesImplTest.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/ImagesImplTest.java @@ -49,7 +49,7 @@ import java.util.Collection; import java.util.Collections; import java.util.UUID; -import static org.mockito.MockitoAnnotations.initMocks; +import static org.mockito.MockitoAnnotations.openMocks; import static org.mockito.Mockito.when; public class ImagesImplTest { @@ -79,7 +79,7 @@ public class ImagesImplTest { @Before public void setUp() { try { - initMocks(this); + openMocks(this); ImageEntity ie = new ImageEntity(); ie.setComponentId(componentId); diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/NetworksImplTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/NetworksImplTest.java index 756e8fdde3..0fcb19d5d4 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/NetworksImplTest.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/NetworksImplTest.java @@ -21,7 +21,7 @@ package org.openecomp.sdcrests.vsp.rest.services; import static org.mockito.Mockito.when; -import static org.mockito.MockitoAnnotations.initMocks; +import static org.mockito.MockitoAnnotations.openMocks; import java.util.Collection; import java.util.Collections; @@ -57,7 +57,7 @@ public class NetworksImplTest { @Before public void setUp() { - initMocks(this); + openMocks(this); NetworkEntity e = new NetworkEntity(); e.setId(networkId); diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/NicsImplTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/NicsImplTest.java index a6a4e98f82..4f0a5d3cdd 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/NicsImplTest.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/NicsImplTest.java @@ -47,7 +47,7 @@ import java.util.Collection; import java.util.Collections; import java.util.UUID; -import static org.mockito.MockitoAnnotations.initMocks; +import static org.mockito.MockitoAnnotations.openMocks; import static org.mockito.Mockito.when; public class NicsImplTest { @@ -71,7 +71,7 @@ public class NicsImplTest { @Before public void setUp() { try { - initMocks(this); + openMocks(this); NicEntity e = new NicEntity(); e.setComponentId(componentId); -- cgit 1.2.3-korg