Replace test related deprecated methods 69/141669/1
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Sun, 10 Aug 2025 16:04:29 +0000 (18:04 +0200)
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Sun, 10 Aug 2025 16:04:29 +0000 (18:04 +0200)
- replace junits assertThat with hamcrests
- replace initMocks with openMocks

Issue-ID: SO-4221
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Change-Id: I19b7e57572efe43c70d075721e8425b9c4620552

77 files changed:
adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/authentication/AuthenticationMethodTest.java
adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java
adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/inventory/CreateAAIInventoryTest.java
adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/inventory/CreateInventoryTaskTest.java
adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java
adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomControllerTest.java
adapters/mso-sdnc-adapter/src/test/java/org/onap/so/adapters/sdnc/ObjectFactoryTest.java
adapters/so-appc-orchestrator/src/test/java/org/onap/so/adapters/appc/orchestrator/client/ApplicationControllerCallbackTest.java
adapters/so-appc-orchestrator/src/test/java/org/onap/so/adapters/appc/orchestrator/service/ApplicationControllerTaskTest.java
asdc-controller/src/test/java/org/onap/asdc/activity/DeployActivitySpecsTest.java
asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCStatusCallBackTest.java
asdc-controller/src/test/java/org/onap/so/asdc/installer/ToscaResourceStructureTest.java
asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInstallerTest.java
asdc-controller/src/test/java/org/onap/so/asdc/tenantIsolation/WatchdogDistributionTest.java
bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModuleTest.groovy
bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/PrepareUpdateAAIVfModuleTest.groovy
bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIGenericVnfTest.groovy
bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/DefaultToShortClassNameBeanNameGeneratorTest.java
bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/DelegateExecutionImplTest.java
bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/baseclient/BaseClientTest.java
bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupExistingServiceTest.java
bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupPopulateMethodsTest.java
bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerActionTest.java
bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClientTest.java
bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/restproperties/ThreadedReadTest.java
bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/RollbackDataTest.java
bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/internal/VariableNameExtractorTest.java
bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstanceTest.groovy
bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResourceTest.groovy
bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfraTest.groovy
bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy
bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleTest.groovy
bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModulesTest.groovy
bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfTest.groovy
bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstanceTest.groovy
bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleTest.groovy
bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2Test.groovy
bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModulesTest.groovy
bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/aai/AAIDeleteServiceInstanceTest.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CreateNetworkTest.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBBTest.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/manualhandling/tasks/ManualHandlingTasksTest.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/mapper/GeneralTopologyObjectMapperTest.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/OrchestrationStatusValidatorUnitTest.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ebb/loader/ServiceEBBLoaderTest.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/validators/UpgradePreWorkflowValidatorTest.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/VnfVolumeAdapterClientIT.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapperTest.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperTest.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/namingservice/NamingRequestObjectBuilderTest.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/namingservice/NamingRequestObjectTest.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVnfResourcesTest.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/ApiHandlerClientTest.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/NetworkAdapterResourcesTest.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResourcesTest.java
common/clients/src/test/java/org/onap/so/client/policy/PolicyClientImplTest.java
common/common/src/test/java/org/onap/so/web/exceptions/RuntimeExceptionMapperTest.java
graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIErrorFormatterTest.java
graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIResourcesClientTest.java
graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIResourcesClientWithServiceInstanceUriTest.java
graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAISingleTransactionClientTest.java
mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/filters/RequestIdFilterTest.java
mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/E2EServiceInstancesTest.java
mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/GlobalHealthcheckHandlerTest.java
mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/InstanceManagementTest.java
mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/MsoRequestTest.java
mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsUnitTest.java
mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsUnitTest.java
mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java
mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/TasksHandlerTest.java
mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandlerTest.java
mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/ActivateVnfDBHelperTest.java
mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfStatusOperationalEnvironmentTest.java
mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateEcompOperationalEnvironmentTest.java
so-sdn-clients/src/test/java/org/onap/so/client/sdno/SDNOValidatorIT.java

index ec77a8f..e7b9698 100644 (file)
@@ -22,7 +22,7 @@
 package org.onap.so.cloud.authentication;
 
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import java.io.IOException;
 import java.nio.file.Files;
index c476e3b..f2a4782 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,7 +21,7 @@
 package org.onap.so.openstack.utils;
 
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.mockito.ArgumentMatchers.isA;
 import static org.mockito.Mockito.doReturn;
 import java.io.File;
@@ -70,7 +70,7 @@ public class MsoHeatUtilsWithUpdateTest extends TestDataSetup {
 
     @Before
     public void before() {
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
 
         cloudOwner = "cloudOwner";
         cloudSiteId = "cloudSiteId";
index 73bfcef..ef457cc 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -60,7 +60,7 @@ public class CreateAAIInventoryTest extends CreateAAIInventory {
         auditInventory.setCloudRegion("cloudRegion");
         auditInventory.setTenantId("tenantId");
         auditInventory.setHeatStackName("stackName");
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
         auditListSuccess = objectMapper.readValue(new File("src/test/resources/ExpectedVServerFound.json"),
                 AAIObjectAuditList.class);
         auditListFailure = objectMapper.readValue(new File("src/test/resources/Vserver2_Found_VServer1_Not_Found.json"),
index 4b569d2..0ec4a03 100644 (file)
 package org.onap.so.heatbridge;
 
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyString;
index a7f2133..630d290 100644 (file)
@@ -22,8 +22,8 @@ package org.onap.so.adapters.requestsdb;
 
 
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import java.sql.Timestamp;
 import java.time.Instant;
index e46092f..04c1c2b 100644 (file)
@@ -21,9 +21,9 @@
 package org.onap.so.adapters.sdnc;
 
 import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
 import static org.junit.Assert.fail;
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
index df240cb..695981b 100644 (file)
@@ -49,7 +49,7 @@ public class ApplicationControllerCallbackTest {
 
     @Before
     public void setup() {
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
         appcTaskCallback = new ApplicationControllerCallback(mockExternalTask, mockExternalTaskService,
                 applicationControllerSupport);
     }
index 179bdab..5a6c341 100644 (file)
@@ -58,7 +58,7 @@ public class ApplicationControllerTaskTest extends ApplicationControllerTask {
 
     @Before
     public void setup() {
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
         doNothing().when(mdcSetup).setupMDC(mockExternalTask);
         doReturn(request).when(mockExternalTask).getVariable("appcOrchestratorRequest");
         doReturn(msoRequestId).when(mockExternalTask).getVariable("mso-request-id");
index 6d88ab6..fa81c8b 100644 (file)
@@ -21,7 +21,7 @@ package org.onap.asdc.activity;
 
 import java.nio.file.Files;
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.when;
index 24b1736..8b3e4f3 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -48,7 +48,7 @@ public class ASDCStatusCallBackTest extends BaseTest {
 
     @Before
     public void before() {
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
     }
 
     @Test
index a9687f0..d954485 100644 (file)
@@ -21,8 +21,8 @@
 package org.onap.so.asdc.installer;
 
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import java.util.ArrayList;
index bf327f5..5dbe1f3 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -126,7 +126,7 @@ public class ToscaResourceInstallerTest extends BaseTest {
 
     @Before
     public void before() {
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
 
         notificationData = new NotificationDataImpl();
         statusData = new JsonStatusData();
index 67889c6..af62b67 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -59,7 +59,7 @@ public class WatchdogDistributionTest extends BaseTest {
 
     @Before
     public void before() {
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
     }
 
     @Test
index 6994639..6003069 100644 (file)
@@ -68,7 +68,7 @@ class CreateAAIVfModuleTest extends MsoGroovyTest{
     @Before
     public void init() throws IOException {
         super.init("CreateAAIVfModule")
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
         executionFake = new DelegateExecutionFake()
         when(createAAIVfModule.getAAIClient()).thenReturn(client)
     }
index 9a778a7..be93399 100644 (file)
@@ -46,7 +46,7 @@ class PrepareUpdateAAIVfModuleTest {
 
     @Before
     void init() throws IOException {
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
     }
 
     @Test
index 12c437f..2289dab 100644 (file)
@@ -54,7 +54,7 @@ class UpdateAAIGenericVnfTest {
 
     @Before
     void init() throws IOException {
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
     }
 
     @Test
index d18170f..242792c 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -43,7 +43,7 @@ public class DefaultToShortClassNameBeanNameGeneratorTest {
 
     @Before
     public void before() {
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
     }
 
     @Test
index 44b6f35..0981da3 100644 (file)
@@ -20,9 +20,9 @@
 
 package org.onap.so.bpmn.common;
 
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
 import static org.junit.Assert.fail;
 import static org.mockito.Mockito.mock;
 import java.io.Serializable;
index 05af5f7..881d882 100644 (file)
@@ -24,7 +24,7 @@ import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
 import static com.github.tomakehurst.wiremock.client.WireMock.get;
 import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
 import static org.hamcrest.CoreMatchers.equalTo;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 import java.util.Map;
 import javax.ws.rs.core.UriBuilder;
 import org.junit.Test;
index 07f75db..68d35a0 100644 (file)
@@ -82,7 +82,7 @@ public class BBInputSetupExistingServiceTest {
 
     @Before
     public void setup() {
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
     }
 
     @Parameterized.Parameters
@@ -135,4 +135,3 @@ public class BBInputSetupExistingServiceTest {
                 any(String.class), isA(String.class), isA(CloudConfiguration.class));
     }
 }
-
index d7cfaf9..c81fd18 100644 (file)
@@ -88,7 +88,7 @@ public class BBInputSetupPopulateMethodsTest {
 
     @Before
     public void setup() {
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
     }
 
     @Parameterized.Parameters
index 48c6995..b8eaa36 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -50,7 +50,7 @@ public class ApplicationControllerActionTest extends BaseTest {
 
     @Before
     public void setup() {
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
 
         appCAction = new ApplicationControllerAction();
         appCAction.client = client;
index a2bb553..c2aedfc 100644 (file)
@@ -21,8 +21,8 @@
 package org.onap.so.client.dmaapproperties;
 
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
 import static org.mockito.Matchers.anyString;
 import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.doReturn;
index c70c2bd..da9ec70 100644 (file)
@@ -21,7 +21,7 @@
 package org.onap.so.client.restproperties;
 
 import static org.hamcrest.CoreMatchers.equalTo;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
index 9448c34..f698b04 100644 (file)
 package org.onap.so.bpmn.core;
 
 import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import static org.hamcrest.Matchers.isIn;
 import java.util.Arrays;
index 4a8b509..e3f9112 100644 (file)
@@ -21,7 +21,9 @@
 package org.onap.so.bpmn.core.internal;
 
 import static org.hamcrest.CoreMatchers.containsString;
-import static org.junit.Assert.*;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertFalse;
 import java.util.Optional;
 import org.junit.Test;
 
index 101db4f..ad5519d 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -43,7 +43,7 @@ class CreateCustomE2EServiceInstanceTest {
 
     @Before
     public void init() throws IOException {
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
     }
 
     @Captor
index 61b4957..07ac32e 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -49,7 +49,7 @@ class CreateVFCNSResourceTest extends MsoGroovyTest{
     @Before
     void init() throws IOException {
         super.init("CreateVFCNSResource")
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
         when(createVFCNSResource.getAAIClient()).thenReturn(client)
     }
 
index c5fd377..a098e5e 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -49,7 +49,7 @@ class CreateVfModuleInfraTest {
 
     @Before
     void init() throws IOException {
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
     }
 
    @Test
@@ -68,8 +68,8 @@ class CreateVfModuleInfraTest {
                Mockito.verify(mockExecution).setVariable(prefix + "dbAdapterEndpoint", "http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")
    }
 
-   
-   
+
+
     private static ExecutionEntity setupMock() {
         ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
         when(mockProcessDefinition.getKey()).thenReturn("CreateVfModuleInfra")
index 0f0946d..655417a 100644 (file)
@@ -1,22 +1,22 @@
-/*- 
- * ============LICENSE_START======================================================= 
- * ONAP - SO 
- * ================================================================================ 
- * Copyright (C) 2017 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. 
- * You may obtain a copy of the License at 
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0 
- * 
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS, 
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
- * See the License for the specific language governing permissions and 
- * limitations under the License. 
- * ============LICENSE_END========================================================= 
- */ 
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
 
 package org.onap.so.bpmn.infrastructure.scripts
 
@@ -63,7 +63,7 @@ class DeleteVfModuleVolumeInfraV1Test extends MsoGroovyTest {
        @Before
        void init() throws IOException {
                super.init("DeleteVfModuleVolumeInfraV1")
-               MockitoAnnotations.initMocks(this);
+               MockitoAnnotations.openMocks(this);
                when(deleteVfModuleVolumeInfraV1.getAAIClient()).thenReturn(client)
        }
 
@@ -80,7 +80,7 @@ class DeleteVfModuleVolumeInfraV1Test extends MsoGroovyTest {
    <messageId>ebb9ef7b-a6a5-40e6-953e-f868f1767677</messageId>
    <notificationUrl>http://localhost:28080/mso/WorkflowMessage/VNFAResponse/ebb9ef7b-a6a5-40e6-953e-f868f1767677</notificationUrl>
 </deleteVolumeGroupRequest>"""
-       
+
        String dbRequestXml = """<soapenv:Envelope xmlns:req="http://org.onap.so/requestsdb"
                   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header/>
@@ -95,7 +95,7 @@ class DeleteVfModuleVolumeInfraV1Test extends MsoGroovyTest {
       </req:updateInfraRequest>
    </soapenv:Body>
 </soapenv:Envelope>"""
-       
+
        String completionRequestXml = """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
                             xmlns:ns="http://org.onap/so/request/types/v1"
                             xmlns="http://org.onap/so/infra/vnf-request/v1">
@@ -107,7 +107,7 @@ class DeleteVfModuleVolumeInfraV1Test extends MsoGroovyTest {
    <aetgt:status-message>Volume Group has been deleted successfully.</aetgt:status-message>
    <aetgt:mso-bpel-name>BPMN VF Module Volume action: DELETE</aetgt:mso-bpel-name>
 </aetgt:MsoCompletionRequest>"""
-       
+
        String falloutHandlerRequestXml = """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
                              xmlns:ns="http://org.onap/so/request/types/v1"
                              xmlns="http://org.onap/so/infra/vnf-request/v1">
@@ -121,11 +121,11 @@ class DeleteVfModuleVolumeInfraV1Test extends MsoGroovyTest {
       <aetgt:ErrorCode>5000</aetgt:ErrorCode>
    </aetgt:WorkflowException>
 </aetgt:FalloutHandlerRequest>"""
-       
+
 
        @Test
        public void testPrepareVnfAdapterDeleteRequest() {
-               
+
                ExecutionEntity mockExecution = setupMock('DeleteVfModuleVolumeInfraV1')
                when(mockExecution.getVariable("DELVfModVol_cloudRegion")).thenReturn('RDM2WAGPLCP')
                when(mockExecution.getVariable("DELVfModVol_tenantId")).thenReturn('fba1bd1e195a404cacb9ce17a9b2b421')
@@ -139,54 +139,54 @@ class DeleteVfModuleVolumeInfraV1Test extends MsoGroovyTest {
 
                DeleteVfModuleVolumeInfraV1 myproc = new DeleteVfModuleVolumeInfraV1()
                myproc.prepareVnfAdapterDeleteRequest(mockExecution, 'true')
-               
+
                verify(mockExecution).setVariable("DELVfModVol_deleteVnfARequest", deleteVnfAdapterRequestXml)
 
        }
-       
+
        @Test
        //@Ignore
        public void testPrepareDbRequest() {
-               
+
                ExecutionEntity mockExecution = setupMock('DeleteVfModuleVolumeInfraV1')
                when(mockExecution.getVariable("DELVfModVol_requestId")).thenReturn('TEST-REQUEST-ID-0123')
                when(mockExecution.getVariable("DELVfModVol_volumeOutputs")).thenReturn('')
                when(mockExecution.getVariable("mso.adapters.db.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
                when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
-               
+
                DeleteVfModuleVolumeInfraV1 myproc = new DeleteVfModuleVolumeInfraV1()
                myproc.prepareDBRequest(mockExecution, 'true')
-               
+
                verify(mockExecution).setVariable("DELVfModVol_updateInfraRequest", dbRequestXml)
        }
 
        @Test
        public void testPrepareCompletionHandlerRequest() {
-               
+
                ExecutionEntity mockExecution = setupMock('DeleteVfModuleVolumeInfraV1')
                when(mockExecution.getVariable("mso-request-id")).thenReturn('TEST-REQUEST-ID-0123')
                when(mockExecution.getVariable("DELVfModVol_source")).thenReturn('VID')
-               
+
                DeleteVfModuleVolumeInfraV1 myproc = new DeleteVfModuleVolumeInfraV1()
                myproc.prepareCompletionHandlerRequest(mockExecution, 'true')
-               
+
                verify(mockExecution).setVariable("DELVfModVol_CompleteMsoProcessRequest", completionRequestXml)
        }
-       
+
        @Test
        public void testPrepareFalloutHandler() {
-               
+
                WorkflowException workflowException = new WorkflowException('DeleteVfModuleVolumeInfraV1', 5000, 'Unexpected Error')
-               
+
                ExecutionEntity mockExecution = setupMock('DeleteVfModuleVolumeInfraV1')
-               
+
                when(mockExecution.getVariable("DELVfModVol_requestId")).thenReturn('TEST-REQUEST-ID-0123')
                when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
                when(mockExecution.getVariable("DELVfModVol_source")).thenReturn('VID')
-               
+
                DeleteVfModuleVolumeInfraV1 myproc = new DeleteVfModuleVolumeInfraV1()
                myproc.prepareFalloutHandler(mockExecution, 'true')
-               
+
                verify(mockExecution).setVariable("DELVfModVol_Success", false)
                verify(mockExecution).setVariable("DELVfModVol_FalloutHandlerRequest", falloutHandlerRequestXml)
        }
index a8c818e..0679bbd 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -59,7 +59,7 @@ class DoCreateVnfAndModulesTest {
 
        @Before
        void init() throws IOException {
-               MockitoAnnotations.initMocks(this);
+               MockitoAnnotations.openMocks(this);
        }
 
        @Test
@@ -94,7 +94,7 @@ class DoCreateVnfAndModulesTest {
                String lastKey = list.get(20)
                Assert.assertEquals("rollbackData", lastKey)
        }
+
        @Test
        void testQueryCatalogDB() {
                ExecutionEntity mockExecution = setupMock()
@@ -122,7 +122,7 @@ class DoCreateVnfAndModulesTest {
                String lastKey = list.get(20)
                Assert.assertEquals("baseVfModuleId", lastKey)
        }
+
        @Test
        void testQueryCatalogDBWithVfModuleNames() {
                ExecutionEntity mockExecution = setupMock()
@@ -155,7 +155,7 @@ class DoCreateVnfAndModulesTest {
                String lastKey = list.get(20)
                Assert.assertEquals("baseVfModuleId", lastKey)
        }
+
        @Test
        void testPreProcessAddonModule() {
                ExecutionEntity mockExecution = setupMock()
@@ -195,7 +195,7 @@ class DoCreateVnfAndModulesTest {
                String lastKey = list.get(16)
                Assert.assertEquals("initialCount", lastKey)
        }
+
        @Test
        void testPreProcessAddonModuleWithVfModuleNames() {
                ExecutionEntity mockExecution = setupMock()
@@ -208,7 +208,7 @@ class DoCreateVnfAndModulesTest {
                vfModuleNames.put("3ec98c7a-ac20-49a1-9e0d-09fea7e8db45", "VGWA:e2:25:25:25:%")
                vfModuleNames.put("cc250e7e-746b-4d84-8064-df20c74213a6", "VGWB:f9:32:32:32:%")
                when(mockExecution.getVariable("vfModuleNames")).thenReturn(vfModuleNames)
-               
+
                VnfResource vnf = serviceDecomposition.getVnfResources().get(0);
                List<ModuleResource> vfModules = vnf.getAllVfModuleObjects()
 
@@ -240,7 +240,7 @@ class DoCreateVnfAndModulesTest {
                String lastKey = list.get(16)
                Assert.assertEquals("initialCount", lastKey)
        }
+
        private static setupBasicProcessInputs(ExecutionEntity mockExecution) {
                when(mockExecution.getVariable("prefix")).thenReturn("DCVAM_")
                when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
@@ -404,7 +404,7 @@ class DoCreateVnfAndModulesTest {
                ar.setProvidingServiceModelUuid("61b6e96a-f0c6-4f34-a91c-dab3574dd025")
                ar.setNfType("TunnelXConn")
                ar.setNfRole("TunnelXConn")
-               
+
                ar = new AllottedResource()
                allottedResources.add(ar)
                ar.setResourceId("3b1b3686-ccfe-4e7c-9d6b-76419db398f9")
@@ -443,7 +443,7 @@ class DoCreateVnfAndModulesTest {
                ar.setProvidingServiceModelUuid("0e500bca-15ac-42eb-a2f1-4bfd3b2828ff")
                ar.setNfType("BRG")
                ar.setNfRole("BRG")
-               
+
                return serviceDecomposition
        }
 }
index d7ba10a..c57c214 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -49,7 +49,7 @@ class DoCreateVnfTest {
 
     @Before
     void init() throws IOException {
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
     }
 
     @Test
@@ -79,7 +79,7 @@ class DoCreateVnfTest {
         String str = list.get(51)
         Assert.assertEquals("http://localhost:28080/mso/SDNCAdapterCallbackService", str)
     }
+
     private static ExecutionEntity setupMock() {
         ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
         when(mockProcessDefinition.getKey()).thenReturn("DoCreateVnf")
index ea79e0e..879d9d3 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -51,7 +51,7 @@ class DoDeleteServiceInstanceTest {
 
     @Before
     void init() throws IOException {
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
     }
 
     @Test
@@ -70,7 +70,7 @@ class DoDeleteServiceInstanceTest {
         Mockito.verify(mex).setVariable("siParamsXml", "")
     }
 
-   
+
     @Test
     public void testPostProcessAAIGET() {
         ExecutionEntity mockExecution = setupMock()
index 5882f73..1c50483 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -59,7 +59,7 @@ class DoDeleteVfModuleTest extends MsoGroovyTest{
     @Before
     public void init() throws IOException {
         super.init("DoDeleteVfModule")
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
         when(doDeleteVfModule.getAAIClient()).thenReturn(client)
     }
 
@@ -85,7 +85,7 @@ class DoDeleteVfModuleTest extends MsoGroovyTest{
         Mockito.verify(mockExecution, times(1)).setVariable(captor.capture(), captor.capture())
         XmlComparator.assertXMLEquals(expectedValue, captor.getValue())
     }
-   
+
 
     @Test
     void testDeleteNetworkPoliciesFromAAI() {
@@ -134,7 +134,7 @@ class DoDeleteVfModuleTest extends MsoGroovyTest{
         Mockito.verify(mockExecution).setVariable("DoDVfMod_queryAAIVfModuleForStatusResponseCode", 200)
     }
 
-  
+
 
     private ExecutionEntity setupMock() {
 
@@ -178,4 +178,3 @@ class DoDeleteVfModuleTest extends MsoGroovyTest{
 
     }
 }
-
index 84d88ff..c103f4c 100644 (file)
@@ -9,9 +9,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -92,7 +92,7 @@ class DoDeleteVfModuleVolumeV2Test extends MsoGroovyTest{
     @Before
     public void init() throws IOException {
         super.init("DoDeleteVfModuleVolumeV2")
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
         when(deleteVfModuleVolumeV2.getAAIClient()).thenReturn(client)
         when(mockEnvironment.getProperty("mso.workflow.global.default.aai.version")).thenReturn("14")
         when(mockEnvironment.getProperty("mso.workflow.global.default.aai.namespace")).thenReturn("defaultTestNamespace")
index e85b813..3162a77 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -65,7 +65,7 @@ public class DoDeleteVnfAndModulesTest extends MsoGroovyTest{
     @Before
     public void init() throws IOException {
         super.init("DoDeleteVnfAndModules")
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
         when(doDeleteVnfAndModules.getAAIClient()).thenReturn(client)
     }
 
@@ -96,7 +96,7 @@ public class DoDeleteVnfAndModulesTest extends MsoGroovyTest{
         Mockito.verify(mockExecution).setVariable("sdncCallbackUrl", "http://localhost:8090/SDNCAdapterCallback")
     }
 
-  
+
 
     @Test
     public void testQueryAAIVfModuleNullEndPoint() {
index 64d3fca..05c4c33 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -51,7 +51,7 @@ public class AAIDeleteServiceInstanceTest {
 
     @Before
     public void before() {
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
 
         aaiDeleteServiceInstance = new AAIDeleteServiceInstance();
         aaiDeleteServiceInstance.setAaiClient(aaiResourcesClient);
index 55ee478..7d8cba2 100644 (file)
@@ -20,7 +20,7 @@
 package org.onap.so.bpmn.infrastructure.flowspecific.tasks;
 
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.times;
index 7a0a562..612b6a5 100644 (file)
@@ -21,8 +21,8 @@
 package org.onap.so.bpmn.infrastructure.flowspecific.tasks;
 
 import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.doReturn;
index c6ff6d6..779b675 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -76,7 +76,7 @@ public class ManualHandlingTasksTest extends BaseTaskTest {
 
     @Before
     public void before() {
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
         delegateExecution = new DelegateExecutionFake();
         buildingBlockExecution = new DelegateExecutionImpl(delegateExecution);
         generalBuildingBlock = new GeneralBuildingBlock();
index 21f6b68..365a98d 100644 (file)
 package org.onap.so.bpmn.infrastructure.sdnc.mapper;
 
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import java.util.HashMap;
 import java.util.Map;
index 0da683d..442cff9 100644 (file)
@@ -21,7 +21,7 @@
 package org.onap.so.bpmn.infrastructure.workflow.tasks;
 
 import static org.hamcrest.CoreMatchers.equalTo;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.mockito.Mockito.when;
 import org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake;
 import org.junit.Test;
index d66643a..9d21541 100644 (file)
@@ -28,10 +28,10 @@ package org.onap.so.bpmn.infrastructure.workflow.tasks;
 
 import static org.hamcrest.CoreMatchers.containsString;
 import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyList;
index fc8cc57..5cdca49 100644 (file)
@@ -68,12 +68,12 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Optional;
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
 import static org.junit.Assert.fail;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.doReturn;
index 1066ca1..6bc982a 100644 (file)
@@ -38,7 +38,7 @@ public class UpgradePreWorkflowValidatorTest {
 
     @Before
     public void setup() {
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
         validator = new UpgradePreWorkflowValidator(catalogDbClient);
         objectMapper = new ObjectMapper();
     }
index 51a066e..d3aadf1 100644 (file)
@@ -23,9 +23,9 @@
 package org.onap.so.client.aai.mapper;
 
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
 import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Paths;
index d757991..fcbe977 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -100,7 +100,7 @@ public class VnfVolumeAdapterClientIT extends BaseIntegrationTest {
         AdapterRestClient mockClient = mock(AdapterRestClient.class);
         doReturn(mockClient).when(client).getAdapterRestClient("/" + AAI_VOLUME_GROUP_ID);
         when(mockClient.delete(request, DeleteVolumeGroupResponse.class)).thenReturn(mockResponse);
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
 
         DeleteVolumeGroupResponse response = client.deleteVNFVolumes(AAI_VOLUME_GROUP_ID, request);
         assertEquals("Testing DeleteVolumeGroup response", mockResponse.getVolumeGroupDeleted(),
@@ -120,7 +120,7 @@ public class VnfVolumeAdapterClientIT extends BaseIntegrationTest {
         doReturn(mockClient).when(client).getAdapterRestClient("/" + AAI_VOLUME_GROUP_ID);
         when(mockClient.delete(request, DeleteVolumeGroupResponse.class))
                 .thenThrow(new InternalServerErrorException("Error in delete volume group"));
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
 
         client.deleteVNFVolumes(AAI_VOLUME_GROUP_ID, request);
     }
@@ -136,7 +136,7 @@ public class VnfVolumeAdapterClientIT extends BaseIntegrationTest {
         AdapterRestClient mockClient = mock(AdapterRestClient.class);
         doReturn(mockClient).when(client).getAdapterRestClient("/" + AAI_VOLUME_GROUP_ID + "/rollback");
         when(mockClient.delete(request, RollbackVolumeGroupResponse.class)).thenReturn(mockResponse);
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
 
         RollbackVolumeGroupResponse response = client.rollbackVNFVolumes(AAI_VOLUME_GROUP_ID, request);
         assertEquals("Testing RollbackVolumeGroup response", mockResponse.getVolumeGroupRolledBack(),
@@ -155,7 +155,7 @@ public class VnfVolumeAdapterClientIT extends BaseIntegrationTest {
         doReturn(mockClient).when(client).getAdapterRestClient("/" + AAI_VOLUME_GROUP_ID + "/rollback");
         when(mockClient.delete(request, RollbackVolumeGroupResponse.class))
                 .thenThrow(new InternalServerErrorException("Error in rollback volume group"));
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
 
         client.rollbackVNFVolumes(AAI_VOLUME_GROUP_ID, request);
     }
@@ -171,7 +171,7 @@ public class VnfVolumeAdapterClientIT extends BaseIntegrationTest {
         AdapterRestClient mockClient = mock(AdapterRestClient.class);
         doReturn(mockClient).when(client).getAdapterRestClient("/" + AAI_VOLUME_GROUP_ID);
         when(mockClient.put(request, UpdateVolumeGroupResponse.class)).thenReturn(mockResponse);
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
 
         UpdateVolumeGroupResponse response = client.updateVNFVolumes(AAI_VOLUME_GROUP_ID, request);
         assertEquals("Testing DeleteVfModule response", mockResponse.getVolumeGroupId(), response.getVolumeGroupId());
@@ -189,7 +189,7 @@ public class VnfVolumeAdapterClientIT extends BaseIntegrationTest {
         doReturn(mockClient).when(client).getAdapterRestClient("/" + AAI_VOLUME_GROUP_ID);
         when(mockClient.put(request, UpdateVolumeGroupResponse.class))
                 .thenThrow(new InternalServerErrorException("Error in update volume group"));
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
 
         client.updateVNFVolumes(AAI_VOLUME_GROUP_ID, request);
     }
index 9dfc245..fa3cce5 100644 (file)
@@ -21,8 +21,8 @@
 package org.onap.so.client.adapter.vnf.mapper;
 
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
 import static org.mockito.ArgumentMatchers.isA;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.reset;
@@ -59,7 +59,7 @@ public class VnfAdapterObjectMapperTest {
 
     @Before
     public void before() {
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
 
     }
 
index d6ab3db..41b8c18 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,8 +22,8 @@ package org.onap.so.client.adapter.vnf.mapper;
 
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
 import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.doNothing;
 import java.util.Arrays;
@@ -48,7 +48,7 @@ public class VnfAdapterVfModuleObjectMapperTest {
 
     @Before
     public void before() {
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
     }
 
     @Test
index c908c7b..3636873 100644 (file)
@@ -21,7 +21,7 @@
 package org.onap.so.client.namingservice;
 
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 import java.util.ArrayList;
 import java.util.List;
 import org.junit.Test;
index 7c50b20..cbd192c 100644 (file)
@@ -21,7 +21,7 @@
 package org.onap.so.client.namingservice;
 
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 import java.util.HashMap;
 import org.junit.Test;
 import org.onap.namingservice.model.Element;
index 071a58f..9c16915 100644 (file)
@@ -21,9 +21,9 @@
 package org.onap.so.client.orchestration;
 
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.eq;
index f3a04e6..81f2014 100644 (file)
@@ -18,8 +18,8 @@ import org.springframework.test.context.TestPropertySource;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 import org.springframework.web.client.HttpClientErrorException;
 import org.springframework.web.client.RestTemplate;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
 import static org.hamcrest.CoreMatchers.instanceOf;
 
 
index 96e2a74..9ec0b0c 100644 (file)
@@ -20,8 +20,8 @@
 
 package org.onap.so.client.orchestration;
 
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
 import static org.mockito.ArgumentMatchers.isA;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.times;
index 872bcc5..99eac00 100644 (file)
@@ -20,7 +20,7 @@
 
 package org.onap.so.client.orchestration;
 
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
index f9547cb..29c8196 100644 (file)
@@ -24,7 +24,6 @@ package org.onap.so.client.policy;
 
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
 import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.eq;
@@ -159,7 +158,7 @@ public class PolicyClientImplTest {
         String configJson = returnedPolicyConfigList[0].getConfig();
         Config actual = client.getConfigFromStringJson(configJson);
 
-        assertThat(actual, sameBeanAs(expected));
+        org.hamcrest.MatcherAssert.assertThat(actual, sameBeanAs(expected));
     }
 
     @Test
@@ -178,7 +177,7 @@ public class PolicyClientImplTest {
 
         Config actual = client.getConfigWithPolicyName("policyName");
 
-        assertThat(actual, sameBeanAs(expected));
+        org.hamcrest.MatcherAssert.assertThat(actual, sameBeanAs(expected));
 
     }
 }
index ec482f4..407e6b9 100644 (file)
@@ -24,8 +24,8 @@ import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.instanceOf;
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
 import javax.ws.rs.NotFoundException;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.Response.Status;
index e648857..22b5801 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -40,7 +40,7 @@ public class AAIErrorFormatterTest {
 
     @Before
     public void init() {
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
     }
 
     @Test
index 03fd0ac..f12a751 100644 (file)
@@ -30,9 +30,9 @@ import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
 import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig;
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
 import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertThat;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
index c9811fa..2814bd6 100644 (file)
@@ -25,7 +25,7 @@ import static com.github.tomakehurst.wiremock.client.WireMock.get;
 import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
 import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig;
 import static org.hamcrest.CoreMatchers.equalTo;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.spy;
 import java.util.List;
index 25d3b21..a1903a6 100644 (file)
@@ -21,8 +21,8 @@
 package org.onap.aaiclient.client.aai;
 
 import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.greaterThan;
-import static org.junit.Assert.assertThat;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.doReturn;
index 46e2d40..14a8c0e 100644 (file)
@@ -21,7 +21,7 @@
 package org.onap.so.apihandler.filters;
 
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.verify;
index 86e8472..88ea7e9 100644 (file)
@@ -26,8 +26,8 @@ import static com.github.tomakehurst.wiremock.client.WireMock.get;
 import static com.github.tomakehurst.wiremock.client.WireMock.post;
 import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import java.io.IOException;
 import java.nio.file.Files;
index 999f441..72c842b 100644 (file)
@@ -21,8 +21,8 @@
 package org.onap.so.apihandlerinfra;
 
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
 import static org.mockito.ArgumentMatchers.anyString;
 import java.net.URI;
 import javax.ws.rs.container.ContainerRequestContext;
index 7b2e502..823f255 100644 (file)
@@ -27,8 +27,8 @@ import static com.github.tomakehurst.wiremock.client.WireMock.post;
 import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
 import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
 import static org.onap.logging.filter.base.Constants.HttpHeaders.ONAP_PARTNER_NAME;
 import static org.onap.logging.filter.base.Constants.HttpHeaders.ONAP_REQUEST_ID;
 import static org.onap.logging.filter.base.Constants.HttpHeaders.TRANSACTION_ID;
index d3af955..a2ab5a6 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -90,7 +90,7 @@ public class MsoRequestTest extends BaseTest {
 
     @Before
     public void setUp() {
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
     }
 
     public String inputStream(String JsonInput) throws IOException {
index fcca3a6..7b2bdcf 100644 (file)
@@ -24,9 +24,9 @@ import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
 import static org.hamcrest.CoreMatchers.containsString;
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.when;
index 317d23a..13586fe 100644 (file)
@@ -21,8 +21,8 @@
 package org.onap.so.apihandlerinfra;
 
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
 import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.verify;
index 82e0e9d..8a0ff4f 100644 (file)
@@ -28,10 +28,10 @@ import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
 import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
 import static com.github.tomakehurst.wiremock.client.WireMock.urlPathMatching;
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import static org.onap.logging.filter.base.Constants.HttpHeaders.ONAP_PARTNER_NAME;
 import static org.onap.logging.filter.base.Constants.HttpHeaders.ONAP_REQUEST_ID;
index 07c4847..6565711 100644 (file)
@@ -25,8 +25,8 @@ import static com.github.tomakehurst.wiremock.client.WireMock.get;
 import static com.github.tomakehurst.wiremock.client.WireMock.post;
 import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
index 552d204..1d614c5 100644 (file)
@@ -49,8 +49,8 @@ import java.util.ArrayList;
 import java.util.List;
 import static com.github.tomakehurst.wiremock.client.WireMock.*;
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
 
 public class WorkflowSpecificationsHandlerTest extends BaseTest {
     @Autowired
index a3c4ec8..8fe7e9f 100644 (file)
@@ -20,7 +20,6 @@
 
 package org.onap.so.apihandlerinfra.tenantisolation.helpers;
 
-import static org.junit.Assert.assertThat;
 import org.junit.Before;
 import org.junit.Test;
 import org.onap.so.apihandlerinfra.BaseTest;
@@ -29,6 +28,7 @@ import org.onap.so.db.request.beans.OperationalEnvDistributionStatus;
 import org.onap.so.db.request.beans.OperationalEnvServiceModelStatus;
 import org.springframework.beans.factory.annotation.Autowired;
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 
 public class ActivateVnfDBHelperTest extends BaseTest {
index 0b96852..614630d 100644 (file)
@@ -28,9 +28,9 @@ import static com.github.tomakehurst.wiremock.client.WireMock.post;
 import static com.github.tomakehurst.wiremock.client.WireMock.put;
 import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
 import static com.github.tomakehurst.wiremock.client.WireMock.urlPathMatching;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.startsWith;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
 import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.MediaType;
 import org.apache.http.HttpStatus;
index 865bfd1..e4f7e2b 100644 (file)
@@ -28,7 +28,7 @@ import static com.github.tomakehurst.wiremock.client.WireMock.put;
 import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
 import static com.github.tomakehurst.wiremock.client.WireMock.urlPathMatching;
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 import java.util.UUID;
 import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.MediaType;
index 8d2993e..8af94e5 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -62,7 +62,7 @@ public class SDNOValidatorIT extends BaseIntegrationTest {
 
     @Before
     public void setUpTests() {
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
 
     }