diff options
author | vasraz <vasyl.razinkov@est.tech> | 2022-12-24 00:57:54 +0000 |
---|---|---|
committer | Michael Morris <michael.morris@est.tech> | 2023-01-03 14:29:22 +0000 |
commit | 5b1a92cea1fb437c236a77468f3e8e351e25a990 (patch) | |
tree | 0df24473b25236a646a094cfcd18ede5c61fc1e1 /openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl | |
parent | 5357edd8fb443613f4be4e8a30b03f2a7134e61d (diff) |
Upgrade testing frameworks to latest not-vulnerable versions
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Change-Id: Ie68290a79d075132c73e6cc9e82b9dbda92fbe8c
Issue-ID: SDC-4313
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl')
2 files changed, 13 insertions, 13 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/test/java/org/openecomp/sdc/enrichment/impl/external/artifact/MonitoringMibEnricherTest.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/test/java/org/openecomp/sdc/enrichment/impl/external/artifact/MonitoringMibEnricherTest.java index 85b8a4085b..f837f25398 100644 --- a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/test/java/org/openecomp/sdc/enrichment/impl/external/artifact/MonitoringMibEnricherTest.java +++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/test/java/org/openecomp/sdc/enrichment/impl/external/artifact/MonitoringMibEnricherTest.java @@ -20,7 +20,7 @@ package org.openecomp.sdc.enrichment.impl.external.artifact; -import static org.mockito.Matchers.anyObject; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.atLeastOnce; import static org.mockito.Mockito.times; @@ -131,7 +131,7 @@ public class MonitoringMibEnricherTest { "pd_server")); returnedComponents.add(getComponentEntity(vspId, version, componentId2, "pd_server")); - Mockito.when(componentDaoMock.list(anyObject())) + Mockito.when(componentDaoMock.list(any())) .thenReturn(returnedComponents); setMockToEnrichComponent(vspId, version, componentId1); @@ -166,9 +166,9 @@ public class MonitoringMibEnricherTest { returnedArtifact.setArtifactName("mib.zip"); returnedArtifact.setArtifact(getMibByteBuffer("/mock/enrichMib/MIB.zip")); - Mockito.when(componentArtifactDaoMock.getByType(anyObject())) + Mockito.when(componentArtifactDaoMock.getByType(any())) .thenReturn(Optional.of(returnedArtifact)); - Mockito.doNothing().when(enrichedServiceModelDaoMock).storeExternalArtifact(anyObject()); + Mockito.doNothing().when(enrichedServiceModelDaoMock).storeExternalArtifact(any()); } private ComponentEntity getComponentEntity(String vspId, diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/test/java/org/openecomp/sdc/enrichment/impl/external/artifact/ProcessArtifactEnricherTest.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/test/java/org/openecomp/sdc/enrichment/impl/external/artifact/ProcessArtifactEnricherTest.java index 9edac107b0..706e189b69 100644 --- a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/test/java/org/openecomp/sdc/enrichment/impl/external/artifact/ProcessArtifactEnricherTest.java +++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/test/java/org/openecomp/sdc/enrichment/impl/external/artifact/ProcessArtifactEnricherTest.java @@ -16,7 +16,7 @@ package org.openecomp.sdc.enrichment.impl.external.artifact; -import static org.mockito.Matchers.anyObject; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.atLeastOnce; import static org.mockito.Mockito.never; import static org.mockito.Mockito.when; @@ -81,13 +81,13 @@ public class ProcessArtifactEnricherTest { Collection<ComponentEntity> componentList = new ArrayList<>(); componentList.add(componentEntity); - when(componentDaoMock.list(anyObject())).thenReturn(componentList); + when(componentDaoMock.list(any())).thenReturn(componentList); Collection<ProcessEntity> list = new ArrayList<>(); list.add(processEntity); when(processDaoMock.list(entity)).thenReturn(list); - when(processDaoMock.getArtifact(anyObject())).thenReturn(processEntity); + when(processDaoMock.getArtifact(any())).thenReturn(processEntity); EnrichmentInfo info = new EnrichmentInfo(); info.setVersion(version); @@ -129,13 +129,13 @@ public class ProcessArtifactEnricherTest { Collection<ComponentEntity> componentList = new ArrayList<>(); componentList.add(componentEntity); - when(componentDaoMock.list(anyObject())).thenReturn(componentList); + when(componentDaoMock.list(any())).thenReturn(componentList); Collection<ProcessEntity> list = new ArrayList<>(); list.add(processEntity); when(processDaoMock.list(entity)).thenReturn(list); - when(processDaoMock.getArtifact(anyObject())).thenReturn(processEntity); + when(processDaoMock.getArtifact(any())).thenReturn(processEntity); EnrichmentInfo info = new EnrichmentInfo(); info.setVersion(version); @@ -171,13 +171,13 @@ public class ProcessArtifactEnricherTest { Collection<ComponentEntity> componentList = new ArrayList<>(); componentList.add(componentEntity); - when(componentDaoMock.list(anyObject())).thenReturn(componentList); + when(componentDaoMock.list(any())).thenReturn(componentList); Collection<ProcessEntity> list = new ArrayList<>(); list.add(processEntity); when(processDaoMock.list(entity)).thenReturn(list); - when(processDaoMock.getArtifact(anyObject())).thenReturn(null); + when(processDaoMock.getArtifact(any())).thenReturn(null); EnrichmentInfo info = new EnrichmentInfo(); info.setVersion(version); @@ -211,13 +211,13 @@ public class ProcessArtifactEnricherTest { Collection<ComponentEntity> componentList = new ArrayList<>(); componentList.add(componentEntity); - when(componentDaoMock.list(anyObject())).thenReturn(componentList); + when(componentDaoMock.list(any())).thenReturn(componentList); Collection<ProcessEntity> list = new ArrayList<>(); list.add(processEntity); when(processDaoMock.list(entity)).thenReturn(list); - when(processDaoMock.getArtifact(anyObject())).thenReturn(processEntity); + when(processDaoMock.getArtifact(any())).thenReturn(processEntity); EnrichmentInfo info = new EnrichmentInfo(); info.setVersion(version); |