From: Fiete Ostkamp Date: Fri, 8 Aug 2025 05:12:51 +0000 (+0200) Subject: Remove unreachable throws declarations X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=ed00ec55b2f0e453c322a5aa5e450a04328382dc;p=so.git Remove unreachable throws declarations - remove throws declarations for exceptions that are never thrown Issue-ID: SO-4219 Signed-off-by: Fiete Ostkamp Change-Id: Id55473ea6b85da24fdc033fae3f162dbddb0517f --- diff --git a/adapters/etsi-sol002-adapter/src/main/java/org/onap/so/adapters/vevnfm/configuration/StartupConfiguration.java b/adapters/etsi-sol002-adapter/src/main/java/org/onap/so/adapters/vevnfm/configuration/StartupConfiguration.java index 8b5afbf6a1..e540a90081 100644 --- a/adapters/etsi-sol002-adapter/src/main/java/org/onap/so/adapters/vevnfm/configuration/StartupConfiguration.java +++ b/adapters/etsi-sol002-adapter/src/main/java/org/onap/so/adapters/vevnfm/configuration/StartupConfiguration.java @@ -49,7 +49,7 @@ public class StartupConfiguration { } @EventListener(ApplicationReadyEvent.class) - public void onApplicationReadyEvent() throws Exception { + public void onApplicationReadyEvent() { if (!environment.acceptsProfiles(Profiles.of(TEST_PROFILE))) { final List infos = startupService.receiveVnfm(); subscriptionScheduler.setInfos(infos); diff --git a/adapters/etsi-sol002-adapter/src/main/java/org/onap/so/adapters/vevnfm/service/StartupService.java b/adapters/etsi-sol002-adapter/src/main/java/org/onap/so/adapters/vevnfm/service/StartupService.java index eba1d087c6..ee85adc1f7 100644 --- a/adapters/etsi-sol002-adapter/src/main/java/org/onap/so/adapters/vevnfm/service/StartupService.java +++ b/adapters/etsi-sol002-adapter/src/main/java/org/onap/so/adapters/vevnfm/service/StartupService.java @@ -25,7 +25,6 @@ import java.util.List; import org.onap.aai.domain.yang.EsrSystemInfo; import org.onap.so.adapters.vevnfm.aai.AaiConnection; import org.onap.so.adapters.vevnfm.configuration.ConfigProperties; -import org.onap.so.adapters.vevnfm.exception.VeVnfmException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.retry.annotation.Backoff; @@ -49,7 +48,7 @@ public class StartupService { } @Retryable(value = {Exception.class}, maxAttempts = 5, backoff = @Backoff(delay = 5000, multiplier = 2)) - public List receiveVnfm() throws VeVnfmException { + public List receiveVnfm() { return aaiConnection.receiveVnfm(); } diff --git a/adapters/etsi-sol002-adapter/src/main/java/org/onap/so/adapters/vevnfm/service/SubscribeSender.java b/adapters/etsi-sol002-adapter/src/main/java/org/onap/so/adapters/vevnfm/service/SubscribeSender.java index 576d58f7be..e7d2e16e6e 100644 --- a/adapters/etsi-sol002-adapter/src/main/java/org/onap/so/adapters/vevnfm/service/SubscribeSender.java +++ b/adapters/etsi-sol002-adapter/src/main/java/org/onap/so/adapters/vevnfm/service/SubscribeSender.java @@ -50,7 +50,7 @@ public class SubscribeSender { this.restProvider = restProvider; } - public String send(final EsrSystemInfo info, final LccnSubscriptionRequest request) throws VeVnfmException { + public String send(final EsrSystemInfo info, final LccnSubscriptionRequest request) { final ResponseEntity response = restProvider.postHttpRequest(request, getUrl(info), SubscribeToManoResponse.class); diff --git a/adapters/etsi-sol002-adapter/src/main/java/org/onap/so/adapters/vevnfm/service/SubscriptionScheduler.java b/adapters/etsi-sol002-adapter/src/main/java/org/onap/so/adapters/vevnfm/service/SubscriptionScheduler.java index a696336011..9ba1432ad9 100644 --- a/adapters/etsi-sol002-adapter/src/main/java/org/onap/so/adapters/vevnfm/service/SubscriptionScheduler.java +++ b/adapters/etsi-sol002-adapter/src/main/java/org/onap/so/adapters/vevnfm/service/SubscriptionScheduler.java @@ -82,14 +82,14 @@ public class SubscriptionScheduler { return esrIds != null && !esrIds.isEmpty(); } - private void singleSubscribe(final EsrId esrId) throws VeVnfmException { + private void singleSubscribe(final EsrId esrId) { if (esrId.getId() == null) { logger.info("Single subscribe task"); esrId.setId(subscriberService.subscribe(esrId.getInfo())); } } - private void singleCheckSubscription(final EsrId esrId) throws VeVnfmException { + private void singleCheckSubscription(final EsrId esrId) { if (esrId.getId() != null) { logger.info("Checking subscription: {}", esrId.getId()); if (!subscriberService.checkSubscription(esrId.getInfo(), esrId.getId())) { diff --git a/adapters/etsi-sol002-adapter/src/test/java/org/onap/so/adapters/vevnfm/controller/NotificationControllerTest.java b/adapters/etsi-sol002-adapter/src/test/java/org/onap/so/adapters/vevnfm/controller/NotificationControllerTest.java index 9406b299ea..a6c1c6b977 100644 --- a/adapters/etsi-sol002-adapter/src/test/java/org/onap/so/adapters/vevnfm/controller/NotificationControllerTest.java +++ b/adapters/etsi-sol002-adapter/src/test/java/org/onap/so/adapters/vevnfm/controller/NotificationControllerTest.java @@ -65,7 +65,7 @@ public class NotificationControllerTest { } @Test - public void testReceiveNotification() throws Exception { + public void testReceiveNotification() { // given final MockHttpServletRequestBuilder request = MockMvcRequestBuilders.post(notification).contentType(MediaType.APPLICATION_JSON).content(JSON); diff --git a/adapters/etsi-sol002-adapter/src/test/java/org/onap/so/adapters/vevnfm/service/SubscribeSenderTest.java b/adapters/etsi-sol002-adapter/src/test/java/org/onap/so/adapters/vevnfm/service/SubscribeSenderTest.java index 265bce043c..387301ea6d 100644 --- a/adapters/etsi-sol002-adapter/src/test/java/org/onap/so/adapters/vevnfm/service/SubscribeSenderTest.java +++ b/adapters/etsi-sol002-adapter/src/test/java/org/onap/so/adapters/vevnfm/service/SubscribeSenderTest.java @@ -37,7 +37,6 @@ import org.onap.aai.domain.yang.EsrSystemInfo; import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.LccnSubscriptionRequest; import org.onap.so.adapters.vevnfm.configuration.ConfigProperties; import org.onap.so.adapters.vevnfm.configuration.StartupConfiguration; -import org.onap.so.adapters.vevnfm.exception.VeVnfmException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.http.HttpMethod; @@ -86,7 +85,7 @@ public class SubscribeSenderTest { } @Test - public void testSuccess() throws VeVnfmException { + public void testSuccess() { // given final EsrSystemInfo info = new EsrSystemInfo(); info.setServiceUrl(URL); diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/GlanceClientImpl.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/GlanceClientImpl.java index b614a92177..83dd3447d9 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/GlanceClientImpl.java +++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/GlanceClientImpl.java @@ -85,8 +85,7 @@ public class GlanceClientImpl extends MsoCommonUtils { } } - public Image queryImage(String cloudSiteId, String tenantId, String imageId) - throws MsoCloudSiteNotFound, GlanceClientException { + public Image queryImage(String cloudSiteId, String tenantId, String imageId) throws GlanceClientException { try { Glance glanceClient = getGlanceClient(cloudSiteId, tenantId); // list is set to false, otherwise an invalid URL is appended diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java index fe060703cc..cbe2395b94 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java +++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java @@ -1196,7 +1196,7 @@ public class MsoHeatUtils extends MsoCommonUtils implements VduPlugin { } public Stacks queryStacks(String cloudSiteId, String tenantId, int limit, String marker) - throws MsoCloudSiteNotFound, HeatClientException { + throws HeatClientException { Heat heatClient; try { heatClient = getHeatClient(cloudSiteId, tenantId); diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/StubOpenStack.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/StubOpenStack.java index 120c3e3493..968f67ce1d 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/StubOpenStack.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/StubOpenStack.java @@ -68,18 +68,17 @@ public class StubOpenStack { .withHeader("Content-Type", "application/json").withBodyFile(filename).withStatus(HttpStatus.SC_OK))); } - public static void mockOpenStackPostTenantWithBodyFile_200(WireMockServer wireMockServer) throws IOException { + public static void mockOpenStackPostTenantWithBodyFile_200(WireMockServer wireMockServer) { wireMockServer.stubFor(post(urlPathEqualTo("/mockPublicUrl/tenants")) .willReturn(aResponse().withBodyFile("OpenstackResponse_Tenant.json").withStatus(HttpStatus.SC_OK))); } - public static void mockOpenStackGetTenantByName(WireMockServer wireMockServer, String tenantName) - throws IOException { + public static void mockOpenStackGetTenantByName(WireMockServer wireMockServer, String tenantName) { wireMockServer.stubFor(get(urlMatching("/mockPublicUrl/tenants/[?]name=" + tenantName)) .willReturn(aResponse().withBodyFile("OpenstackResponse_Tenant.json").withStatus(HttpStatus.SC_OK))); } - public static void mockOpenStackGetTenantById(WireMockServer wireMockServer, String tenantId) throws IOException { + public static void mockOpenStackGetTenantById(WireMockServer wireMockServer, String tenantId) { wireMockServer.stubFor(get(urlPathEqualTo("/mockPublicUrl/tenants/tenantId")) .willReturn(aResponse().withBodyFile("OpenstackResponse_Tenant.json").withStatus(HttpStatus.SC_OK))); } diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/authentication/AuthenticationMethodTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/authentication/AuthenticationMethodTest.java index 78b5c8ede9..ec77a8f7be 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/authentication/AuthenticationMethodTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/authentication/AuthenticationMethodTest.java @@ -32,7 +32,6 @@ import org.onap.so.cloud.authentication.models.RackspaceAuthentication; import org.onap.so.db.catalog.beans.AuthenticationType; import org.onap.so.db.catalog.beans.CloudIdentity; import org.onap.so.utils.CryptoUtils; -import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.woorea.openstack.keystone.model.Authentication; @@ -102,7 +101,7 @@ public class AuthenticationMethodTest { } @Test - public void getAuthenticationForV3Test() throws JsonParseException, JsonMappingException, IOException { + public void getAuthenticationForV3Test() throws JsonMappingException, IOException { CloudIdentity identity = new CloudIdentity(); identity.setMsoId("my-username"); diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoCommonUtilsTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoCommonUtilsTest.java index 776a4b0754..1f255bfccc 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoCommonUtilsTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoCommonUtilsTest.java @@ -40,8 +40,6 @@ import org.onap.so.openstack.exceptions.MsoIOException; import org.onap.so.openstack.exceptions.MsoOpenstackException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.woorea.openstack.base.client.OpenStackBaseException; import com.woorea.openstack.base.client.OpenStackConnectException; @@ -92,7 +90,7 @@ public class MsoCommonUtilsTest extends BaseTest { } @Test - public final void testKeystoneErrorToMsoException() throws JsonParseException, JsonMappingException, IOException { + public final void testKeystoneErrorToMsoException() throws IOException { OpenStackBaseException openStackConnectException = new OpenStackConnectException("connect"); OpenStackBaseException openStackResponseException = new OpenStackResponseException("response", 1); @@ -123,7 +121,7 @@ public class MsoCommonUtilsTest extends BaseTest { } @Test - public final void testHeatExceptionToMsoException() throws JsonParseException, JsonMappingException, IOException { + public final void testHeatExceptionToMsoException() throws IOException { OpenStackBaseException openStackConnectException = new OpenStackConnectException("connect"); OpenStackBaseException openStackResponseException = new OpenStackResponseException("response", 1); @@ -154,8 +152,7 @@ public class MsoCommonUtilsTest extends BaseTest { } @Test - public final void testNeutronExceptionToMsoException() - throws JsonParseException, JsonMappingException, IOException { + public final void testNeutronExceptionToMsoException() throws IOException { OpenStackBaseException openStackConnectException = new OpenStackConnectException("connect"); OpenStackBaseException openStackResponseException = new OpenStackResponseException("response", 1); diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatEnvironmentEntryTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatEnvironmentEntryTest.java index 1b98f14e8c..d3bc7933fa 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatEnvironmentEntryTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatEnvironmentEntryTest.java @@ -32,8 +32,6 @@ import java.util.HashSet; import org.junit.Test; import org.onap.so.TestDataSetup; import org.onap.so.db.catalog.beans.HeatTemplateParam; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.databind.JsonMappingException; public class MsoHeatEnvironmentEntryTest extends TestDataSetup { @@ -54,8 +52,7 @@ public class MsoHeatEnvironmentEntryTest extends TestDataSetup { } @Test - public void toFullString_ResourceRegistryNotPresentInRawEntry() - throws JsonParseException, JsonMappingException, IOException { + public void toFullString_ResourceRegistryNotPresentInRawEntry() throws IOException { StringBuilder sb = new StringBuilder(RAW_ENTRY_WITH_NO_RESOURCE_REGISTRY); MsoHeatEnvironmentEntry testedObject = new MsoHeatEnvironmentEntry(sb); diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsITTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsITTest.java index 86b1413291..e3fc86971b 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsITTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsITTest.java @@ -181,7 +181,7 @@ public class MsoHeatUtilsITTest extends BaseTest { } @Test(expected = MsoOpenstackException.class) - public final void getHeatClientOpenStackResponseException404Test() throws MsoException, IOException { + public final void getHeatClientOpenStackResponseException404Test() throws MsoException { CloudSite cloudSite = getCloudSite(getCloudIdentity()); // mo mocks setup will cause 404 response from wiremock heatUtils.getHeatClient("MTN13", "TEST-tenant"); @@ -195,7 +195,7 @@ public class MsoHeatUtilsITTest extends BaseTest { } @Test(expected = MsoOpenstackException.class) - public final void getHeatClientOpenStackConnectExceptionTest() throws MsoException, IOException { + public final void getHeatClientOpenStackConnectExceptionTest() throws MsoException { CloudIdentity identity = getCloudIdentity(); identity.setIdentityUrl("http://unreachable"); CloudSite cloudSite = getCloudSite(identity); diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java index 8543ac0798..9c712e789d 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java @@ -127,7 +127,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils { } @Test - public final void pollStackForStatus_Create_Complete_Test() throws MsoException, IOException { + public final void pollStackForStatus_Create_Complete_Test() throws MsoException { Stack stack = new Stack(); stack.setId("id"); stack.setStackName("stackName"); @@ -149,7 +149,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils { } @Test - public final void pollStackForStatus_No_Polling_Test() throws MsoException, IOException { + public final void pollStackForStatus_No_Polling_Test() throws MsoException { Stack stack = new Stack(); stack.setId("id"); stack.setStackName("stackName"); @@ -167,7 +167,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils { } @Test - public final void pollStackForStatus_Polling_Exhausted_Test() throws MsoException, IOException { + public final void pollStackForStatus_Polling_Exhausted_Test() throws MsoException { Stack stack = new Stack(); stack.setId("id"); stack.setStackName("stackName"); @@ -184,7 +184,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils { } @Test - public final void postProcessStackCreate_CREATE_IN_PROGRESS_Test() throws MsoException, IOException { + public final void postProcessStackCreate_CREATE_IN_PROGRESS_Test() throws MsoException { Stack stack = new Stack(); stack.setId("id"); stack.setStackName("stackName"); @@ -200,7 +200,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils { } @Test - public final void postProcessStackCreate_Backout_True_Test() throws MsoException, IOException { + public final void postProcessStackCreate_Backout_True_Test() throws MsoException { Stack stack = new Stack(); stack.setId("id"); stack.setStackName("stackName"); @@ -224,7 +224,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils { } @Test - public final void postProcessStackCreate_Backout_True_Delete_Fail_Test() throws MsoException, IOException { + public final void postProcessStackCreate_Backout_True_Delete_Fail_Test() throws MsoException { Stack stack = new Stack(); stack.setId("id"); stack.setStackName("stackName"); @@ -249,7 +249,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils { } @Test - public final void postProcessStackCreate_Keypair_True_Test() throws MsoException, IOException { + public final void postProcessStackCreate_Keypair_True_Test() throws MsoException { Stack stack = new Stack(); stack.setId("id"); stack.setStackName("stackName"); @@ -273,7 +273,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils { } @Test - public final void handleUnknownCreateStackFailure_Test() throws MsoException, IOException { + public final void handleUnknownCreateStackFailure_Test() throws MsoException { Stack stack = new Stack(); stack.setId("id"); @@ -304,7 +304,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils { @Test - public final void handleUnknownCreateStackFailure_Null_Stack_Test() throws MsoException, IOException { + public final void handleUnknownCreateStackFailure_Null_Stack_Test() throws MsoException { Stack stack = null; exceptionRule.expect(StackCreationException.class); exceptionRule.expectMessage("Cannot Find Stack Name or Id"); @@ -312,7 +312,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils { } @Test - public final void postProcessStackDelete_Stack_Test() throws MsoException, IOException { + public final void postProcessStackDelete_Stack_Test() throws MsoException { Stack deletedStack = new Stack(); deletedStack.setId("id"); deletedStack.setStackName("stackName"); @@ -325,7 +325,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils { } @Test - public final void postProcessStackDelete__Null_Stack_Test() throws MsoException, IOException { + public final void postProcessStackDelete__Null_Stack_Test() throws MsoException { Stack stack = null; exceptionRule.expect(StackRollbackException.class); exceptionRule.expectMessage("Cannot Find Stack Name or Id"); @@ -333,14 +333,14 @@ public class MsoHeatUtilsTest extends MsoHeatUtils { } @Test - public final void isKeyPairFailure_Test() throws MsoException, IOException { + public final void isKeyPairFailure_Test() { boolean actual = heatUtils.isKeyPairFailure( "Exception during create VF 0 : Stack error (CREATE_FAILED): Resource CREATE failed: Conflict: resources.bfnm_my_keypair: Key pair 'hst3bbfnm0011vm001' already exists. (HTTP 409) (Request-ID:req-941b0af6-63ae-4d6a-afbc-90b728bacf82) - stack successfully deleted'rolledBack='true'"); assertEquals(true, actual); } @Test - public final void handleKeyPairConflict_Test() throws MsoException, IOException, NovaClientException { + public final void handleKeyPairConflict_Test() throws MsoException, NovaClientException { Stack stack = new Stack(); stack.setId("id"); stack.setStackName("stackName"); @@ -371,7 +371,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils { } @Test - public final void processCreateStack_Test() throws MsoException, IOException, NovaClientException { + public final void processCreateStack_Test() throws MsoException { Stack stack = new Stack(); stack.setId("id"); stack.setStackName("stackName"); @@ -402,8 +402,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils { } @Test - public final void processCreateStack_Exception_Backout_Test() - throws MsoException, IOException, NovaClientException { + public final void processCreateStack_Exception_Backout_Test() throws MsoException { Stack stack = new Stack(); stack.setId("id"); stack.setStackName("stackName"); @@ -433,7 +432,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils { @Test - public final void createStack_Test() throws MsoException, IOException, NovaClientException { + public final void createStack_Test() throws MsoException { CreateStackParam createStackParam = new CreateStackParam(); createStackParam.setStackName("stackName"); @@ -452,7 +451,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils { } @Test - public final void saveStack_Test() throws MsoException, IOException, NovaClientException { + public final void saveStack_Test() throws IOException { CreateStackParam createStackParam = new CreateStackParam(); createStackParam.setStackName("stackName"); @@ -481,7 +480,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils { } @Test - public final void saveStack__Exists_Test() throws MsoException, IOException, NovaClientException { + public final void saveStack__Exists_Test() { CreateStackParam createStackParam = new CreateStackParam(); createStackParam.setStackName("stackName"); Map parameters = new HashMap(); @@ -504,7 +503,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils { } @Test - public final void createStack_Error_Test() throws MsoException, IOException, NovaClientException { + public final void createStack_Error_Test() throws MsoException { CreateStackParam createStackParam = new CreateStackParam(); createStackParam.setStackName("stackName"); @@ -524,7 +523,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils { } @Test - public final void createStack_Error_404_Test() throws MsoException, IOException, NovaClientException { + public final void createStack_Error_404_Test() throws MsoException { CreateStackParam createStackParam = new CreateStackParam(); createStackParam.setStackName("stackName"); @@ -544,8 +543,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils { } @Test - public final void processCreateStack_Exception_No_Backout_Test() - throws MsoException, IOException, NovaClientException { + public final void processCreateStack_Exception_No_Backout_Test() throws MsoException { Stack stack = new Stack(); stack.setId("id"); stack.setStackName("stackName"); diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsUnitTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsUnitTest.java index 7a48dc092a..891da8f1ea 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsUnitTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsUnitTest.java @@ -36,7 +36,6 @@ import org.junit.Test; import org.onap.so.db.catalog.beans.HeatTemplate; import org.onap.so.db.catalog.beans.HeatTemplateParam; import org.skyscreamer.jsonassert.JSONAssert; -import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.JsonNode; @@ -48,7 +47,7 @@ public class MsoHeatUtilsUnitTest { private ObjectMapper mapper = new ObjectMapper(); @Test - public void convertInputMapTest() throws JsonParseException, JsonMappingException, IOException { + public void convertInputMapTest() throws JsonMappingException, IOException { MsoHeatUtils utils = new MsoHeatUtils(); Map input = new HashMap<>(); diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java index b34cf95e87..c476e3bf19 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java @@ -43,8 +43,6 @@ import org.onap.so.openstack.beans.HeatStatus; import org.onap.so.openstack.beans.StackInfo; import org.onap.so.openstack.exceptions.MsoException; import org.springframework.core.env.Environment; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.databind.JsonMappingException; import com.woorea.openstack.base.client.OpenStackRequest; import com.woorea.openstack.heat.Heat; import com.woorea.openstack.heat.model.Stack; @@ -85,7 +83,7 @@ public class MsoHeatUtilsWithUpdateTest extends TestDataSetup { } @Test - public void updateStackTest() throws MsoException, JsonParseException, JsonMappingException, IOException { + public void updateStackTest() throws MsoException, IOException { CloudSite cloudSite = new CloudSite(); Heat heatClient = new Heat("endpoint"); Stack heatStack = mapper.readValue(new File(RESOURCE_PATH + "HeatStack.json"), Stack.class); @@ -106,8 +104,7 @@ public class MsoHeatUtilsWithUpdateTest extends TestDataSetup { } @Test - public void updateStackWithEnvironmentTest() - throws JsonParseException, JsonMappingException, IOException, MsoException { + public void updateStackWithEnvironmentTest() throws IOException, MsoException { String environmentString = "environmentString"; CloudSite cloudSite = new CloudSite(); @@ -131,7 +128,7 @@ public class MsoHeatUtilsWithUpdateTest extends TestDataSetup { } @Test - public void updateStackWithFilesTest() throws MsoException, JsonParseException, JsonMappingException, IOException { + public void updateStackWithFilesTest() throws MsoException, IOException { String environmentString = "environmentString"; Map files = new HashMap<>(); files.put("file1", new Object()); diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoMulticloudUtilsTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoMulticloudUtilsTest.java index d197550937..0679de73f6 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoMulticloudUtilsTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoMulticloudUtilsTest.java @@ -32,7 +32,6 @@ import static org.junit.Assert.assertSame; import static org.junit.Assert.fail; import static org.mockito.Mockito.when; import static org.onap.so.openstack.utils.MsoMulticloudUtils.MULTICLOUD_QUERY_BODY_NULL; -import java.io.IOException; import java.util.HashMap; import java.util.Optional; import org.apache.http.HttpStatus; @@ -79,7 +78,7 @@ public class MsoMulticloudUtilsTest extends BaseTest { "/api/multicloud/v1/CloudOwner/MTN14/infra_workload/TEST-workload"; @Test - public void createStackSuccess() throws MsoException, IOException { + public void createStackSuccess() throws MsoException { wireMockServer .stubFor(post(urlEqualTo(MULTICLOUD_CREATE_PATH)).inScenario("CREATE") .willReturn(aResponse().withHeader("Content-Type", "application/json") diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoYamlEditorWithEnvtTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoYamlEditorWithEnvtTest.java index 90e874fc84..a7a679b473 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoYamlEditorWithEnvtTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoYamlEditorWithEnvtTest.java @@ -24,8 +24,6 @@ import java.util.Set; import org.junit.Test; import org.onap.so.TestDataSetup; import org.onap.so.db.catalog.beans.HeatTemplateParam; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.databind.JsonMappingException; public class MsoYamlEditorWithEnvtTest extends TestDataSetup { private MsoYamlEditorWithEnvt yaml; @@ -39,7 +37,7 @@ public class MsoYamlEditorWithEnvtTest extends TestDataSetup { "parameters: {" + PARAMETER_NAME + ": " + PARAMETER_VALUE + "}"; @Test - public void getParameterListTest() throws JsonParseException, JsonMappingException, IOException { + public void getParameterListTest() throws IOException { yaml = new MsoYamlEditorWithEnvt(RAW_ENTRY_WITH_NO_RESOURCE_REGISTRY.getBytes()); MsoHeatEnvironmentParameter expectedHeatParam = mapper.readValue( @@ -75,7 +73,7 @@ public class MsoYamlEditorWithEnvtTest extends TestDataSetup { } @Test - public void getParameterListFromEnvtTest() throws JsonParseException, JsonMappingException, IOException { + public void getParameterListFromEnvtTest() throws IOException { yaml = new MsoYamlEditorWithEnvt(RAW_ENTRY_WITH_NO_RESOURCE_REGISTRY.getBytes()); HeatTemplateParam expectedHeatParam = diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/StackStatusHandlerTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/StackStatusHandlerTest.java index c210a8b6ad..5b5b5454d0 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/StackStatusHandlerTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/StackStatusHandlerTest.java @@ -25,7 +25,6 @@ import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.times; -import java.io.IOException; import java.util.UUID; import org.junit.Test; import org.junit.runner.RunWith; @@ -36,7 +35,6 @@ import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; import org.onap.so.db.request.beans.RequestProcessingData; import org.onap.so.db.request.client.RequestsDbClient; -import org.onap.so.openstack.exceptions.MsoException; import com.woorea.openstack.heat.model.Stack; @RunWith(MockitoJUnitRunner.class) @@ -53,7 +51,7 @@ public class StackStatusHandlerTest { } @Test - public final void recordExists_Test() throws MsoException, IOException { + public final void recordExists_Test() { RequestProcessingData requestProcessingData = new RequestProcessingData(); requestProcessingData.setValue("testMe"); @@ -72,7 +70,7 @@ public class StackStatusHandlerTest { } @Test - public final void record_Not_Exists_Test() throws MsoException, IOException { + public final void record_Not_Exists_Test() { String requestId = getRequestId(); ArgumentCaptor requestCaptor = ArgumentCaptor.forClass(RequestProcessingData.class); doReturn(null).when(requestDBClient).getRequestProcessingDataBySoRequestIdAndNameAndGrouping(requestId, diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/onap/so/openstack/mappers/JAXBMarshallingTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/onap/so/openstack/mappers/JAXBMarshallingTest.java index 5089ba1301..db354dcaef 100644 --- a/adapters/mso-adapters-rest-interface/src/test/java/org/onap/so/openstack/mappers/JAXBMarshallingTest.java +++ b/adapters/mso-adapters-rest-interface/src/test/java/org/onap/so/openstack/mappers/JAXBMarshallingTest.java @@ -52,7 +52,7 @@ public class JAXBMarshallingTest { } @Test - public void xmlMarshalTest() throws IOException, JAXBException { + public void xmlMarshalTest() throws IOException { CreateVfModuleRequest request = new CreateVfModuleRequest(); request.getVfModuleParams().put("test-null", null); diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/onap/so/openstack/mappers/StackInfoMapperTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/onap/so/openstack/mappers/StackInfoMapperTest.java index 4ca0186a82..0bea73ee1c 100644 --- a/adapters/mso-adapters-rest-interface/src/test/java/org/onap/so/openstack/mappers/StackInfoMapperTest.java +++ b/adapters/mso-adapters-rest-interface/src/test/java/org/onap/so/openstack/mappers/StackInfoMapperTest.java @@ -29,7 +29,6 @@ import java.util.Map; import org.junit.Test; import org.onap.so.openstack.beans.HeatStatus; import org.onap.so.openstack.beans.StackInfo; -import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.woorea.openstack.heat.model.Stack; @@ -61,7 +60,7 @@ public class StackInfoMapperTest { } @Test - public void checkOutputToMap() throws JsonParseException, JsonMappingException, IOException { + public void checkOutputToMap() throws JsonMappingException, IOException { ObjectMapper jacksonMapper = new ObjectMapper(); Stack sample = jacksonMapper.readValue(this.getJson("stack-example.json"), Stack.class); StackInfoMapper mapper = new StackInfoMapper(sample); diff --git a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/CatalogDBRestTest.java b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/CatalogDBRestTest.java index dcb0d5bf22..a02d77ac2d 100644 --- a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/CatalogDBRestTest.java +++ b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/CatalogDBRestTest.java @@ -30,7 +30,6 @@ import java.util.List; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.json.JSONException; -import org.json.simple.parser.ParseException; import org.junit.Test; import org.onap.so.adapters.catalogdb.CatalogDbAdapterBaseTest; import org.onap.so.db.catalog.beans.ProcessingFlags; @@ -113,7 +112,7 @@ public class CatalogDBRestTest extends CatalogDbAdapterBaseTest { /* Service Resources Endpoint */ @Test - public void testGetServiceModelUUID() throws JSONException, IOException, ParseException { + public void testGetServiceModelUUID() throws JSONException, IOException { HttpEntity entity = new HttpEntity(null, headers); headers.set("Accept", MediaType.APPLICATION_JSON); @@ -147,7 +146,7 @@ public class CatalogDBRestTest extends CatalogDbAdapterBaseTest { } @Test - public void testGetServiceInvariantUUIDAndVersion() throws JSONException, IOException { + public void testGetServiceInvariantUUIDAndVersion() throws JSONException { HttpEntity entity = new HttpEntity(null, headers); headers.set("Accept", MediaType.APPLICATION_JSON); UriComponentsBuilder builder = @@ -802,7 +801,7 @@ public class CatalogDBRestTest extends CatalogDbAdapterBaseTest { } @Test - public void testGetVFModulesBadQueryParam() throws JSONException, IOException { + public void testGetVFModulesBadQueryParam() throws JSONException { TestAppender.events.clear(); HttpEntity entity = new HttpEntity(null, headers); headers.set("Accept", MediaType.APPLICATION_JSON); diff --git a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java index 4e273d5a8e..b9cafad18c 100644 --- a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java +++ b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java @@ -103,7 +103,7 @@ public class CatalogDbClientTest extends CatalogDbAdapterBaseTest { } @Test - public void testGetCloudSiteHappyPath() throws Exception { + public void testGetCloudSiteHappyPath() { CloudSite cloudSite = client.getCloudSite(MTN13); assertNotNull(cloudSite); assertNotNull(cloudSite.getIdentityService()); @@ -113,13 +113,13 @@ public class CatalogDbClientTest extends CatalogDbAdapterBaseTest { } @Test - public void testGetCloudSiteNotFound() throws Exception { + public void testGetCloudSiteNotFound() { CloudSite cloudSite = client.getCloudSite(UUID.randomUUID().toString()); assertNull(cloudSite); } @Test - public void testGetCloudifyManagerHappyPath() throws Exception { + public void testGetCloudifyManagerHappyPath() { CloudifyManager cloudifyManager = client.getCloudifyManager("mtn13"); assertNotNull(cloudifyManager); assertEquals("http://localhost:28090/v2.0", cloudifyManager.getCloudifyUrl()); @@ -127,26 +127,26 @@ public class CatalogDbClientTest extends CatalogDbAdapterBaseTest { } @Test - public void testGetCloudifyManagerNotFound() throws Exception { + public void testGetCloudifyManagerNotFound() { CloudifyManager cloudifyManager = client.getCloudifyManager(UUID.randomUUID().toString()); assertNull(cloudifyManager); } @Test - public void testGetCloudSiteByClliAndAicVersionHappyPath() throws Exception { + public void testGetCloudSiteByClliAndAicVersionHappyPath() { CloudSite cloudSite = client.getCloudSiteByClliAndAicVersion("MDT13", "2.5"); assertNotNull(cloudSite); } @Test - public void testGetCloudSiteByClliAndAicVersionNotFound() throws Exception { + public void testGetCloudSiteByClliAndAicVersionNotFound() { CloudSite cloudSite = client.getCloudSiteByClliAndAicVersion("MDT13", "232496239746328"); assertNull(cloudSite); } @Test - public void testGetServiceByID() throws Exception { + public void testGetServiceByID() { Service serviceByID = client.getServiceByID("5df8b6de-2083-11e7-93ae-92361f002671"); assertNotNull(serviceByID); assertEquals("MSOTADevInfra_vSAMP10a_Service", serviceByID.getModelName()); @@ -155,13 +155,13 @@ public class CatalogDbClientTest extends CatalogDbAdapterBaseTest { } @Test - public void testGetServiceByIDNotFound() throws Exception { + public void testGetServiceByIDNotFound() { Service serviceByID = client.getServiceByID(UUID.randomUUID().toString()); assertNull(serviceByID); } @Test - public void testGetVfModuleByModelUUID() throws Exception { + public void testGetVfModuleByModelUUID() { VfModule vfModule = client.getVfModuleByModelUUID("20c4431c-246d-11e7-93ae-92361f002671"); assertNotNull(vfModule); assertNotNull(vfModule.getVfModuleCustomization()); @@ -170,20 +170,20 @@ public class CatalogDbClientTest extends CatalogDbAdapterBaseTest { } @Test - public void testGetVfModuleByModelUUIDNotFound() throws Exception { + public void testGetVfModuleByModelUUIDNotFound() { VfModule vfModule = client.getVfModuleByModelUUID(UUID.randomUUID().toString()); assertNull(vfModule); } @Test - public void testGetVnfResourceByModelUUID() throws Exception { + public void testGetVnfResourceByModelUUID() { VnfResource vnfResource = client.getVnfResourceByModelUUID("ff2ae348-214a-11e7-93ae-92361f002671"); assertNotNull(vnfResource); assertEquals("vSAMP10a", vnfResource.getModelName()); } @Test - public void testGetVnfResourceByModelUUIDNotFound() throws Exception { + public void testGetVnfResourceByModelUUIDNotFound() { VnfResource vnfResource = client.getVnfResourceByModelUUID(UUID.randomUUID().toString()); assertNull(vnfResource); } @@ -663,7 +663,7 @@ public class CatalogDbClientTest extends CatalogDbAdapterBaseTest { } @Test - public void testGetServiceTopologyById() throws Exception { + public void testGetServiceTopologyById() { org.onap.so.rest.catalog.beans.Service serviceByID = client.getServiceModelInformation("5df8b6de-2083-11e7-93ae-92361f002671", "2"); assertNotNull(serviceByID); @@ -673,13 +673,13 @@ public class CatalogDbClientTest extends CatalogDbAdapterBaseTest { } @Test - public void testGetServices() throws Exception { + public void testGetServices() { List services = client.getServices(); assertEquals(false, services.isEmpty()); } @Test - public void testVnf() throws Exception { + public void testVnf() { org.onap.so.rest.catalog.beans.Vnf vnf = client.getVnfModelInformation("5df8b6de-2083-11e7-93ae-92361f002671", "68dc9a92-214c-11e7-93ae-92361f002671", "0"); assertNotNull(vnf); diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java index af06542356..1f1cea8a16 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java @@ -269,15 +269,7 @@ public class MsoNetworkAdapterImpl { } if (routeTableFqdns != null && !routeTableFqdns.isEmpty() && os3template) { - try { - mergeRouteTableRefs(routeTableFqdns, stackParams); - } catch (MsoException me) { - me.addContext(CREATE_NETWORK_CONTEXT); - logger.error("{} {} Exception Create Network, merging routeTableRefs type {} in {}/{} ", - MessageEnum.RA_CREATE_NETWORK_EXC, ErrorCode.DataError.getValue(), - neutronNetworkType.toString(), cloudSiteId, tenantId, me); - throw new NetworkException(me); - } + mergeRouteTableRefs(routeTableFqdns, stackParams); } // Deploy the network stack @@ -496,15 +488,7 @@ public class MsoNetworkAdapterImpl { } if (routeTableFqdns != null && !routeTableFqdns.isEmpty() && os3template) { - try { - mergeRouteTableRefs(routeTableFqdns, stackParams); - } catch (MsoException me) { - me.addContext(UPDATE_NETWORK_CONTEXT); - logger.error("{} {} Exception - UpdateNetwork mergeRouteTableRefs type {} in {}/{} ", - MessageEnum.RA_UPDATE_NETWORK_ERR, ErrorCode.DataError.getValue(), - neutronNetworkType.toString(), cloudSiteId, tenantId, me); - throw new NetworkException(me); - } + mergeRouteTableRefs(routeTableFqdns, stackParams); } // Update the network stack @@ -864,7 +848,7 @@ public class MsoNetworkAdapterImpl { return; } - private void mergeRouteTableRefs(List rtFqdns, Map stackParams) throws MsoException { + private void mergeRouteTableRefs(List rtFqdns, Map stackParams) { // update parameters if (rtFqdns != null) { diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/MSONetworkAdapterImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/MSONetworkAdapterImplTest.java index a7abdcab7f..05d498560e 100644 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/MSONetworkAdapterImplTest.java +++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/MSONetworkAdapterImplTest.java @@ -384,7 +384,7 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { return input; } - public static void mockUpdateRequestDb(WireMockServer wireMockServer, String requestId) throws IOException { + public static void mockUpdateRequestDb(WireMockServer wireMockServer, String requestId) { wireMockServer.stubFor(patch(urlPathEqualTo("/infraActiveRequests/" + requestId)) .willReturn(aResponse().withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_OK))); } diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/inventory/CreateAAIInventoryTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/inventory/CreateAAIInventoryTest.java index 5d5884a309..73bfcefe6d 100644 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/inventory/CreateAAIInventoryTest.java +++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/inventory/CreateAAIInventoryTest.java @@ -31,8 +31,6 @@ import org.mockito.MockitoAnnotations; import org.onap.so.audit.beans.AuditInventory; import org.onap.aaiclient.client.aai.AAIResourcesClient; import org.onap.so.objects.audit.AAIObjectAuditList; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; public class CreateAAIInventoryTest extends CreateAAIInventory { @@ -57,7 +55,7 @@ public class CreateAAIInventoryTest extends CreateAAIInventory { AAIObjectAuditList missingSubInterfaces; @Before - public void setup() throws JsonParseException, JsonMappingException, IOException { + public void setup() throws IOException { auditInventory.setCloudOwner("cloudOwner"); auditInventory.setCloudRegion("cloudRegion"); auditInventory.setTenantId("tenantId"); diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/inventory/CreateInventoryTaskTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/inventory/CreateInventoryTaskTest.java index f646d34f17..dac47cc3a4 100644 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/inventory/CreateInventoryTaskTest.java +++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/inventory/CreateInventoryTaskTest.java @@ -66,7 +66,7 @@ public class CreateInventoryTaskTest { } @Test - public void testExecuteExternalTask_InventoryException() throws InventoryException, JsonProcessingException { + public void testExecuteExternalTask_InventoryException() throws JsonProcessingException { AAIObjectAuditList object = new AAIObjectAuditList(); AAIObjectAudit e = new AAIObjectAudit(); e.setDoesObjectExist(true); diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/orchestration/RollbackServiceTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/orchestration/RollbackServiceTest.java index 94d9a28b76..7cb99e5adc 100644 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/orchestration/RollbackServiceTest.java +++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/orchestration/RollbackServiceTest.java @@ -17,7 +17,6 @@ import org.onap.so.adapters.vnf.MsoVnfAdapterImpl; import org.onap.so.adapters.vnf.VnfAdapterUtils; import org.onap.so.adapters.vnf.exceptions.VnfException; import org.onap.so.logging.tasks.AuditMDCSetup; -import org.onap.so.openstack.exceptions.MsoException; import org.onap.so.openstack.utils.MsoHeatUtils; import com.woorea.openstack.heat.model.Stack; @@ -58,7 +57,7 @@ public class RollbackServiceTest { } @Test - public void testExecuteExternalTask() throws VnfException, MsoException, IOException { + public void testExecuteExternalTask() throws VnfException, IOException { String payload = new String(Files.readAllBytes(Paths.get(RESOURCE_PATH + "/vnfAdapterTaskRequestCreate.xml"))); Stack stack = new Stack(); diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/orchestration/StackServiceTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/orchestration/StackServiceTest.java index 77d1be5b2f..73e2a7cdb8 100644 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/orchestration/StackServiceTest.java +++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/orchestration/StackServiceTest.java @@ -19,7 +19,6 @@ import org.onap.so.adapters.vnf.MsoVnfAdapterImpl; import org.onap.so.adapters.vnf.VnfAdapterUtils; import org.onap.so.adapters.vnf.exceptions.VnfException; import org.onap.so.logging.tasks.AuditMDCSetup; -import org.onap.so.openstack.exceptions.MsoException; import org.onap.so.openstack.utils.MsoHeatUtils; import com.woorea.openstack.heat.model.Stack; @@ -59,7 +58,7 @@ public class StackServiceTest { } @Test - public void testExecuteExternalTask() throws VnfException, MsoException, IOException { + public void testExecuteExternalTask() throws VnfException, IOException { String payload = new String(Files.readAllBytes(Paths.get(RESOURCE_PATH + "/vnfAdapterTaskRequestCreate.xml"))); Stack stack = new Stack(); diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterImplTest.java index 2b842d3f52..ba0ae2c114 100644 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterImplTest.java +++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterImplTest.java @@ -32,7 +32,6 @@ import static org.onap.so.bpmn.mock.StubOpenStack.mockOpenStackGetStackVfModule_ import static org.onap.so.bpmn.mock.StubOpenStack.mockOpenStackPutStack; import static org.onap.so.bpmn.mock.StubOpenStack.mockOpenStackResponseAccess; import static org.onap.so.bpmn.mock.StubOpenStack.mockOpenstackGetWithResponse; -import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.Map; @@ -521,7 +520,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils { return vfModuleCustomization; } - public static void mockUpdateRequestDb(WireMockServer wireMockServer, String requestId) throws IOException { + public static void mockUpdateRequestDb(WireMockServer wireMockServer, String requestId) { wireMockServer.stubFor(patch(urlPathEqualTo("/infraActiveRequests/" + requestId)) .willReturn(aResponse().withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_OK))); } diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/bpmn/mock/StubOpenStack.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/bpmn/mock/StubOpenStack.java index 73bac86b74..bc7b2456da 100644 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/bpmn/mock/StubOpenStack.java +++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/bpmn/mock/StubOpenStack.java @@ -403,7 +403,7 @@ public class StubOpenStack { .withBodyFile("OpenstackResponse_Tenant.json").withStatus(HttpStatus.SC_OK))); } - public static void mockOpenStackPostTenant_200(WireMockServer wireMockServer) throws IOException { + public static void mockOpenStackPostTenant_200(WireMockServer wireMockServer) { wireMockServer.stubFor(post(urlPathEqualTo("/mockPublicUrl/tenants")) .willReturn(aResponse().withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_OK))); } diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java index 1584503902..4b569d2434 100644 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java +++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java @@ -88,13 +88,11 @@ import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory; import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder; import org.onap.aaiclient.client.graphinventory.entities.DSLQuery; import org.onap.aaiclient.client.graphinventory.entities.Pathed; -import org.onap.aaiclient.client.graphinventory.exceptions.BulkProcessFailed; import org.onap.so.cloud.resource.beans.NodeType; import org.onap.so.db.catalog.beans.CloudIdentity; import org.onap.so.heatbridge.constants.HeatBridgeConstants; import org.onap.so.heatbridge.helpers.AaiHelper; import org.onap.so.heatbridge.openstack.api.OpenstackClient; -import org.onap.so.heatbridge.openstack.api.OpenstackClientException; import org.openstack4j.model.compute.Flavor; import org.openstack4j.model.compute.Image; import org.openstack4j.model.compute.Server; @@ -113,7 +111,6 @@ import org.openstack4j.openstack.heat.domain.HeatResource.Resources; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.core.env.Environment; -import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.JsonMappingException; @@ -169,14 +166,14 @@ public class HeatBridgeImplTest { @Before - public void setUp() throws HeatBridgeException, OpenstackClientException, BulkProcessFailed { + public void setUp() { when(resourcesClient.beginSingleTransaction()).thenReturn(transaction); } @Test - public void testExtractStackResourceIdsByResourceType() throws HeatBridgeException { + public void testExtractStackResourceIdsByResourceType() { // Arrange List expectedResourceList = (List) extractTestStackResources(); List expectedServerIds = @@ -435,8 +432,7 @@ public class HeatBridgeImplTest { } @Test - public void testUpdateVserverLInterfacesToAai() - throws HeatBridgeException, JsonParseException, JsonMappingException, IOException { + public void testUpdateVserverLInterfacesToAai() throws HeatBridgeException, JsonMappingException, IOException { // Arrange List stackResources = (List) extractTestStackResources(); Port port = mock(Port.class); @@ -502,7 +498,7 @@ public class HeatBridgeImplTest { } @Test - public void testUpdateNetworksToAai() throws HeatBridgeException { + public void testUpdateNetworksToAai() { Subnet subnet1 = mock(Subnet.class); when(subnet1.getId()).thenReturn("test-subnet1-id"); @@ -623,8 +619,7 @@ public class HeatBridgeImplTest { } @Test - public void testUpdateLInterfaceIps() - throws HeatBridgeException, JsonParseException, JsonMappingException, IOException { + public void testUpdateLInterfaceIps() { Port port = mock(Port.class); when(port.getNetworkId()).thenReturn("890a203a-23gg-56jh-df67-731656a8f13a"); @@ -671,8 +666,7 @@ public class HeatBridgeImplTest { } @Test - public void testUpdateVserverLInterfacesToAai_skipVlans() - throws HeatBridgeException, JsonParseException, JsonMappingException, IOException { + public void testUpdateVserverLInterfacesToAai_skipVlans() throws HeatBridgeException { // Arrange List stackResources = (List) extractTestStackResources(); Port port = mock(Port.class); @@ -712,8 +706,7 @@ public class HeatBridgeImplTest { } @Test - public void testBuildAddVserverLInterfacesToAaiAction_PortProfileNull() - throws HeatBridgeException, JsonParseException, JsonMappingException, IOException { + public void testBuildAddVserverLInterfacesToAaiAction_PortProfileNull() throws HeatBridgeException { // Arrange List stackResources = (List) extractTestStackResources(); Port port = mock(Port.class); @@ -752,8 +745,7 @@ public class HeatBridgeImplTest { } @Test - public void testBuildAddVserverLInterfacesToAaiAction_DeviceIdNull() - throws HeatBridgeException, JsonParseException, JsonMappingException, IOException { + public void testBuildAddVserverLInterfacesToAaiAction_DeviceIdNull() throws HeatBridgeException { // Arrange List stackResources = (List) extractTestStackResources(); Port port = mock(Port.class); @@ -790,7 +782,7 @@ public class HeatBridgeImplTest { } @Test - public void testExtractOpenstackImagesFromServers() throws HeatBridgeException { + public void testExtractOpenstackImagesFromServers() { // Arrange List serverList = new ArrayList<>(); serverList.add(server); diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/OrchestrationTaskRepositoryCustomController.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/OrchestrationTaskRepositoryCustomController.java index 29585b94eb..53e8e6a1af 100644 --- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/OrchestrationTaskRepositoryCustomController.java +++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/OrchestrationTaskRepositoryCustomController.java @@ -51,7 +51,7 @@ public class OrchestrationTaskRepositoryCustomController { @PutMapping(value = "/orchestrationTask/{taskId}") public OrchestrationTask updateOrchestrationTask(@PathVariable("taskId") String taskId, - @RequestBody OrchestrationTask orchestrationTask) throws MsoRequestsDbException { + @RequestBody OrchestrationTask orchestrationTask) { return orchestrationTaskRepository.save(orchestrationTask); } diff --git a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/MSORequestDBImplTest.java b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/MSORequestDBImplTest.java index 9ded5b4b79..2c0b87c064 100644 --- a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/MSORequestDBImplTest.java +++ b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/MSORequestDBImplTest.java @@ -236,7 +236,7 @@ public class MSORequestDBImplTest extends RequestsAdapterBase { } @Test - public void getSiteStatusNotDisabled() throws MsoRequestsDbException { + public void getSiteStatusNotDisabled() { setupTestEntities(); // Given String siteName = "siteName"; @@ -249,7 +249,7 @@ public class MSORequestDBImplTest extends RequestsAdapterBase { } @Test - public void getSiteStatusDisabled() throws MsoRequestsDbException { + public void getSiteStatusDisabled() { setupTestEntities(); // Given String siteName = "testSite"; diff --git a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/exceptions/MsoRequestsDbExceptionTest.java b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/exceptions/MsoRequestsDbExceptionTest.java index 94c6d267e4..674e7c0c81 100644 --- a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/exceptions/MsoRequestsDbExceptionTest.java +++ b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/exceptions/MsoRequestsDbExceptionTest.java @@ -25,7 +25,7 @@ import org.junit.Test; public class MsoRequestsDbExceptionTest { @Test - public void testConstructorWithMessaqge() throws Exception { + public void testConstructorWithMessaqge() { String message = "testing message"; MsoRequestsDbException msoRequestsDbException = new MsoRequestsDbException(message); Assert.assertNull(msoRequestsDbException.getCause()); @@ -34,7 +34,7 @@ public class MsoRequestsDbExceptionTest { } @Test - public void testConstructorWithThrowable() throws Exception { + public void testConstructorWithThrowable() { String message = "testing message"; Throwable throwable = new Throwable(message); MsoRequestsDbException msoRequestsDbException = new MsoRequestsDbException(throwable); @@ -44,7 +44,7 @@ public class MsoRequestsDbExceptionTest { } @Test - public void testConstructorWithMessageAndThrowable() throws Exception { + public void testConstructorWithMessageAndThrowable() { String message = "testing message"; String tMessage = "throwable message"; Throwable throwable = new Throwable(tMessage); diff --git a/adapters/mso-sdnc-adapter/src/test/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallbackUnitTest.java b/adapters/mso-sdnc-adapter/src/test/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallbackUnitTest.java index 09089890ab..0aff07c74b 100644 --- a/adapters/mso-sdnc-adapter/src/test/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallbackUnitTest.java +++ b/adapters/mso-sdnc-adapter/src/test/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallbackUnitTest.java @@ -61,7 +61,7 @@ public class BPRestCallbackUnitTest { } @Test - public void sendTest() throws IOException { + public void sendTest() { ResponseEntity postResponse = new ResponseEntity("response", HttpStatus.OK); doReturn(restTemplate).when(bpRestCallback).setRestTemplate(60000); doReturn(false).when(bpRestCallback).setAuthorizationHeader(headers); @@ -71,7 +71,7 @@ public class BPRestCallbackUnitTest { } @Test - public void sendNoAuthHeaderTest() throws IOException { + public void sendNoAuthHeaderTest() { doReturn(true).when(bpRestCallback).setAuthorizationHeader(headers); doReturn(restTemplate).when(bpRestCallback).setRestTemplate(60000); boolean response = bpRestCallback.send("http://localhost:8000/sdnc", message); @@ -79,7 +79,7 @@ public class BPRestCallbackUnitTest { } @Test - public void sendErrorTest() throws IOException { + public void sendErrorTest() { doReturn(false).when(bpRestCallback).setAuthorizationHeader(headers); doReturn(restTemplate).when(bpRestCallback).setRestTemplate(60000); when(restTemplate.postForEntity(uri, requestEntity, String.class)) @@ -89,7 +89,7 @@ public class BPRestCallbackUnitTest { } @Test - public void sendResponse3xxTest() throws IOException { + public void sendResponse3xxTest() { ResponseEntity postResponse = new ResponseEntity("response", HttpStatus.MULTIPLE_CHOICES); doReturn(false).when(bpRestCallback).setAuthorizationHeader(headers); doReturn(restTemplate).when(bpRestCallback).setRestTemplate(60000); @@ -99,7 +99,7 @@ public class BPRestCallbackUnitTest { } @Test - public void sendResponseNullMessageTest() throws IOException { + public void sendResponseNullMessageTest() { HttpHeaders httpHeaders = new HttpHeaders(); httpHeaders.setContentType(MediaType.APPLICATION_JSON); HttpEntity requestEntityNoMessage = new HttpEntity<>(null, httpHeaders); @@ -112,7 +112,7 @@ public class BPRestCallbackUnitTest { } @Test - public void postThrowsExceptionTest() throws IOException { + public void postThrowsExceptionTest() { doReturn(false).when(bpRestCallback).setAuthorizationHeader(headers); doReturn(restTemplate).when(bpRestCallback).setRestTemplate(60000); when(restTemplate.postForEntity(uri, requestEntity, String.class)) diff --git a/adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/client/ApplicationControllerClient.java b/adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/client/ApplicationControllerClient.java index 0721b3fd93..603a405234 100644 --- a/adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/client/ApplicationControllerClient.java +++ b/adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/client/ApplicationControllerClient.java @@ -150,7 +150,7 @@ public class ApplicationControllerClient { public Status runCommand(Action action, org.onap.appc.client.lcm.model.ActionIdentifiers actionIdentifiers, org.onap.appc.client.lcm.model.Payload payload, String requestID, ApplicationControllerCallback listener, - String requestorId) throws ApplicationControllerOrchestratorException { + String requestorId) { Object requestObject; requestObject = createRequest(action, actionIdentifiers, payload, requestID, requestorId); appCSupport.logLCMMessage(requestObject); diff --git a/adapters/so-appc-orchestrator/src/test/java/org/onap/so/adapters/appc/orchestrator/client/ApplicationControllerCallbackTest.java b/adapters/so-appc-orchestrator/src/test/java/org/onap/so/adapters/appc/orchestrator/client/ApplicationControllerCallbackTest.java index 0c53200a10..df240cb151 100644 --- a/adapters/so-appc-orchestrator/src/test/java/org/onap/so/adapters/appc/orchestrator/client/ApplicationControllerCallbackTest.java +++ b/adapters/so-appc-orchestrator/src/test/java/org/onap/so/adapters/appc/orchestrator/client/ApplicationControllerCallbackTest.java @@ -55,7 +55,7 @@ public class ApplicationControllerCallbackTest { } @Test - public void onResponse_appcCallback_success_Test() throws Exception { + public void onResponse_appcCallback_success_Test() { Status status = new Status(); status.setCode(400); ResumeTrafficOutput response = new ResumeTrafficOutput(); @@ -68,7 +68,7 @@ public class ApplicationControllerCallbackTest { } @Test - public void onResponse_appcCallback_intermediateResponse_Test() throws Exception { + public void onResponse_appcCallback_intermediateResponse_Test() { Status status = new Status(); status.setCode(100); ResumeTrafficOutput response = new ResumeTrafficOutput(); @@ -79,7 +79,7 @@ public class ApplicationControllerCallbackTest { } @Test - public void onResponse_appcCallback_failure_Test() throws Exception { + public void onResponse_appcCallback_failure_Test() { String testFailure = "test failure"; Status status = new Status(); status.setCode(200); @@ -94,7 +94,7 @@ public class ApplicationControllerCallbackTest { } @Test - public void onException_appcCallback_failure_Test() throws Exception { + public void onException_appcCallback_failure_Test() { String testFailure = "test failure"; AppcClientException appcException = new AppcClientException(testFailure); Status status = new Status(); diff --git a/adapters/so-appc-orchestrator/src/test/java/org/onap/so/adapters/appc/orchestrator/client/ApplicationControllerSupportTest.java b/adapters/so-appc-orchestrator/src/test/java/org/onap/so/adapters/appc/orchestrator/client/ApplicationControllerSupportTest.java index f9d5bd1c17..ef7453d2a0 100644 --- a/adapters/so-appc-orchestrator/src/test/java/org/onap/so/adapters/appc/orchestrator/client/ApplicationControllerSupportTest.java +++ b/adapters/so-appc-orchestrator/src/test/java/org/onap/so/adapters/appc/orchestrator/client/ApplicationControllerSupportTest.java @@ -44,7 +44,7 @@ public class ApplicationControllerSupportTest { @Test @Parameters(method = "statusesAndCategories") - public void shouldReturnCategoryForCode(int code, StatusCategory category) throws Exception { + public void shouldReturnCategoryForCode(int code, StatusCategory category) { // when StatusCategory detectedCategory = applicationControllerSupport.getCategoryOf(createStatus(code)); // then @@ -53,7 +53,7 @@ public class ApplicationControllerSupportTest { @Test @Parameters(method = "statusesAndFinalities") - public void shouldReturnFinalityForCode(int code, boolean expectedFinality) throws Exception { + public void shouldReturnFinalityForCode(int code, boolean expectedFinality) { // when boolean finality = applicationControllerSupport.getFinalityOf(createStatus(code)); // then diff --git a/asdc-controller/src/test/java/org/onap/asdc/activity/ActivitySpecsActionsTest.java b/asdc-controller/src/test/java/org/onap/asdc/activity/ActivitySpecsActionsTest.java index 7de35b5c13..7da19ee162 100644 --- a/asdc-controller/src/test/java/org/onap/asdc/activity/ActivitySpecsActionsTest.java +++ b/asdc-controller/src/test/java/org/onap/asdc/activity/ActivitySpecsActionsTest.java @@ -94,7 +94,7 @@ public class ActivitySpecsActionsTest extends BaseTest { } @Test - public void CertifyActivitySpec_Test() throws Exception { + public void CertifyActivitySpec_Test() { String HOSTNAME = createURLWithPort(""); String activitySpecId = "testActivitySpec"; @@ -109,7 +109,7 @@ public class ActivitySpecsActionsTest extends BaseTest { } @Test - public void CertifyActivitySpecReturnsExists_Test() throws Exception { + public void CertifyActivitySpecReturnsExists_Test() { String HOSTNAME = createURLWithPort(""); String activitySpecId = "testActivitySpec"; diff --git a/asdc-controller/src/test/java/org/onap/so/asdc/installer/bpmn/WorkflowResourceTest.java b/asdc-controller/src/test/java/org/onap/so/asdc/installer/bpmn/WorkflowResourceTest.java index 4e8824344d..a397c8f24c 100644 --- a/asdc-controller/src/test/java/org/onap/so/asdc/installer/bpmn/WorkflowResourceTest.java +++ b/asdc-controller/src/test/java/org/onap/so/asdc/installer/bpmn/WorkflowResourceTest.java @@ -90,7 +90,7 @@ public class WorkflowResourceTest extends BaseTest { @Transactional @Test - public void installWorkflowResource_Test() throws Exception { + public void installWorkflowResource_Test() { Workflow workflow = new Workflow(); workflow.setArtifactChecksum("12345"); diff --git a/asdc-controller/src/test/java/org/onap/so/asdc/tenantIsolation/AaiClientPropertiesImplTest.java b/asdc-controller/src/test/java/org/onap/so/asdc/tenantIsolation/AaiClientPropertiesImplTest.java index 1c81553d38..425e3c5296 100644 --- a/asdc-controller/src/test/java/org/onap/so/asdc/tenantIsolation/AaiClientPropertiesImplTest.java +++ b/asdc-controller/src/test/java/org/onap/so/asdc/tenantIsolation/AaiClientPropertiesImplTest.java @@ -32,7 +32,7 @@ public class AaiClientPropertiesImplTest extends BaseTest { private static final String LOCAL_HOST = "http://localhost:"; @BeforeClass - public static void setup() throws Exception { + public static void setup() { System.setProperty("mso.config.path", "src/test/resources"); } diff --git a/asdc-controller/src/test/java/org/onap/so/asdc/util/ASDCNotificationLoggingTest.java b/asdc-controller/src/test/java/org/onap/so/asdc/util/ASDCNotificationLoggingTest.java index 16f58069a8..b13400c673 100644 --- a/asdc-controller/src/test/java/org/onap/so/asdc/util/ASDCNotificationLoggingTest.java +++ b/asdc-controller/src/test/java/org/onap/so/asdc/util/ASDCNotificationLoggingTest.java @@ -31,7 +31,7 @@ import org.onap.so.asdc.installer.VfModuleMetaData; public class ASDCNotificationLoggingTest { @Test - public void dumpASDCNotificationTestForNull() throws Exception { + public void dumpASDCNotificationTestForNull() { INotificationData asdcNotification = iNotificationDataObject(); String result = ASDCNotificationLogging.dumpASDCNotification(asdcNotification); @@ -103,7 +103,7 @@ public class ASDCNotificationLoggingTest { } @Test - public void dumpASDCNotificationTest() throws Exception { + public void dumpASDCNotificationTest() { INotificationData asdcNotification = iNotificationDataObject(); String result = ASDCNotificationLogging.dumpASDCNotification(asdcNotification); diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java index f4f0d12f2c..fe284fdf00 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java @@ -334,7 +334,7 @@ public class BBInputSetupUtils { } public org.onap.aai.domain.yang.ServiceInstance getAAIServiceInstanceByName(String serviceInstanceName, - Customer customer) throws Exception { + Customer customer) { Optional aaiServiceInstance = injectionHelper.getAaiClient().getOne( ServiceInstances.class, org.onap.aai.domain.yang.ServiceInstance.class, AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(customer.getGlobalCustomerId()) @@ -483,14 +483,14 @@ public class BBInputSetupUtils { } public Optional getRelatedVolumeGroupByNameFromVfModule(String vnfId, String vfModuleId, - String volumeGroupName) throws Exception { + String volumeGroupName) { AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId).vfModule(vfModuleId)) .relatedTo(Types.VOLUME_GROUPS.getFragment()).queryParam("volume-group-name", volumeGroupName); return injectionHelper.getAaiClient().getOne(VolumeGroups.class, VolumeGroup.class, uri); } - public Optional getRelatedVolumeGroupFromVfModule(String vnfId, String vfModuleId) throws Exception { + public Optional getRelatedVolumeGroupFromVfModule(String vnfId, String vfModuleId) { AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId).vfModule(vfModuleId)) .relatedTo(Types.VOLUME_GROUPS.getFragment()); diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/appc/ApplicationControllerClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/appc/ApplicationControllerClient.java index c73299ffc3..615def0cb0 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/appc/ApplicationControllerClient.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/appc/ApplicationControllerClient.java @@ -124,8 +124,7 @@ public class ApplicationControllerClient { } public Status runCommand(Action action, org.onap.appc.client.lcm.model.ActionIdentifiers actionIdentifiers, - org.onap.appc.client.lcm.model.Payload payload, String requestID) - throws ApplicationControllerOrchestratorException { + org.onap.appc.client.lcm.model.Payload payload, String requestID) { Object requestObject; requestObject = createRequest(action, actionIdentifiers, payload, requestID); appCSupport.logLCMMessage(requestObject); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilderTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilderTest.java index 557ae6df51..308ae884bd 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilderTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilderTest.java @@ -76,7 +76,7 @@ public class ResourceRequestBuilderTest extends BaseTest { } @Test - public void getResourceInputTest() throws Exception { + public void getResourceInputTest() { VnfResource resource = new VnfResource(); resource.setResourceType(ResourceType.VNF); @@ -88,7 +88,7 @@ public class ResourceRequestBuilderTest extends BaseTest { } @Test - public void getResourceInputDefaultValueTest() throws Exception { + public void getResourceInputDefaultValueTest() { VnfResource resource = new VnfResource(); resource.setResourceType(ResourceType.VNF); resource.setResourceInput("{\"a\":\"key|default_value\"}"); @@ -99,7 +99,7 @@ public class ResourceRequestBuilderTest extends BaseTest { } @Test - public void getResourceInputValueNoDefaultTest() throws Exception { + public void getResourceInputValueNoDefaultTest() { VnfResource resource = new VnfResource(); resource.setResourceType(ResourceType.VNF); resource.setResourceInput("{\"a\":\"value\"}"); @@ -110,7 +110,7 @@ public class ResourceRequestBuilderTest extends BaseTest { } @Test - public void getResourceSequenceTest() throws Exception { + public void getResourceSequenceTest() { wireMockServer.stubFor(get(urlEqualTo( "/ecomp/mso/catalog/v2/serviceResources?serviceModelUuid=c3954379-4efe-431c-8258-f84905b158e5")) @@ -181,7 +181,7 @@ public class ResourceRequestBuilderTest extends BaseTest { } @Test - public void getResourceInputWithEmptyServiceResourcesTest() throws Exception { + public void getResourceInputWithEmptyServiceResourcesTest() { VnfResource resource = new VnfResource(); resource.setResourceType(ResourceType.VNF); @@ -207,7 +207,7 @@ public class ResourceRequestBuilderTest extends BaseTest { } @Test - public void getListResourceInputTest() throws Exception { + public void getListResourceInputTest() { List vnfdata = null; diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java index 6f091304ef..18bb420541 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java @@ -82,9 +82,7 @@ import org.onap.so.db.catalog.beans.VnfResourceCustomization; import org.onap.so.db.catalog.beans.VnfcCustomization; import org.onap.so.serviceinstancebeans.CloudConfiguration; import org.onap.so.serviceinstancebeans.RequestDetails; -import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; public class BBInputSetupMapperLayerTest { @@ -256,7 +254,7 @@ public class BBInputSetupMapperLayerTest { } @Test - public void testMapAAINetworkPolicy() throws JsonParseException, JsonMappingException, IOException { + public void testMapAAINetworkPolicy() throws IOException { NetworkPolicy expectedNetworkPolicy = mapper.readValue(new File(RESOURCE_PATH + "NetworkPolicy.json"), NetworkPolicy.class); @@ -272,7 +270,7 @@ public class BBInputSetupMapperLayerTest { } @Test - public void testMapAAIVolumeGroup() throws JsonParseException, JsonMappingException, IOException { + public void testMapAAIVolumeGroup() throws IOException { VolumeGroup expectedVolumeGroup = mapper.readValue(new File(RESOURCE_PATH + "VolumeGroup.json"), VolumeGroup.class); @@ -438,7 +436,7 @@ public class BBInputSetupMapperLayerTest { } @Test - public void testMapAAICollectionIntoCollection() throws JsonParseException, JsonMappingException, IOException { + public void testMapAAICollectionIntoCollection() throws IOException { org.onap.aai.domain.yang.Collection aaiCollection = mapper .readValue(new File(RESOURCE_PATH + "CollectionInput.json"), org.onap.aai.domain.yang.Collection.class); @@ -451,8 +449,7 @@ public class BBInputSetupMapperLayerTest { } @Test - public void testMapAAIInstanceGroupIntoInstanceGroup() - throws JsonParseException, JsonMappingException, IOException { + public void testMapAAIInstanceGroupIntoInstanceGroup() throws IOException { org.onap.aai.domain.yang.InstanceGroup aaiInstanceGroup = mapper.readValue( new File(RESOURCE_PATH + "InstanceGroupInput.json"), org.onap.aai.domain.yang.InstanceGroup.class); @@ -467,8 +464,7 @@ public class BBInputSetupMapperLayerTest { } @Test - public void testMapAAIRouteTableReferenceIntoRouteTableReference() - throws JsonParseException, JsonMappingException, IOException { + public void testMapAAIRouteTableReferenceIntoRouteTableReference() throws IOException { org.onap.aai.domain.yang.RouteTableReference aaiRouteTableReference = mapper.readValue(new File(RESOURCE_PATH + "RouteTableReferenceInput.json"), org.onap.aai.domain.yang.RouteTableReference.class); @@ -483,7 +479,7 @@ public class BBInputSetupMapperLayerTest { } @Test - public void testMapCatalogNetworkToNetwork() throws JsonParseException, JsonMappingException, IOException { + public void testMapCatalogNetworkToNetwork() throws IOException { NetworkResourceCustomization networkResourceCustomization = mapper.readValue( new File(RESOURCE_PATH + "NetworkResourceCustomizationInput.json"), NetworkResourceCustomization.class); @@ -531,7 +527,7 @@ public class BBInputSetupMapperLayerTest { } @Test - public void testMapCatalogVfModuleToVfModule() throws JsonParseException, JsonMappingException, IOException { + public void testMapCatalogVfModuleToVfModule() throws IOException { VfModuleCustomization vfResourceCustomization = mapper .readValue(new File(RESOURCE_PATH + "VfModuleCustomizationInput.json"), VfModuleCustomization.class); @@ -545,7 +541,7 @@ public class BBInputSetupMapperLayerTest { } @Test - public void testMapRequestPlatform() throws JsonParseException, JsonMappingException, IOException { + public void testMapRequestPlatform() throws IOException { org.onap.so.serviceinstancebeans.Platform platform = mapper.readValue( new File(RESOURCE_PATH + "RequestPlatformInput.json"), org.onap.so.serviceinstancebeans.Platform.class); @@ -557,7 +553,7 @@ public class BBInputSetupMapperLayerTest { } @Test - public void testMapRequestLineOfBusiness() throws JsonParseException, JsonMappingException, IOException { + public void testMapRequestLineOfBusiness() throws IOException { org.onap.so.serviceinstancebeans.LineOfBusiness lineOfBusiness = mapper.readValue(new File(RESOURCE_PATH + "RequestLineOfBusinessInput.json"), org.onap.so.serviceinstancebeans.LineOfBusiness.class); @@ -571,7 +567,7 @@ public class BBInputSetupMapperLayerTest { } @Test - public void testMapAAIConfiguration() throws JsonParseException, JsonMappingException, IOException { + public void testMapAAIConfiguration() throws IOException { org.onap.aai.domain.yang.Configuration configurationAAI = mapper.readValue( new File(RESOURCE_PATH + "ConfigurationInput.json"), org.onap.aai.domain.yang.Configuration.class); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java index 00699f8845..811187277c 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java @@ -129,9 +129,7 @@ import org.onap.so.serviceinstancebeans.RequestInfo; import org.onap.so.serviceinstancebeans.RequestParameters; import org.onap.so.serviceinstancebeans.Resources; import org.onap.so.serviceinstancebeans.SubscriberInfo; -import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; import org.onap.so.serviceinstancebeans.VfModules; import org.onap.so.serviceinstancebeans.Vnfs; @@ -258,7 +256,7 @@ public class BBInputSetupTest { } @Test - public void testGetCustomerAndServiceSubscription() throws JsonParseException, JsonMappingException, IOException { + public void testGetCustomerAndServiceSubscription() throws IOException { RequestDetails requestDetails = mapper.readValue( new File(RESOURCE_PATH + "RequestDetailsInput_withRelatedInstanceList.json"), RequestDetails.class); SubscriberInfo subscriberInfo = new SubscriberInfo(); @@ -310,7 +308,7 @@ public class BBInputSetupTest { } @Test - public void testGetExecuteBBFromExecution() throws IOException { + public void testGetExecuteBBFromExecution() { BuildingBlock bb = new BuildingBlock().setBpmnFlowName("AssignServiceInstanceBB"); ExecuteBuildingBlock expected = new ExecuteBuildingBlock().setBuildingBlock(bb).setRequestId("00032ab7-3fb3-42e5-965d-8ea592502017"); @@ -1051,7 +1049,7 @@ public class BBInputSetupTest { } @Test - public void testGetServiceSubscription() throws IOException { + public void testGetServiceSubscription() { ServiceSubscription expected = new ServiceSubscription(); RequestDetails requestDetails = new RequestDetails(); RequestParameters params = new RequestParameters(); @@ -1070,7 +1068,7 @@ public class BBInputSetupTest { } @Test - public void testGetCustomer() throws IOException { + public void testGetCustomer() { Customer expected = new Customer(); RequestDetails requestDetails = new RequestDetails(); SubscriberInfo subscriberInfo = new SubscriberInfo(); @@ -1139,7 +1137,7 @@ public class BBInputSetupTest { } @Test - public void testPopulateInstanceGroup() throws Exception { + public void testPopulateInstanceGroup() { ModelInfo modelInfo = Mockito.mock(ModelInfo.class); Service service = Mockito.mock(Service.class); List instanceGroups = Mockito.spy(new ArrayList<>()); @@ -1158,7 +1156,7 @@ public class BBInputSetupTest { } @Test - public void testIsVlanTagging() throws Exception { + public void testIsVlanTagging() { boolean expected = true; Service service = Mockito.mock(Service.class); String key = "collectionCustId"; @@ -1261,7 +1259,7 @@ public class BBInputSetupTest { } @Test - public void testPopulateL3Network() throws JsonParseException, JsonMappingException, IOException { + public void testPopulateL3Network() throws IOException { String instanceName = "networkName"; ModelInfo modelInfo = new ModelInfo(); modelInfo.setModelType(ModelType.network); @@ -1319,7 +1317,7 @@ public class BBInputSetupTest { } @Test - public void testPopulateConfiguration() throws JsonParseException, JsonMappingException, IOException { + public void testPopulateConfiguration() throws IOException { String instanceName = "configurationName"; ModelInfo modelInfo = new ModelInfo(); modelInfo.setModelCustomizationUuid("72d9d1cd-f46d-447a-abdb-451d6fb05fa9"); @@ -1382,7 +1380,7 @@ public class BBInputSetupTest { } @Test - public void testPopulateConfigurationReplace() throws JsonParseException, JsonMappingException, IOException { + public void testPopulateConfigurationReplace() throws IOException { String instanceName = "configurationName"; ModelInfo modelInfo = new ModelInfo(); modelInfo.setModelCustomizationUuid("72d9d1cd-f46d-447a-abdb-451d6fb05fa9"); @@ -1449,7 +1447,7 @@ public class BBInputSetupTest { } @Test - public void testPopulateFabricConfiguration() throws JsonParseException, JsonMappingException, IOException { + public void testPopulateFabricConfiguration() throws IOException { String instanceName = "configurationName"; ModelInfo modelInfo = new ModelInfo(); modelInfo.setModelCustomizationUuid("72d9d1cd-f46d-447a-abdb-451d6fb05fa9"); @@ -1497,7 +1495,7 @@ public class BBInputSetupTest { } @Test - public void testPopulateGenericVnf() throws JsonParseException, JsonMappingException, IOException { + public void testPopulateGenericVnf() throws IOException { org.onap.so.serviceinstancebeans.Platform platform = new org.onap.so.serviceinstancebeans.Platform(); org.onap.so.serviceinstancebeans.LineOfBusiness lineOfBusiness = new org.onap.so.serviceinstancebeans.LineOfBusiness(); @@ -1571,7 +1569,7 @@ public class BBInputSetupTest { } @Test - public void testPopulateGenericVnfReplace() throws JsonParseException, JsonMappingException, IOException { + public void testPopulateGenericVnfReplace() throws IOException { org.onap.so.serviceinstancebeans.Platform platform = new org.onap.so.serviceinstancebeans.Platform(); org.onap.so.serviceinstancebeans.LineOfBusiness lineOfBusiness = new org.onap.so.serviceinstancebeans.LineOfBusiness(); @@ -1647,8 +1645,7 @@ public class BBInputSetupTest { } @Test - public void testPopulateGenericVnfWhereVnfTypeIsNull() - throws JsonParseException, JsonMappingException, IOException { + public void testPopulateGenericVnfWhereVnfTypeIsNull() throws IOException { org.onap.so.serviceinstancebeans.Platform platform = new org.onap.so.serviceinstancebeans.Platform(); org.onap.so.serviceinstancebeans.LineOfBusiness lineOfBusiness = new org.onap.so.serviceinstancebeans.LineOfBusiness(); @@ -2106,7 +2103,7 @@ public class BBInputSetupTest { } @Test - public void testMapCustomer() throws Exception { + public void testMapCustomer() { org.onap.aai.domain.yang.Customer customerAAI = new org.onap.aai.domain.yang.Customer(); org.onap.aai.domain.yang.ServiceSubscription serviceSubscriptionAAI = new org.onap.aai.domain.yang.ServiceSubscription(); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java index ce5d9c6d58..e96aacb126 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java @@ -345,7 +345,7 @@ public class BBInputSetupUtilsTest { } @Test - public void getOptionalAAIServiceInstanceByNameNullTest() throws Exception { + public void getOptionalAAIServiceInstanceByNameNullTest() { Optional actual = bbInputSetupUtils.getAAIServiceInstanceByName("", "", ""); assertThat(actual, sameBeanAs(Optional.empty())); @@ -517,7 +517,7 @@ public class BBInputSetupUtilsTest { } @Test - public void getRelatedVnfByNameFromServiceInstanceTest() throws Exception { + public void getRelatedVnfByNameFromServiceInstanceTest() { final String vnfId = "id123"; final String vnfName = "name123"; final String serviceInstanceId = "service-instance-id123"; @@ -534,7 +534,7 @@ public class BBInputSetupUtilsTest { } @Test - public void getRelatedVnfByNameFromServiceInstanceNotFoundTest() throws Exception { + public void getRelatedVnfByNameFromServiceInstanceNotFoundTest() { final String serviceInstanceId = "serviceInstanceId"; final String vnfName = "vnfName"; @@ -546,7 +546,7 @@ public class BBInputSetupUtilsTest { } @Test - public void getRelatedVolumeGroupByNameFromVnfTest() throws Exception { + public void getRelatedVolumeGroupByNameFromVnfTest() { final String vnfId = "vnf-id123"; final String volumeGroupId = "id123"; final String volumeGroupName = "volume-group-name123"; @@ -562,7 +562,7 @@ public class BBInputSetupUtilsTest { } @Test - public void getRelatedVolumeGroupByNameFromVnfNotFoundTest() throws Exception { + public void getRelatedVolumeGroupByNameFromVnfNotFoundTest() { String vnfId = "vnfId"; String volumeGroupName = "volumeGroupName"; @@ -682,12 +682,12 @@ public class BBInputSetupUtilsTest { } @Test - public void getRelatedConfigurationByNameFromServiceInstanceNotFoundTest() throws Exception { + public void getRelatedConfigurationByNameFromServiceInstanceNotFoundTest() { assertEquals(Optional.empty(), bbInputSetupUtils.getRelatedConfigurationByNameFromServiceInstance("", "")); } @Test - public void getRelatedConfigurationByNameFromServiceInstanceTest() throws Exception { + public void getRelatedConfigurationByNameFromServiceInstanceTest() { Configuration configuration = new Configuration(); configuration.setConfigurationId("id123"); doReturn(Optional.of(configuration)).when(MOCK_aaiResourcesClient).getOne(Configurations.class, diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/CloudInfoFromAAITest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/CloudInfoFromAAITest.java index 4d034a19e8..7ca08f3582 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/CloudInfoFromAAITest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/CloudInfoFromAAITest.java @@ -45,9 +45,7 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion; import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; -import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; @RunWith(MockitoJUnitRunner.class) @@ -69,7 +67,7 @@ public class CloudInfoFromAAITest { } @Test - public void testGetCloudInfoFromAAI() throws JsonParseException, JsonMappingException, IOException { + public void testGetCloudInfoFromAAI() throws IOException { // Test vnfs ServiceInstance serviceInstance = mapper.readValue(new File(RESOURCE_PATH + "ServiceInstance_getServiceInstanceNOAAIExpected.json"), diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDayTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDayTest.java index b34d9dce9c..5e4273e500 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDayTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDayTest.java @@ -69,7 +69,7 @@ public class ExecuteBuildingBlockRainyDayTest extends BaseTest { } @Test - public void setRetryTimerTest() throws Exception { + public void setRetryTimerTest() { delegateExecution.setVariable("retryCount", 2); executeBuildingBlockRainyDay.setRetryTimer(delegateExecution); assertEquals("PT40S", delegateExecution.getVariable("RetryDuration")); @@ -84,7 +84,7 @@ public class ExecuteBuildingBlockRainyDayTest extends BaseTest { } @Test - public void queryRainyDayTableExists() throws Exception { + public void queryRainyDayTableExists() { customer.getServiceSubscription().getServiceInstances().add(serviceInstance); serviceInstance.getModelInfoServiceInstance().setServiceType("st1"); vnf.setVnfType("vnft1"); @@ -107,7 +107,7 @@ public class ExecuteBuildingBlockRainyDayTest extends BaseTest { } @Test - public void queryRainyDayTableDefault() throws Exception { + public void queryRainyDayTableDefault() { customer.getServiceSubscription().getServiceInstances().add(serviceInstance); serviceInstance.getModelInfoServiceInstance().setServiceType("st1"); vnf.setVnfType("vnft1"); @@ -130,7 +130,7 @@ public class ExecuteBuildingBlockRainyDayTest extends BaseTest { } @Test - public void queryRainyDayTableDoesNotExist() throws Exception { + public void queryRainyDayTableDoesNotExist() { customer.getServiceSubscription().getServiceInstances().add(serviceInstance); serviceInstance.getModelInfoServiceInstance().setServiceType("st1"); vnf.setVnfType("vnft1"); @@ -157,7 +157,7 @@ public class ExecuteBuildingBlockRainyDayTest extends BaseTest { } @Test - public void queryRainyDayTableSecondaryPolicyExists() throws Exception { + public void queryRainyDayTableSecondaryPolicyExists() { customer.getServiceSubscription().getServiceInstances().add(serviceInstance); serviceInstance.getModelInfoServiceInstance().setServiceType("st1"); vnf.setVnfType("vnft1"); @@ -182,7 +182,7 @@ public class ExecuteBuildingBlockRainyDayTest extends BaseTest { } @Test - public void queryRainyDayTableRollbackToAssignedMacro() throws Exception { + public void queryRainyDayTableRollbackToAssignedMacro() { customer.getServiceSubscription().getServiceInstances().add(serviceInstance); serviceInstance.getModelInfoServiceInstance().setServiceType("st1"); vnf.setVnfType("vnft1"); @@ -208,7 +208,7 @@ public class ExecuteBuildingBlockRainyDayTest extends BaseTest { } @Test - public void queryRainyDayTableRollbackToAssignedALaCarte() throws Exception { + public void queryRainyDayTableRollbackToAssignedALaCarte() { customer.getServiceSubscription().getServiceInstances().add(serviceInstance); serviceInstance.getModelInfoServiceInstance().setServiceType("st1"); vnf.setVnfType("vnft1"); @@ -234,7 +234,7 @@ public class ExecuteBuildingBlockRainyDayTest extends BaseTest { } @Test - public void queryRainyDayTableRollbackToCreated() throws Exception { + public void queryRainyDayTableRollbackToCreated() { customer.getServiceSubscription().getServiceInstances().add(serviceInstance); serviceInstance.getModelInfoServiceInstance().setServiceType("st1"); vnf.setVnfType("vnft1"); @@ -260,7 +260,7 @@ public class ExecuteBuildingBlockRainyDayTest extends BaseTest { } @Test - public void queryRainyDayTableRollbackToCreatedNoConfiguration() throws Exception { + public void queryRainyDayTableRollbackToCreatedNoConfiguration() { customer.getServiceSubscription().getServiceInstances().add(serviceInstance); serviceInstance.getModelInfoServiceInstance().setServiceType("st1"); vnf.setVnfType("vnft1"); @@ -290,7 +290,7 @@ public class ExecuteBuildingBlockRainyDayTest extends BaseTest { @Test - public void suppressRollbackTest() throws Exception { + public void suppressRollbackTest() { delegateExecution.setVariable("suppressRollback", true); delegateExecution.setVariable("aLaCarte", true); executeBuildingBlockRainyDay.queryRainyDayTable(delegateExecution, true); @@ -298,7 +298,7 @@ public class ExecuteBuildingBlockRainyDayTest extends BaseTest { } @Test - public void queryRainyDayTableServiceRoleNotDefined() throws Exception { + public void queryRainyDayTableServiceRoleNotDefined() { customer.getServiceSubscription().getServiceInstances().add(serviceInstance); serviceInstance.getModelInfoServiceInstance().setServiceType("st1"); serviceInstance.getModelInfoServiceInstance().setServiceRole("sr1"); @@ -322,7 +322,7 @@ public class ExecuteBuildingBlockRainyDayTest extends BaseTest { } @Test - public void queryRainyDayTableServiceRoleNC() throws Exception { + public void queryRainyDayTableServiceRoleNC() { customer.getServiceSubscription().getServiceInstances().add(serviceInstance); serviceInstance.getModelInfoServiceInstance().setServiceType("st1"); serviceInstance.getModelInfoServiceInstance().setServiceRole("NETWORK-COLLECTION"); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/ResponseExceptionMapperImplTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/ResponseExceptionMapperImplTest.java index d836389a76..61a0cb056a 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/ResponseExceptionMapperImplTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/ResponseExceptionMapperImplTest.java @@ -22,7 +22,6 @@ package org.onap.so.client; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import java.io.UnsupportedEncodingException; import javax.ws.rs.BadRequestException; import javax.ws.rs.ForbiddenException; import javax.ws.rs.InternalServerErrorException; @@ -81,7 +80,7 @@ public class ResponseExceptionMapperImplTest { } @Test - public void shouldThrowExceptionWithCustomMessageWhenResponseHasEntity() throws UnsupportedEncodingException { + public void shouldThrowExceptionWithCustomMessageWhenResponseHasEntity() { // given Response response = createMockResponse(Status.BAD_REQUEST); when(response.hasEntity()).thenReturn(true); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerSupportTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerSupportTest.java index d46c8e24ac..45e5c41b92 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerSupportTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerSupportTest.java @@ -43,7 +43,7 @@ public class ApplicationControllerSupportTest { @Test @Parameters(method = "statusesAndCategories") - public void shouldReturnCategoryForCode(int code, StatusCategory category) throws Exception { + public void shouldReturnCategoryForCode(int code, StatusCategory category) { // when StatusCategory detectedCategory = ApplicationControllerSupport.getCategoryOf(createStatus(code)); // then @@ -52,7 +52,7 @@ public class ApplicationControllerSupportTest { @Test @Parameters(method = "statusesAndFinalities") - public void shouldReturnFinalityForCode(int code, boolean expectedFinality) throws Exception { + public void shouldReturnFinalityForCode(int code, boolean expectedFinality) { // when boolean finality = ApplicationControllerSupport.getFinalityOf(createStatus(code)); // then diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtilsTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtilsTest.java index 40b0ed5624..8e7d3dca2c 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtilsTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtilsTest.java @@ -70,7 +70,7 @@ public class AbstractCDSProcessingBBUtilsTest { } @Test - public void preProcessRequestDETest() throws Exception { + public void preProcessRequestDETest() { DelegateExecution execution = mock(DelegateExecution.class); when(execution.getVariable("executionObject")).thenReturn(abstractCDSPropertiesBean); @@ -92,7 +92,7 @@ public class AbstractCDSProcessingBBUtilsTest { } @Test - public void preProcessRequestBBTest() throws Exception { + public void preProcessRequestBBTest() { BuildingBlockExecution execution = mock(BuildingBlockExecution.class); when(execution.getVariable("executionObject")).thenReturn(abstractCDSPropertiesBean); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClientTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClientTest.java index d3e07bf941..a2bb553366 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClientTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClientTest.java @@ -34,9 +34,7 @@ import org.junit.Test; import org.mockito.Mockito; import org.onap.so.BaseTest; import org.onap.so.client.avpn.dmaap.beans.AVPNDmaapBean; -import org.onap.so.client.exception.MapperException; import org.springframework.beans.factory.annotation.Autowired; -import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; public class DmaapPropertiesClientTest extends BaseTest { @@ -60,7 +58,7 @@ public class DmaapPropertiesClientTest extends BaseTest { private String percentProgress = "100"; @Test - public void testBuildRequestJson() throws MapperException, IOException { + public void testBuildRequestJson() throws IOException { AVPNDmaapBean actualBean = dmaapPropertiesClient.buildRequestJson(requestId, clientSource, correlator, serviceInstanceId, startTime, finishTime, requestScope, requestType, timestamp, requestState, statusMessage, percentProgress, true); @@ -72,7 +70,7 @@ public class DmaapPropertiesClientTest extends BaseTest { } @Test - public void testDmaapPublishRequest() throws JsonProcessingException, MapperException { + public void testDmaapPublishRequest() { DmaapPropertiesClient client = Mockito.spy(DmaapPropertiesClient.class); GlobalDmaapPublisher mockedClientDmaapPublisher = Mockito.mock(GlobalDmaapPublisher.class); AVPNDmaapBean mockedDmaapBean = Mockito.mock(AVPNDmaapBean.class); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/GlobalDmaapPublisherTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/GlobalDmaapPublisherTest.java index b71d5f9113..c24aa23c46 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/GlobalDmaapPublisherTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/GlobalDmaapPublisherTest.java @@ -29,7 +29,7 @@ import org.springframework.beans.factory.annotation.Autowired; public class GlobalDmaapPublisherTest extends BaseTest { @BeforeClass - public static void setUp() throws Exception { + public static void setUp() { System.setProperty("mso.global.dmaap.host", "http://test:1234"); } diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/restproperties/AAIPropertiesImplTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/restproperties/AAIPropertiesImplTest.java index 07d7507515..4deab98041 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/restproperties/AAIPropertiesImplTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/restproperties/AAIPropertiesImplTest.java @@ -21,7 +21,6 @@ package org.onap.so.client.restproperties; import static org.junit.Assert.assertEquals; -import java.net.MalformedURLException; import org.junit.Test; public class AAIPropertiesImplTest { @@ -29,7 +28,7 @@ public class AAIPropertiesImplTest { private AAIPropertiesImpl aaiPropertiesImpl = new AAIPropertiesImpl(); @Test - public void getEndpointTest() throws MalformedURLException { + public void getEndpointTest() { assertEquals("aai.endpoint", AAIPropertiesImpl.AAI_ENDPOINT); } diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/restproperties/PolicyRestPropertiesImplTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/restproperties/PolicyRestPropertiesImplTest.java index 55d024e3e7..3257d05d82 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/restproperties/PolicyRestPropertiesImplTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/restproperties/PolicyRestPropertiesImplTest.java @@ -21,14 +21,13 @@ package org.onap.so.client.restproperties; import static org.junit.Assert.assertEquals; -import java.net.MalformedURLException; import org.junit.Test; public class PolicyRestPropertiesImplTest { @Test - public void getEndpointTest() throws MalformedURLException { + public void getEndpointTest() { assertEquals("policy.endpoint", PolicyRestPropertiesImpl.POLICY_ENDPOINT); } diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/ResponseBuilderTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/ResponseBuilderTest.java index b06837aa0d..831910692b 100644 --- a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/ResponseBuilderTest.java +++ b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/ResponseBuilderTest.java @@ -42,7 +42,7 @@ public class ResponseBuilderTest { private Object obj; @Before - public void before() throws Exception { + public void before() { responseBuilder = new ResponseBuilder(); ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class); when(mockProcessDefinition.getKey()).thenReturn(processKey); diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/RollbackDataTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/RollbackDataTest.java index 86a9ecf57e..9448c34e0f 100644 --- a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/RollbackDataTest.java +++ b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/RollbackDataTest.java @@ -40,7 +40,7 @@ public class RollbackDataTest { private static final String VALUE_2 = "value2"; @Test - public void shouldReturnStringRepresentationOfDataInAnyPermutation() throws Exception { + public void shouldReturnStringRepresentationOfDataInAnyPermutation() { // given RollbackData data = new RollbackData(); data.put(TYPE_A, KEY_1, VALUE_1); @@ -55,7 +55,7 @@ public class RollbackDataTest { } @Test - public void shouldBeEmptyOnCreation() throws Exception { + public void shouldBeEmptyOnCreation() { // given RollbackData data = new RollbackData(); // then @@ -64,7 +64,7 @@ public class RollbackDataTest { } @Test - public void shouldHaveTypeAfterPuttingDataOfThatType() throws Exception { + public void shouldHaveTypeAfterPuttingDataOfThatType() { // given RollbackData data = new RollbackData(); // when @@ -76,7 +76,7 @@ public class RollbackDataTest { } @Test - public void shouldKeepTwoValuesWithSameKeysButDifferentTypes() throws Exception { + public void shouldKeepTwoValuesWithSameKeysButDifferentTypes() { // given RollbackData data = new RollbackData(); // when diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/ServiceDecompositionTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/ServiceDecompositionTest.java index 7ef7deea30..cfb2adafe1 100644 --- a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/ServiceDecompositionTest.java +++ b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/ServiceDecompositionTest.java @@ -26,7 +26,6 @@ import java.util.ArrayList; import java.util.Arrays; import org.junit.Before; import org.junit.Test; -import com.fasterxml.jackson.core.JsonProcessingException; public class ServiceDecompositionTest { private static final String RESOURCE_PATH = "src/test/resources/json-examples/"; @@ -69,7 +68,7 @@ public class ServiceDecompositionTest { } @Test - public void serviceDecompositionTest() throws JsonProcessingException, IOException { + public void serviceDecompositionTest() throws IOException { // covering methods not covered by openpojo test String catalogRestOutput = new String(Files.readAllBytes(Paths.get(RESOURCE_PATH + "ServiceDecomposition.json"))); diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/internal/VariableNameExtractorTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/internal/VariableNameExtractorTest.java index 373e6197b8..4a8b50986b 100644 --- a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/internal/VariableNameExtractorTest.java +++ b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/internal/VariableNameExtractorTest.java @@ -28,7 +28,7 @@ import org.junit.Test; public class VariableNameExtractorTest { @Test - public void shouldExtractVariableName() throws Exception { + public void shouldExtractVariableName() { // given String name = "A_different_NAME123"; String variable = "${A_different_NAME123}"; @@ -41,7 +41,7 @@ public class VariableNameExtractorTest { } @Test - public void shouldExtractVariableNameFromWhitespaces() throws Exception { + public void shouldExtractVariableNameFromWhitespaces() { // given String name = "name"; String variable = " \n\t$ \n\t{ \n\tname \n\t} \n\t"; @@ -54,7 +54,7 @@ public class VariableNameExtractorTest { } @Test - public void shouldReturnEmptyIfThereIsMoreThanVariable() throws Exception { + public void shouldReturnEmptyIfThereIsMoreThanVariable() { // given String variable = "a ${test}"; VariableNameExtractor extractor = new VariableNameExtractor(variable); @@ -65,7 +65,7 @@ public class VariableNameExtractorTest { } @Test - public void shouldReturnEmptyIfVariableNameIsIncorrect() throws Exception { + public void shouldReturnEmptyIfVariableNameIsIncorrect() { // given String variable = "${name with space}"; VariableNameExtractor extractor = new VariableNameExtractor(variable); @@ -76,7 +76,7 @@ public class VariableNameExtractorTest { } @Test - public void shouldReturnEmptyIfTwoVariablesPresent() throws Exception { + public void shouldReturnEmptyIfTwoVariablesPresent() { // given String variable = "${var1} ${var2}"; VariableNameExtractor extractor = new VariableNameExtractor(variable); diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/DecomposeJsonUtilTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/DecomposeJsonUtilTest.java index 3a8948c00d..9590cd3a68 100644 --- a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/DecomposeJsonUtilTest.java +++ b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/DecomposeJsonUtilTest.java @@ -40,7 +40,7 @@ public class DecomposeJsonUtilTest { public ExpectedException expectedException = ExpectedException.none(); @Before - public void before() throws Exception { + public void before() { } diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/JsonUtils2Test.java b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/JsonUtils2Test.java index 8e01195fed..0b8de61254 100644 --- a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/JsonUtils2Test.java +++ b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/JsonUtils2Test.java @@ -121,7 +121,7 @@ public class JsonUtils2Test { } @Test - public void shouldConvertXmlToJsonAndBackToSameXml() throws Exception { + public void shouldConvertXmlToJsonAndBackToSameXml() { // Note: the current version of the JsonUtils.json2xml() method // does not support converting the JSONObject representation // of XML attributes (JSONArray) back to XML. So this test will @@ -140,7 +140,7 @@ public class JsonUtils2Test { } @Test - public void shouldReadValuesForAbsoluteJsonPaths() throws Exception { + public void shouldReadValuesForAbsoluteJsonPaths() { // given String json = JsonUtils.xml2json(XML_REQ); // when, then @@ -152,7 +152,7 @@ public class JsonUtils2Test { } @Test - public void shouldReturnValueForJsonKey() throws Exception { + public void shouldReturnValueForJsonKey() { // given String json = JsonUtils.xml2json(XML_REQ); // when, then @@ -160,7 +160,7 @@ public class JsonUtils2Test { } @Test - public void shouldReturnNullForNonexistentJsonNode() throws Exception { + public void shouldReturnNullForNonexistentJsonNode() { // given String json = JsonUtils.xml2json(XML_REQ); // when, then @@ -168,7 +168,7 @@ public class JsonUtils2Test { } @Test - public void shouldReturnNullForNonExistentParameter() throws Exception { + public void shouldReturnNullForNonExistentParameter() { // given String json = JsonUtils.xml2json(XML_REQ); // when, then @@ -176,7 +176,7 @@ public class JsonUtils2Test { } @Test - public void shouldGetJasonParametersFromArray() throws Exception { + public void shouldGetJasonParametersFromArray() { // given String json = JsonUtils.xml2json(XML_REQ); // when, then @@ -189,7 +189,7 @@ public class JsonUtils2Test { } @Test - public void shouldAddJsonValue() throws Exception { + public void shouldAddJsonValue() { // given String json = JsonUtils.xml2json(XML_REQ); String key = "vnf-request.request-info.comment"; @@ -202,7 +202,7 @@ public class JsonUtils2Test { } @Test - public void shouldIgnoreAddIfFieldAlreadyExists() throws Exception { + public void shouldIgnoreAddIfFieldAlreadyExists() { // given String json = JsonUtils.xml2json(XML_REQ); String key = "vnf-request.vnf-inputs.vnf-name"; @@ -215,7 +215,7 @@ public class JsonUtils2Test { } @Test - public void shouldUpdateValueInJson() throws Exception { + public void shouldUpdateValueInJson() { // given String json = JsonUtils.xml2json(XML_REQ); String key = "vnf-request.vnf-inputs.vnf-name"; @@ -246,7 +246,7 @@ public class JsonUtils2Test { } @Test - public void shouldReturnOriginalJsonWhenTryingToRemoveNonexistentField() throws Exception { + public void shouldReturnOriginalJsonWhenTryingToRemoveNonexistentField() { // given String json = JsonUtils.xml2json(XML_REQ); String key = "vnf-request.vnf-inputs.does-not-exist"; @@ -271,7 +271,7 @@ public class JsonUtils2Test { } @Test - public void shouldConvertJsonContainingArrayToXml() throws Exception { + public void shouldConvertJsonContainingArrayToXml() { // when String jsonParm = JsonUtils.getJsonNodeValue(jsonReqArray, "requestDetails.requestParameters.ucpeInfo"); String xmlOut = JsonUtils.json2xml(jsonParm); diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/JsonUtilsTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/JsonUtilsTest.java index 36ffc0b04d..6eaa3d3f8c 100644 --- a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/JsonUtilsTest.java +++ b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/JsonUtilsTest.java @@ -197,27 +197,27 @@ public class JsonUtilsTest { } @Test - public void xml2jsonTest() throws IOException { + public void xml2jsonTest() { String expectedJson = "{\"name\":\"myName\"}"; String xml = "myName"; assertEquals(expectedJson, JsonUtils.xml2json(xml, false)); } @Test - public void xml2jsonErrorTest() throws IOException { + public void xml2jsonErrorTest() { String malformedXml = "myName"; assertNull(JsonUtils.xml2json(malformedXml)); } @Test - public void json2xmlTest() throws IOException { + public void json2xmlTest() { String expectedXml = "myName"; String malformedJson = "{\"name\":\"myName\"}"; assertEquals(expectedXml, JsonUtils.json2xml(malformedJson, false)); } @Test - public void json2xmlErrorTest() throws IOException { + public void json2xmlErrorTest() { String malformedJson = "{\"name\" \"myName\"}"; assertNull(JsonUtils.json2xml(malformedJson)); } @@ -247,20 +247,20 @@ public class JsonUtilsTest { } @Test - public void getJsonValueForKeyErrorTest() throws IOException { + public void getJsonValueForKeyErrorTest() { String malformedJson = "{\"name\" \"myName\"}"; assertNull(JsonUtils.getJsonValueForKey(malformedJson, "name")); } @Test - public void updJsonValueTest() throws IOException { + public void updJsonValueTest() { String expectedJson = "{\"name\": \"yourName\"}"; String json = "{\"name\":\"myName\"}"; assertEquals(expectedJson, JsonUtils.updJsonValue(json, "name", "yourName")); } @Test - public void updJsonValueErrorTest() throws IOException { + public void updJsonValueErrorTest() { String expectedJson = "{\"name\" \"myName\"}"; String json = "{\"name\" \"myName\"}"; assertEquals(expectedJson, JsonUtils.updJsonValue(json, "name", "yourName")); diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/BPMNUtil.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/BPMNUtil.java index 7a50e5f9d3..e1cf6319e7 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/BPMNUtil.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/BPMNUtil.java @@ -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. @@ -246,7 +246,7 @@ public class BPMNUtil { /** * Executes the Asynchronous workflow in synchronous fashion and returns the WorkflowResponse object - * + * * @param processEngineServices * @param processKey * @param variables @@ -276,7 +276,7 @@ public class BPMNUtil { /** * Execute workflow using async resource - * + * * @param processEngineServices * @param processKey * @param asyncResponse @@ -284,7 +284,7 @@ public class BPMNUtil { * @throws InterruptedException */ private static void executeAsyncFlow(ProcessEngineServices processEngineServices, String processKey, - Map variables) throws InterruptedException { + Map variables) { VariableMapImpl variableMap = new VariableMapImpl(); Map variableValueType = new HashMap<>(); @@ -328,12 +328,7 @@ public class BPMNUtil { * workflowResponse.setResponse(workflowResponseString); workflowResponse.setMessageCode(200); } return * null; } }).when(asyncResponse).setResponse(any(Response.class)); */ - try { - executeAsyncFlow(processEngineServices, processKey, variables); - } catch (InterruptedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } + executeAsyncFlow(processEngineServices, processKey, variables); } } } diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ConfirmVolumeGroupTenantIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ConfirmVolumeGroupTenantIT.java index f190b6243b..288f3253fe 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ConfirmVolumeGroupTenantIT.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ConfirmVolumeGroupTenantIT.java @@ -39,7 +39,7 @@ import org.onap.so.BaseIntegrationTest; public class ConfirmVolumeGroupTenantIT extends BaseIntegrationTest { @Test - public void testRemoveLayer3Service_success() throws Exception { + public void testRemoveLayer3Service_success() { MockGetVolumeGroupById(wireMockServer, "MDTWNJ21", "a8399879-31b3-4973-be26-0a0cbe776b58", "CRTGVNF_queryAAIResponseVolume.xml"); @@ -61,7 +61,7 @@ public class ConfirmVolumeGroupTenantIT extends BaseIntegrationTest { } @Test - public void testRemoveLayer3Service_idsNotMatch() throws Exception { + public void testRemoveLayer3Service_idsNotMatch() { MockGetVolumeGroupById(wireMockServer, "MDTWNJ21", "a8399879-31b3-4973-be26-0a0cbe776b58", "CRTGVNF_queryAAIResponseVolume_idsNotMatch.xml"); diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleVolumeGroupIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleVolumeGroupIT.java index b78c5b8aad..bce435821f 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleVolumeGroupIT.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleVolumeGroupIT.java @@ -26,7 +26,6 @@ import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithPri import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetVfModuleId; import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutVfModuleId; import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutVfModuleIdNoResponse; -import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.UUID; @@ -49,7 +48,7 @@ public class CreateAAIVfModuleVolumeGroupIT extends BaseIntegrationTest { * Test the happy path through the flow. */ @Test - public void happyPath() throws IOException { + public void happyPath() { logStart(); @@ -80,7 +79,7 @@ public class CreateAAIVfModuleVolumeGroupIT extends BaseIntegrationTest { * Test the case where the GET to AAI returns a 404. */ @Test - public void badGet() throws IOException { + public void badGet() { logStart(); @@ -108,7 +107,7 @@ public class CreateAAIVfModuleVolumeGroupIT extends BaseIntegrationTest { * Test the case where the GET to AAI is successful, but he subsequent PUT returns 404. */ @Test - public void badPatch() throws IOException { + public void badPatch() { logStart(); diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/DecomposeServiceIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/DecomposeServiceIT.java index 3643447258..0e573a697b 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/DecomposeServiceIT.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/DecomposeServiceIT.java @@ -42,7 +42,7 @@ public class DecomposeServiceIT extends BaseIntegrationTest { } @Test - public void testDecomposeService_success() throws Exception { + public void testDecomposeService_success() { MockGetServiceResourcesCatalogData(wireMockServer, "cmw-123-456-789", "1.0", "/getCatalogServiceResourcesDataWithConfig.json"); @@ -59,7 +59,7 @@ public class DecomposeServiceIT extends BaseIntegrationTest { // @Test @Test - public void testDecomposeService_success_partial() throws Exception { + public void testDecomposeService_success_partial() { MockGetServiceResourcesCatalogData(wireMockServer, "cmw-123-456-789", "1.0", "/getCatalogServiceResourcesDataNoNetwork.json"); diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingIT.java index 089d034efc..381bbe0007 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingIT.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingIT.java @@ -209,7 +209,7 @@ public class OofHomingIT extends BaseIntegrationTest { } @Test - public void testHoming_success_2AR1Vnf() throws Exception { + public void testHoming_success_2AR1Vnf() { mockOof(wireMockServer); @@ -262,7 +262,7 @@ public class OofHomingIT extends BaseIntegrationTest { } @Test - public void testHoming_success_2AR1Vnf2Net() throws Exception { + public void testHoming_success_2AR1Vnf2Net() { mockOof(wireMockServer); @@ -335,7 +335,7 @@ public class OofHomingIT extends BaseIntegrationTest { } @Test - public void testHoming_success_vnfResourceList() throws Exception { + public void testHoming_success_vnfResourceList() { // Create a Service Decomposition MockGetServiceResourcesCatalogDataByModelUuid(wireMockServer, "2f7f309d-c842-4644-a2e4-34167be5eeb4", @@ -416,7 +416,7 @@ public class OofHomingIT extends BaseIntegrationTest { } @Test - public void testHoming_success_existingLicense() throws Exception { + public void testHoming_success_existingLicense() { mockOof(wireMockServer); @@ -471,7 +471,7 @@ public class OofHomingIT extends BaseIntegrationTest { } @Test - public void testHoming_error_inputVariable() throws Exception { + public void testHoming_error_inputVariable() { String businessKey = UUID.randomUUID().toString(); Map variables = new HashMap<>(); @@ -490,7 +490,7 @@ public class OofHomingIT extends BaseIntegrationTest { } @Test - public void testHoming_error_badResponse() throws Exception { + public void testHoming_error_badResponse() { mockOof_500(wireMockServer); String businessKey = UUID.randomUUID().toString(); @@ -511,7 +511,7 @@ public class OofHomingIT extends BaseIntegrationTest { } @Test - public void testHoming_error_oofNoSolution() throws Exception { + public void testHoming_error_oofNoSolution() { mockOof(wireMockServer); String businessKey = UUID.randomUUID().toString(); @@ -535,7 +535,7 @@ public class OofHomingIT extends BaseIntegrationTest { } @Test - public void testHoming_error_oofPolicyException() throws Exception { + public void testHoming_error_oofPolicyException() { mockOof(wireMockServer); String businessKey = UUID.randomUUID().toString(); @@ -558,7 +558,7 @@ public class OofHomingIT extends BaseIntegrationTest { } @Test - public void testHoming_error_oofServiceException() throws Exception { + public void testHoming_error_oofServiceException() { mockOof(wireMockServer); String businessKey = UUID.randomUUID().toString(); diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingTestIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingTestIT.java index f3527fad7d..f32a508dc0 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingTestIT.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingTestIT.java @@ -212,7 +212,7 @@ public class OofHomingTestIT extends BaseIntegrationTest { @Test - public void testHoming_success_2AR1Vnf() throws Exception { + public void testHoming_success_2AR1Vnf() { mockOof(wireMockServer); @@ -266,7 +266,7 @@ public class OofHomingTestIT extends BaseIntegrationTest { @Test - public void testHoming_success_2AR1Vnf2Net() throws Exception { + public void testHoming_success_2AR1Vnf2Net() { mockOof(wireMockServer); @@ -341,7 +341,7 @@ public class OofHomingTestIT extends BaseIntegrationTest { @Test - public void testHoming_success_vnfResourceList() throws Exception { + public void testHoming_success_vnfResourceList() { // Create a Service Decomposition MockGetServiceResourcesCatalogDataByModelUuid(wireMockServer, "2f7f309d-c842-4644-a2e4-34167be5eeb4", @@ -419,7 +419,7 @@ public class OofHomingTestIT extends BaseIntegrationTest { } @Test - public void testHoming_success_existingLicense() throws Exception { + public void testHoming_success_existingLicense() { mockOof(wireMockServer); @@ -474,7 +474,7 @@ public class OofHomingTestIT extends BaseIntegrationTest { } @Test - public void testHoming_error_inputVariable() throws Exception { + public void testHoming_error_inputVariable() { String businessKey = UUID.randomUUID().toString(); Map variables = new HashMap<>(); @@ -494,7 +494,7 @@ public class OofHomingTestIT extends BaseIntegrationTest { @Test - public void testHoming_error_badResponse() throws Exception { + public void testHoming_error_badResponse() { mockOof_500(wireMockServer); String businessKey = UUID.randomUUID().toString(); @@ -515,7 +515,7 @@ public class OofHomingTestIT extends BaseIntegrationTest { @Test - public void testHoming_error_oofNoSolution() throws Exception { + public void testHoming_error_oofNoSolution() { mockOof(wireMockServer); String businessKey = UUID.randomUUID().toString(); @@ -538,7 +538,7 @@ public class OofHomingTestIT extends BaseIntegrationTest { @Test - public void testHoming_error_oofPolicyException() throws Exception { + public void testHoming_error_oofPolicyException() { mockOof(wireMockServer); String businessKey = UUID.randomUUID().toString(); @@ -562,7 +562,7 @@ public class OofHomingTestIT extends BaseIntegrationTest { @Test - public void testHoming_error_oofServiceException() throws Exception { + public void testHoming_error_oofServiceException() { mockOof(wireMockServer); String businessKey = UUID.randomUUID().toString(); diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/PrepareUpdateAAIVfModuleIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/PrepareUpdateAAIVfModuleIT.java index 190c220fa7..bf489d09cb 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/PrepareUpdateAAIVfModuleIT.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/PrepareUpdateAAIVfModuleIT.java @@ -27,7 +27,6 @@ import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithDep import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetGenericVnfById_404; import static org.onap.so.bpmn.mock.StubResponseAAI.MockPatchVfModuleId; import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutGenericVnf; -import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.UUID; @@ -52,7 +51,7 @@ public class PrepareUpdateAAIVfModuleIT extends BaseIntegrationTest { */ @Test - public void happyPath() throws IOException { + public void happyPath() { logStart(); @@ -88,7 +87,7 @@ public class PrepareUpdateAAIVfModuleIT extends BaseIntegrationTest { */ @Test - public void badGet() throws IOException { + public void badGet() { logStart(); @@ -122,7 +121,7 @@ public class PrepareUpdateAAIVfModuleIT extends BaseIntegrationTest { */ @Test - public void failValidation1() throws IOException { + public void failValidation1() { logStart(); @@ -153,7 +152,7 @@ public class PrepareUpdateAAIVfModuleIT extends BaseIntegrationTest { */ @Test - public void failValidation2() throws IOException { + public void failValidation2() { logStart(); @@ -184,7 +183,7 @@ public class PrepareUpdateAAIVfModuleIT extends BaseIntegrationTest { */ @Test - public void badPatch() throws IOException { + public void badPatch() { logStart(); diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ReceiveWorkflowMessageTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ReceiveWorkflowMessageTest.java index 081ac41a41..90c540ebd2 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ReceiveWorkflowMessageTest.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ReceiveWorkflowMessageTest.java @@ -64,7 +64,7 @@ public class ReceiveWorkflowMessageTest extends WorkflowTest { */ @Test @Deployment(resources = {"subprocess/ReceiveWorkflowMessage.bpmn"}) - public void happyPath() throws Exception { + public void happyPath() { logStart(); @@ -93,7 +93,7 @@ public class ReceiveWorkflowMessageTest extends WorkflowTest { */ @Test @Deployment(resources = {"subprocess/ReceiveWorkflowMessage.bpmn"}) - public void timeout() throws Exception { + public void timeout() { logStart(); diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SDNCAdapterRestV2IT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SDNCAdapterRestV2IT.java index 415e8096a3..5597fa3d1c 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SDNCAdapterRestV2IT.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SDNCAdapterRestV2IT.java @@ -68,7 +68,7 @@ public class SDNCAdapterRestV2IT extends BaseIntegrationTest { */ @Test @Ignore - public void success() throws IOException { + public void success() { logStart(); mocks(); diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SniroHomingV1IT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SniroHomingV1IT.java index 1b2ca3cdad..86eba37705 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SniroHomingV1IT.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SniroHomingV1IT.java @@ -141,7 +141,7 @@ public class SniroHomingV1IT extends BaseIntegrationTest { @Test // 1802 merge - public void testHoming_success_2AR1Vnf() throws Exception { + public void testHoming_success_2AR1Vnf() { mockSNIRO(wireMockServer); @@ -196,7 +196,7 @@ public class SniroHomingV1IT extends BaseIntegrationTest { @Test // 1802 merge - public void testHoming_success_2AR1Vnf2Net() throws Exception { + public void testHoming_success_2AR1Vnf2Net() { mockSNIRO(wireMockServer); @@ -266,7 +266,7 @@ public class SniroHomingV1IT extends BaseIntegrationTest { @Test // 1802 merge - public void testHoming_success_vnfResourceList() throws Exception { + public void testHoming_success_vnfResourceList() { // Create a Service Decomposition MockGetServiceResourcesCatalogDataByModelUuid(wireMockServer, "2f7f309d-c842-4644-a2e4-34167be5eeb4", @@ -327,7 +327,7 @@ public class SniroHomingV1IT extends BaseIntegrationTest { @Test - public void testHoming_success_existingLicense() throws Exception { + public void testHoming_success_existingLicense() { mockSNIRO(wireMockServer); @@ -382,7 +382,7 @@ public class SniroHomingV1IT extends BaseIntegrationTest { @Test - public void testHoming_error_inputVariable() throws Exception { + public void testHoming_error_inputVariable() { String businessKey = UUID.randomUUID().toString(); Map variables = new HashMap<>(); @@ -403,7 +403,7 @@ public class SniroHomingV1IT extends BaseIntegrationTest { @Test - public void testHoming_error_badResponse() throws Exception { + public void testHoming_error_badResponse() { mockSNIRO_500(wireMockServer); String businessKey = UUID.randomUUID().toString(); @@ -426,7 +426,7 @@ public class SniroHomingV1IT extends BaseIntegrationTest { @Test // 1802 merge - public void testHoming_error_sniroNoSolution() throws Exception { + public void testHoming_error_sniroNoSolution() { mockSNIRO(wireMockServer); String businessKey = UUID.randomUUID().toString(); @@ -450,7 +450,7 @@ public class SniroHomingV1IT extends BaseIntegrationTest { @Test - public void testHoming_error_sniroPolicyException() throws Exception { + public void testHoming_error_sniroPolicyException() { mockSNIRO(wireMockServer); String businessKey = UUID.randomUUID().toString(); @@ -474,7 +474,7 @@ public class SniroHomingV1IT extends BaseIntegrationTest { @Test - public void testHoming_error_sniroServiceException() throws Exception { + public void testHoming_error_sniroServiceException() { mockSNIRO(wireMockServer); String businessKey = UUID.randomUUID().toString(); diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIGenericVnfIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIGenericVnfIT.java index 6c5dee8e57..38b2926270 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIGenericVnfIT.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIGenericVnfIT.java @@ -28,7 +28,6 @@ import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetGenericVnfById_404; import static org.onap.so.bpmn.mock.StubResponseAAI.MockPatchGenericVnf; import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutGenericVnf; import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutGenericVnf_Bad; -import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.UUID; @@ -54,7 +53,7 @@ public class UpdateAAIGenericVnfIT extends BaseIntegrationTest { */ @Test - public void happyPath() throws IOException { + public void happyPath() { logStart(); String updateAAIGenericVnfRequest = @@ -85,7 +84,7 @@ public class UpdateAAIGenericVnfIT extends BaseIntegrationTest { */ @Test - public void personaMismatch() throws IOException { + public void personaMismatch() { logStart(); @@ -116,7 +115,7 @@ public class UpdateAAIGenericVnfIT extends BaseIntegrationTest { */ @Test - public void badGet() throws IOException { + public void badGet() { logStart(); @@ -147,7 +146,7 @@ public class UpdateAAIGenericVnfIT extends BaseIntegrationTest { */ @Test - public void badPatch() throws IOException { + public void badPatch() { logStart(); diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIVfModuleIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIVfModuleIT.java index 08db19e62b..65d5409de6 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIVfModuleIT.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIVfModuleIT.java @@ -28,7 +28,6 @@ import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithPri import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetGenericVnfById_404; import static org.onap.so.bpmn.mock.StubResponseAAI.MockPatchVfModuleId; import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutGenericVnf; -import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.UUID; @@ -53,7 +52,7 @@ public class UpdateAAIVfModuleIT extends BaseIntegrationTest { */ @Test - public void happyPath() throws IOException { + public void happyPath() { logStart(); String updateAAIVfModuleRequest = @@ -85,7 +84,7 @@ public class UpdateAAIVfModuleIT extends BaseIntegrationTest { */ @Test - public void badGet() throws IOException { + public void badGet() { logStart(); @@ -116,7 +115,7 @@ public class UpdateAAIVfModuleIT extends BaseIntegrationTest { */ @Test - public void badPatch() throws IOException { + public void badPatch() { logStart(); diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/VnfAdapterRestV1IT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/VnfAdapterRestV1IT.java index 22128cedc1..83da3efb44 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/VnfAdapterRestV1IT.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/VnfAdapterRestV1IT.java @@ -154,7 +154,7 @@ public class VnfAdapterRestV1IT extends BaseIntegrationTest { @Test - public void testCreateVfModuleSuccess() throws Exception { + public void testCreateVfModuleSuccess() { logStart(); mockVNFPost(wireMockServer, "", 202, "vnfId"); @@ -183,7 +183,7 @@ public class VnfAdapterRestV1IT extends BaseIntegrationTest { @Test - public void testUpdateVfModuleSuccess() throws Exception { + public void testUpdateVfModuleSuccess() { logStart(); mockVNFPut(wireMockServer, "/vfModuleId", 202); @@ -212,7 +212,7 @@ public class VnfAdapterRestV1IT extends BaseIntegrationTest { @Test - public void testDeleteVfModuleSuccess() throws Exception { + public void testDeleteVfModuleSuccess() { logStart(); mockVNFDelete(wireMockServer, "vnfId", "/vfModuleId", 202); @@ -241,7 +241,7 @@ public class VnfAdapterRestV1IT extends BaseIntegrationTest { @Test - public void testRollbackVfModuleSuccess() throws Exception { + public void testRollbackVfModuleSuccess() { logStart(); mockVNFRollbackDelete(wireMockServer, "/vfModuleId", 202); @@ -270,7 +270,7 @@ public class VnfAdapterRestV1IT extends BaseIntegrationTest { @Test - public void testCreateVfModuleException() throws Exception { + public void testCreateVfModuleException() { logStart(); mockVNFPost(wireMockServer, "", 202, "vnfId"); diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowAsyncResourceTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowAsyncResourceTest.java index cc2d6ab640..82fe5b7034 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowAsyncResourceTest.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowAsyncResourceTest.java @@ -54,7 +54,7 @@ public class WorkflowAsyncResourceTest extends WorkflowTest { assertEquals(200, workflowResponse.getMessageCode()); } - private void executeWorkflow(String request, String requestId, String processKey) throws InterruptedException { + private void executeWorkflow(String request, String requestId, String processKey) { WorkflowAsyncResource workflowResource = new WorkflowAsyncResource(); VariableMapImpl variableMap = new VariableMapImpl(); diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResourceExceptionHandlingTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResourceExceptionHandlingTest.java index 62b582ea8e..81c86a7ac8 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResourceExceptionHandlingTest.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResourceExceptionHandlingTest.java @@ -37,7 +37,7 @@ public class WorkflowAsyncResourceExceptionHandlingTest { @Test @Deployment(resources = {"testAsyncResource.bpmn"}) - public void asyncRequestSuccess() throws InterruptedException { + public void asyncRequestSuccess() { VariableMapImpl variableMap = new VariableMapImpl(); Map variableValueType = new HashMap<>(); diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/CreateVcpeResCustServiceIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/CreateVcpeResCustServiceIT.java index bdc24875f0..fd30520932 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/CreateVcpeResCustServiceIT.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/CreateVcpeResCustServiceIT.java @@ -97,7 +97,7 @@ public class CreateVcpeResCustServiceIT extends AbstractTestBase { } @Test - public void testCreateVcpeResCustService_Success() throws Exception { + public void testCreateVcpeResCustService_Success() { System.out.println("starting: testCreateVcpeResCustService_Success\n"); MockGetServiceResourcesCatalogData(wireMockServer, "uuid-miu-svc-011-abcdef", "2", "VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json"); @@ -201,7 +201,7 @@ public class CreateVcpeResCustServiceIT extends AbstractTestBase { } @Test - public void testCreateVcpeResCustService_NoParts() throws Exception { + public void testCreateVcpeResCustService_NoParts() { System.out.println("starting: testCreateVcpeResCustService_NoParts\n"); MockGetServiceResourcesCatalogData(wireMockServer, "uuid-miu-svc-011-abcdef", "2", "VCPE/CreateVcpeResCustService/getCatalogServiceResourcesNoData.json"); @@ -267,7 +267,7 @@ public class CreateVcpeResCustServiceIT extends AbstractTestBase { } @Test - public void testCreateVcpeResCustService_Fault_NoRollback() throws Exception { + public void testCreateVcpeResCustService_Fault_NoRollback() { System.out.println("starting: testCreateVcpeResCustService_Fault_NoRollback\n"); MockGetServiceResourcesCatalogData(wireMockServer, "uuid-miu-svc-011-abcdef", "2", "VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json"); @@ -327,7 +327,7 @@ public class CreateVcpeResCustServiceIT extends AbstractTestBase { } @Test - public void testCreateVcpeResCustService_Fault_Rollback() throws Exception { + public void testCreateVcpeResCustService_Fault_Rollback() { System.out.println("starting: testCreateVcpeResCustService_Fault_Rollback\n"); MockGetServiceResourcesCatalogData(wireMockServer, "uuid-miu-svc-011-abcdef", "2", "VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json"); diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DeleteVcpeResCustServiceIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DeleteVcpeResCustServiceIT.java index 4a03aa9fd4..ac5bc7d5f0 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DeleteVcpeResCustServiceIT.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DeleteVcpeResCustServiceIT.java @@ -33,7 +33,6 @@ import static org.onap.so.bpmn.mock.StubResponseAAI.MockQueryAllottedResourceByI import static org.onap.so.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB; import static org.onap.so.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter; import java.io.IOException; -import java.io.UnsupportedEncodingException; import java.util.HashMap; import java.util.Map; import java.util.UUID; @@ -262,7 +261,7 @@ public class DeleteVcpeResCustServiceIT extends AbstractTestBase { logEnd(); } - private Map setupVariables(String requestId) throws UnsupportedEncodingException { + private Map setupVariables(String requestId) { Map variables = new HashMap<>(); variables.put("isDebugLogEnabled", "true"); variables.put("requestId", requestId); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/AAICheckVnfInMaintBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/AAICheckVnfInMaintBBTest.java index 275170d437..49fc8b1f7d 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/AAICheckVnfInMaintBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/AAICheckVnfInMaintBBTest.java @@ -23,7 +23,6 @@ package org.onap.so.bpmn.common; import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doThrow; -import java.io.IOException; import org.camunda.bpm.engine.delegate.BpmnError; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.junit.Test; @@ -33,7 +32,7 @@ public class AAICheckVnfInMaintBBTest extends BaseBPMNTest { @Test - public void sunnyDayAAICheckVnfInMaintBBTest() throws InterruptedException, IOException { + public void sunnyDayAAICheckVnfInMaintBBTest() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("AAICheckVnfInMaintBB", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted().hasPassedInOrder("Start_AAICheckVnfInMaintBB", "Task_CheckVnfInMaint", diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/AAISetPNFInMaintBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/AAISetPNFInMaintBBTest.java index 4ff568771d..94134c294f 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/AAISetPNFInMaintBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/AAISetPNFInMaintBBTest.java @@ -4,14 +4,13 @@ import org.camunda.bpm.engine.delegate.BpmnError; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.junit.Test; import org.onap.so.bpmn.BaseBPMNTest; -import java.io.IOException; import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doThrow; public class AAISetPNFInMaintBBTest extends BaseBPMNTest { @Test - public void sunnyDayAAISetPnfInMaintBBTest() throws InterruptedException, IOException { + public void sunnyDayAAISetPnfInMaintBBTest() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("AAISetPnfInMaintBB", variables); assertThat(pi).isNotNull().isStarted().hasPassedInOrder("Start_AAISetPnfInMaintBB", "Task_SetInMaint", "End_AAISetPnfInMaintBB"); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/AAISetVnfInMaintBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/AAISetVnfInMaintBBTest.java index 5e3bc3b696..ecac0ce4ef 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/AAISetVnfInMaintBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/AAISetVnfInMaintBBTest.java @@ -23,7 +23,6 @@ package org.onap.so.bpmn.common; import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doThrow; -import java.io.IOException; import org.camunda.bpm.engine.delegate.BpmnError; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.junit.Test; @@ -33,7 +32,7 @@ public class AAISetVnfInMaintBBTest extends BaseBPMNTest { @Test - public void sunnyDayAAISetVnfInMaintBBTest() throws InterruptedException, IOException { + public void sunnyDayAAISetVnfInMaintBBTest() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("AAISetVnfInMaintBB", variables); assertThat(pi).isNotNull().isStarted().hasPassedInOrder("Start_AAISetVnfInMaintBB", "Task_SetInMaint", "End_AAISetVnfInMaintBB"); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/AAIUnsetVnfInMaintBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/AAIUnsetVnfInMaintBBTest.java index 7c6b053ac8..9de6a7a408 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/AAIUnsetVnfInMaintBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/AAIUnsetVnfInMaintBBTest.java @@ -23,7 +23,6 @@ package org.onap.so.bpmn.common; import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doThrow; -import java.io.IOException; import org.camunda.bpm.engine.delegate.BpmnError; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.junit.Test; @@ -33,7 +32,7 @@ public class AAIUnsetVnfInMaintBBTest extends BaseBPMNTest { @Test - public void sunnyDayAAISetVnftInMaintBBTest() throws InterruptedException, IOException { + public void sunnyDayAAISetVnftInMaintBBTest() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("AAIUnsetVnfInMaintBB", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted().hasPassedInOrder("Start_AAIUnsetVnfInMaintBB", "Task_UnsetInMaint", diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/SDNOHealthCheckBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/SDNOHealthCheckBBTest.java index e94c13c483..baa362a243 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/SDNOHealthCheckBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/SDNOHealthCheckBBTest.java @@ -23,7 +23,6 @@ package org.onap.so.bpmn.common; import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doThrow; -import java.io.IOException; import org.camunda.bpm.engine.delegate.BpmnError; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.junit.Test; @@ -33,7 +32,7 @@ public class SDNOHealthCheckBBTest extends BaseBPMNTest { @Test - public void sunnyDaySDNOHealthCheckTest() throws InterruptedException, IOException { + public void sunnyDaySDNOHealthCheckTest() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("SDNOVnfHealthCheckBB", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted().hasPassedInOrder("Start_SDNOHealthCheckBB", "Task_SDNOHealthCheck", diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/process/WorkflowActionBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/process/WorkflowActionBBTest.java index 6c732a1edb..a3a0b68836 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/process/WorkflowActionBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/process/WorkflowActionBBTest.java @@ -25,7 +25,6 @@ package org.onap.so.bpmn.infrastructure.bpmn.process; import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doThrow; -import java.io.IOException; import java.util.HashMap; import java.util.Map; import org.camunda.bpm.engine.delegate.BpmnError; @@ -39,7 +38,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class WorkflowActionBBTest extends BaseBPMNTest { @Test - public void sunnyDaySuccessIsTopLevelFlow() throws InterruptedException, IOException { + public void sunnyDaySuccessIsTopLevelFlow() { variables.put("isTopLevelFlow", true); variables.put("completed", true); @@ -56,7 +55,7 @@ public class WorkflowActionBBTest extends BaseBPMNTest { } @Test - public void sunnyDaySuccessNotTopLevelFlow() throws InterruptedException, IOException { + public void sunnyDaySuccessNotTopLevelFlow() { variables.put("isTopLevelFlow", false); variables.put("completed", true); @@ -71,7 +70,7 @@ public class WorkflowActionBBTest extends BaseBPMNTest { } @Test - public void sunnyDayRollback() throws InterruptedException, IOException { + public void sunnyDayRollback() { variables.put("isTopLevelFlow", false); variables.put("isRollbackNeeded", false); @@ -88,7 +87,7 @@ public class WorkflowActionBBTest extends BaseBPMNTest { } @Test - public void rainyDayAbort() throws Exception { + public void rainyDayAbort() { variables.put("isTopLevelFlow", true); variables.put("completed", false); @@ -138,7 +137,7 @@ public class WorkflowActionBBTest extends BaseBPMNTest { } @Test - public void errorCatchBpmnSubprocessHandlingTest() throws Exception { + public void errorCatchBpmnSubprocessHandlingTest() { variables.put("isTopLevelFlow", true); variables.put("sentSyncResponse", false); doThrow(new BpmnError("7000", "TESTING ERRORS")).when(workflowActionBBTasks) diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateNetworkBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateNetworkBBTest.java index b4eab2cc13..8170958daa 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateNetworkBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateNetworkBBTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class ActivateNetworkBBTest extends BaseBPMNTest { @Test - public void sunnyDayActivateNetwork_Test() throws InterruptedException { + public void sunnyDayActivateNetwork_Test() { mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); ProcessInstance pi = runtimeService.startProcessInstanceByKey("ActivateNetworkBB", variables); assertThat(pi).isNotNull(); @@ -41,7 +41,7 @@ public class ActivateNetworkBBTest extends BaseBPMNTest { } @Test - public void rainyDayActivateNetwork_Test() throws Exception { + public void rainyDayActivateNetwork_Test() { mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiUpdateTasks) .updateOrchestrationStatusActiveNetwork(any(BuildingBlockExecution.class)); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateNetworkCollectionBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateNetworkCollectionBBTest.java index 6a081e24ff..509770ae68 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateNetworkCollectionBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateNetworkCollectionBBTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class ActivateNetworkCollectionBBTest extends BaseBPMNTest { @Test - public void sunnyDayActivateNetworkCollection_Test() throws InterruptedException { + public void sunnyDayActivateNetworkCollection_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("ActivateNetworkCollectionBB", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted().hasPassedInOrder("activateNetworkCollection_startEvent", @@ -41,7 +41,7 @@ public class ActivateNetworkCollectionBBTest extends BaseBPMNTest { @Test - public void rainyDayActivateNetworkCollection_Test() throws Exception { + public void rainyDayActivateNetworkCollection_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiUpdateTasks) .updateOrchestrationStatusActiveNetworkCollection(any(BuildingBlockExecution.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("ActivateNetworkCollectionBB", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateServiceInstanceBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateServiceInstanceBBTest.java index 9eefaded9c..4ae8e3c786 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateServiceInstanceBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateServiceInstanceBBTest.java @@ -21,7 +21,6 @@ package org.onap.so.bpmn.infrastructure.bpmn.subprocess; import static org.camunda.bpm.engine.test.assertions.ProcessEngineTests.assertThat; -import java.io.IOException; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.junit.Test; import org.onap.so.bpmn.BaseBPMNTest; @@ -29,7 +28,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class ActivateServiceInstanceBBTest extends BaseBPMNTest { @Test - public void sunnyDaySDNC() throws InterruptedException, IOException { + public void sunnyDaySDNC() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("ActivateServiceInstanceBB", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted().hasPassedInOrder("Start_ActivateServiceInstanceBB", "Task_NoOpServiceInstance", diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateVfModuleBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateVfModuleBBTest.java index 05665a0da8..de0ac4f869 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateVfModuleBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateVfModuleBBTest.java @@ -23,7 +23,6 @@ package org.onap.so.bpmn.infrastructure.bpmn.subprocess; import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doThrow; -import java.io.IOException; import org.camunda.bpm.engine.delegate.BpmnError; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.junit.Before; @@ -41,7 +40,7 @@ public class ActivateVfModuleBBTest extends BaseBPMNTest { } @Test - public void sunnyDay() throws InterruptedException, IOException { + public void sunnyDay() { mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); ProcessInstance pi = runtimeService.startProcessInstanceByKey("ActivateVfModuleBB", variables); @@ -52,7 +51,7 @@ public class ActivateVfModuleBBTest extends BaseBPMNTest { } @Test - public void rainyDay() throws Exception { + public void rainyDay() { mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); doThrow(BpmnError.class).when(aaiUpdateTasks) .updateOrchestrationStatusActivateVfModule(any(BuildingBlockExecution.class)); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateVnfBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateVnfBBTest.java index 7a78a6a6e2..f127d0b91d 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateVnfBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateVnfBBTest.java @@ -21,14 +21,13 @@ package org.onap.so.bpmn.infrastructure.bpmn.subprocess; import static org.camunda.bpm.engine.test.assertions.ProcessEngineTests.assertThat; -import java.io.IOException; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.junit.Test; import org.onap.so.bpmn.BaseBPMNTest; public class ActivateVnfBBTest extends BaseBPMNTest { @Test - public void sunnyDay() throws InterruptedException, IOException { + public void sunnyDay() { mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); ProcessInstance pi = runtimeService.startProcessInstanceByKey("ActivateVnfBB", variables); assertThat(pi).isNotNull(); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateVolumeGroupBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateVolumeGroupBBTest.java index 602f1c874f..79f5479907 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateVolumeGroupBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateVolumeGroupBBTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class ActivateVolumeGroupBBTest extends BaseBPMNTest { @Test - public void sunnyDayAssignVolumeGroup_Test() throws InterruptedException { + public void sunnyDayAssignVolumeGroup_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("ActivateVolumeGroupBB", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted().hasPassedInOrder("ActivateVolumeGroupBB_Start", "ActivateVolumeGroup", @@ -40,7 +40,7 @@ public class ActivateVolumeGroupBBTest extends BaseBPMNTest { } @Test - public void rainyDayAssignVolumeGroup_Test() throws Exception { + public void rainyDayAssignVolumeGroup_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiUpdateTasks) .updateOrchestrationStatusActiveVolumeGroup(any(BuildingBlockExecution.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("ActivateVolumeGroupBB", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignNetworkBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignNetworkBBTest.java index 42291a9593..e3c3f48f73 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignNetworkBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignNetworkBBTest.java @@ -33,7 +33,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class AssignNetworkBBTest extends BaseBPMNTest { @Test @Deployment(resources = {"subprocess/AssignNetworkRollbackBB.bpmn"}) - public void sunnyDayAssignNetwork_Test() throws InterruptedException { + public void sunnyDayAssignNetwork_Test() { mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); ProcessInstance pi = runtimeService.startProcessInstanceByKey("AssignNetworkBB", variables); assertThat(pi).isNotNull(); @@ -46,7 +46,7 @@ public class AssignNetworkBBTest extends BaseBPMNTest { } @Test - public void rainyDayAssignNetwork_Test() throws Exception { + public void rainyDayAssignNetwork_Test() { mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiUpdateTasks) .updateOrchestrationStatusAssignedNetwork(any(BuildingBlockExecution.class)); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignServiceInstanceBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignServiceInstanceBBTest.java index f45ed935a6..5fdac064e1 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignServiceInstanceBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignServiceInstanceBBTest.java @@ -21,7 +21,6 @@ package org.onap.so.bpmn.infrastructure.bpmn.subprocess; import static org.camunda.bpm.engine.test.assertions.ProcessEngineTests.assertThat; -import java.io.IOException; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.junit.Test; import org.onap.so.bpmn.BaseBPMNTest; @@ -29,7 +28,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class AssignServiceInstanceBBTest extends BaseBPMNTest { @Test - public void sunnyDaySDNC() throws InterruptedException, IOException { + public void sunnyDaySDNC() { mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); ProcessInstance pi = runtimeService.startProcessInstanceByKey("AssignServiceInstanceBB", variables); assertThat(pi).isNotNull(); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVfModuleBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVfModuleBBTest.java index 358d1a2789..b2520d8b53 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVfModuleBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVfModuleBBTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class AssignVfModuleBBTest extends BaseBPMNTest { @Test - public void sunnyDayAssignVfModule_Test() throws InterruptedException { + public void sunnyDayAssignVfModule_Test() { mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); ProcessInstance pi = runtimeService.startProcessInstanceByKey("AssignVfModuleBB", variables); assertThat(pi).isNotNull(); @@ -42,7 +42,7 @@ public class AssignVfModuleBBTest extends BaseBPMNTest { } @Test - public void rainyDayAssignVfModule_Test() throws Exception { + public void rainyDayAssignVfModule_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiCreateTasks) .createVfModule(any(BuildingBlockExecution.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("AssignVfModuleBB", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVnfBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVnfBBTest.java index f46331fdd4..ede0786613 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVnfBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVnfBBTest.java @@ -23,7 +23,6 @@ package org.onap.so.bpmn.infrastructure.bpmn.subprocess; import static org.camunda.bpm.engine.test.assertions.ProcessEngineTests.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doThrow; -import java.io.IOException; import org.camunda.bpm.engine.delegate.BpmnError; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.junit.Test; @@ -32,7 +31,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class AssignVnfBBTest extends BaseBPMNTest { @Test - public void sunnyDayAssignVnfBBTest() throws InterruptedException, IOException { + public void sunnyDayAssignVnfBBTest() { variables.put("homing", true); mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); ProcessInstance pi = runtimeService.startProcessInstanceByKey("AssignVnfBB", variables); @@ -45,7 +44,7 @@ public class AssignVnfBBTest extends BaseBPMNTest { } @Test - public void rainyDayAssignVnfBBTest() throws Exception { + public void rainyDayAssignVnfBBTest() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiCreateTasks) .createVnf(any(BuildingBlockExecution.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("AssignVnfBB", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVolumeGroupBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVolumeGroupBBTest.java index 0de657ed7f..bc762f9133 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVolumeGroupBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVolumeGroupBBTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class AssignVolumeGroupBBTest extends BaseBPMNTest { @Test - public void sunnyDayAssignVolumeGroup_Test() throws InterruptedException { + public void sunnyDayAssignVolumeGroup_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("AssignVolumeGroupBB", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted().hasPassedInOrder("AssignVolumeGroupBB_Start", "AssignVolumeGroup", @@ -40,7 +40,7 @@ public class AssignVolumeGroupBBTest extends BaseBPMNTest { } @Test - public void rainyDayAssignVolumeGroup_Test() throws Exception { + public void rainyDayAssignVolumeGroup_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiCreateTasks) .createVolumeGroup(any(BuildingBlockExecution.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("AssignVolumeGroupBB", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/BuildingBlockValidatorRunnerTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/BuildingBlockValidatorRunnerTest.java index dc52c9889a..fca5ab0db9 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/BuildingBlockValidatorRunnerTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/BuildingBlockValidatorRunnerTest.java @@ -29,7 +29,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class BuildingBlockValidatorRunnerTest extends BaseBPMNTest { @Test - public void sunnyDayActivateNetwork_Test() throws InterruptedException { + public void sunnyDayActivateNetwork_Test() { variables.put("flowToBeCalled", "CreateVolumeGroupBB"); ProcessInstance pi = runtimeService.startProcessInstanceByKey("BuildingBlockValidatorRunnerTest", variables); assertThat(pi).isNotNull(); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ChangeModelVfModuleBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ChangeModelVfModuleBBTest.java index 42be6a5711..9a9bc6ef44 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ChangeModelVfModuleBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ChangeModelVfModuleBBTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class ChangeModelVfModuleBBTest extends BaseBPMNTest { @Test - public void sunnyDayChangeModelVfModuleTest() throws InterruptedException { + public void sunnyDayChangeModelVfModuleTest() { mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); ProcessInstance pi = runtimeService.startProcessInstanceByKey("ChangeModelVfModuleBB", variables); assertThat(pi).isNotNull(); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ConfigurationScaleOutBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ConfigurationScaleOutBBTest.java index 8a19bc2561..db0009f09a 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ConfigurationScaleOutBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ConfigurationScaleOutBBTest.java @@ -23,7 +23,6 @@ package org.onap.so.bpmn.infrastructure.bpmn.subprocess; import static org.camunda.bpm.engine.test.assertions.ProcessEngineTests.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doThrow; -import java.io.IOException; import org.camunda.bpm.engine.delegate.BpmnError; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.junit.Test; @@ -35,7 +34,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class ConfigurationScaleOutBBTest extends BaseBPMNTest { @Test - public void sunnyDayConfigurationScaleOutBBTest() throws InterruptedException, IOException { + public void sunnyDayConfigurationScaleOutBBTest() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("ConfigurationScaleOutBB", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted().hasPassedInOrder("Start_ConfigScaleOutBB", "QueryVfModule", diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateCustomerBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateCustomerBBTest.java index ee85f9bc05..23b7b8ca96 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateCustomerBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateCustomerBBTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class CreateCustomerBBTest extends BaseBPMNTest { @Test - public void createCustomerBBTest() throws InterruptedException { + public void createCustomerBBTest() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateCustomerBB", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted().hasPassedInOrder("CreateCustomerBB_Start", "CreateCustomerAAI", diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateNetworkBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateNetworkBBTest.java index ece5b93ee2..50f43307f9 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateNetworkBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateNetworkBBTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class CreateNetworkBBTest extends BaseBPMNTest { @Test - public void sunnyDayCreateNetwork_Test() throws InterruptedException { + public void sunnyDayCreateNetwork_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateNetworkBB", variables); assertThat(pi).isNotNull(); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateNetworkCollectionBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateNetworkCollectionBBTest.java index 1d9cf5ad69..f83bb4ba98 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateNetworkCollectionBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateNetworkCollectionBBTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class CreateNetworkCollectionBBTest extends BaseBPMNTest { @Test - public void sunnyDayCreateNetworkCollection_Test() throws InterruptedException { + public void sunnyDayCreateNetworkCollection_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateNetworkCollectionBB", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted().hasPassedInOrder("createNetworkCollection_startEvent", "BuildName_ServiceTask", @@ -42,7 +42,7 @@ public class CreateNetworkCollectionBBTest extends BaseBPMNTest { } @Test - public void rainyDayCreateNetworkCollection_Test() throws Exception { + public void rainyDayCreateNetworkCollection_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiCreateTasks) .createNetworkCollectionInstanceGroup(any(BuildingBlockExecution.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateNetworkCollectionBB", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVolumeGroupBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVolumeGroupBBTest.java index c7eb2ac3d1..f41620262d 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVolumeGroupBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVolumeGroupBBTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class CreateVolumeGroupBBTest extends BaseBPMNTest { @Test - public void sunnyDayCreateVolumeGroup_Test() throws InterruptedException { + public void sunnyDayCreateVolumeGroup_Test() { mockSubprocess("VnfAdapter", "Mocked VnfAdapter", "GenericStub"); ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateVolumeGroupBB", variables); assertThat(pi).isNotNull(); @@ -44,7 +44,7 @@ public class CreateVolumeGroupBBTest extends BaseBPMNTest { } @Test - public void rainyDayCreateVolumeGroup_Test() throws Exception { + public void rainyDayCreateVolumeGroup_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(vnfAdapterCreateTasks) .createVolumeGroupRequest(any(BuildingBlockExecution.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateVolumeGroupBB", variables); @@ -56,7 +56,7 @@ public class CreateVolumeGroupBBTest extends BaseBPMNTest { } @Test - public void rainyDayCreateVolumeGroupUpdateHeatStackIdError_Test() throws Exception { + public void rainyDayCreateVolumeGroupUpdateHeatStackIdError_Test() { mockSubprocess("VnfAdapter", "Mocked VnfAdapter", "GenericStub"); doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiUpdateTasks) .updateHeatStackIdVolumeGroup(any(BuildingBlockExecution.class)); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateNetworkBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateNetworkBBTest.java index 548dca2225..fe05d567d2 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateNetworkBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateNetworkBBTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class DeactivateNetworkBBTest extends BaseBPMNTest { @Test - public void sunnyDayDeactivateNetworkBB_Test() throws InterruptedException { + public void sunnyDayDeactivateNetworkBB_Test() { mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeactivateNetworkBB", variables); assertThat(pi).isNotNull(); @@ -41,7 +41,7 @@ public class DeactivateNetworkBBTest extends BaseBPMNTest { } @Test - public void rainyDayDeactivateNetworkBB_Test() throws Exception { + public void rainyDayDeactivateNetworkBB_Test() { mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); doThrow(new BpmnError("7000", "TESTING ERRORS")).when(sdncDeactivateTasks) .deactivateNetwork(any(BuildingBlockExecution.class)); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateServiceInstanceBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateServiceInstanceBBTest.java index 1dd1a55b5c..c7d27ba944 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateServiceInstanceBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateServiceInstanceBBTest.java @@ -30,7 +30,7 @@ import org.onap.so.bpmn.BaseBPMNTest; */ public class DeactivateServiceInstanceBBTest extends BaseBPMNTest { @Test - public void sunnyDayDeactivateServiceInstanceSDNC() throws InterruptedException { + public void sunnyDayDeactivateServiceInstanceSDNC() { mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeactivateServiceInstanceBB", variables); assertThat(pi).isNotNull(); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateVfModuleBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateVfModuleBBTest.java index 945c212f90..95f7bc8c8e 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateVfModuleBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateVfModuleBBTest.java @@ -23,7 +23,6 @@ package org.onap.so.bpmn.infrastructure.bpmn.subprocess; import static org.camunda.bpm.engine.test.assertions.ProcessEngineTests.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doThrow; -import java.io.IOException; import org.camunda.bpm.engine.delegate.BpmnError; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.junit.Test; @@ -32,7 +31,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class DeactivateVfModuleBBTest extends BaseBPMNTest { @Test - public void sunnyDay() throws InterruptedException, IOException { + public void sunnyDay() { mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeactivateVfModuleBB", variables); assertThat(pi).isNotNull(); @@ -42,7 +41,7 @@ public class DeactivateVfModuleBBTest extends BaseBPMNTest { } @Test - public void rainyDay() throws Exception { + public void rainyDay() { mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); doThrow(BpmnError.class).when(aaiUpdateTasks) .updateOrchestrationStatusDeactivateVfModule(any(BuildingBlockExecution.class)); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateVnfBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateVnfBBTest.java index 0ecf0448e2..f4d6e70d52 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateVnfBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateVnfBBTest.java @@ -23,7 +23,6 @@ package org.onap.so.bpmn.infrastructure.bpmn.subprocess; import static org.camunda.bpm.engine.test.assertions.ProcessEngineTests.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doThrow; -import java.io.IOException; import org.camunda.bpm.engine.delegate.BpmnError; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.junit.Test; @@ -32,7 +31,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class DeactivateVnfBBTest extends BaseBPMNTest { @Test - public void sunnyDay() throws InterruptedException, IOException { + public void sunnyDay() { mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeactivateVnfBB", variables); assertThat(pi).isNotNull(); @@ -53,7 +52,7 @@ public class DeactivateVnfBBTest extends BaseBPMNTest { } @Test - public void rainyDayDeactivateVnfAAIError_Test() throws Exception { + public void rainyDayDeactivateVnfAAIError_Test() { mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiUpdateTasks) .updateOrchestrationStatusAssignedVnf(any(BuildingBlockExecution.class)); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateVolumeGroupBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateVolumeGroupBBTest.java index ab0903d645..24fcc14fc7 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateVolumeGroupBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateVolumeGroupBBTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class DeactivateVolumeGroupBBTest extends BaseBPMNTest { @Test - public void sunnyDayAssignVolumeGroup_Test() throws InterruptedException { + public void sunnyDayAssignVolumeGroup_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeactivateVolumeGroupBB", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted().hasPassedInOrder("DeactivateVolumeGroupBB_Start", "DeactivateVolumeGroup", @@ -40,7 +40,7 @@ public class DeactivateVolumeGroupBBTest extends BaseBPMNTest { } @Test - public void rainyDayAssignVolumeGroup_Test() throws Exception { + public void rainyDayAssignVolumeGroup_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiUpdateTasks) .updateOrchestrationStatusCreatedVolumeGroup(any(BuildingBlockExecution.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeactivateVolumeGroupBB", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteInstanceGroupBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteInstanceGroupBBTest.java index b527e8887e..20aa5dafc0 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteInstanceGroupBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteInstanceGroupBBTest.java @@ -22,7 +22,6 @@ package org.onap.so.bpmn.infrastructure.bpmn.subprocess; import static org.camunda.bpm.engine.test.assertions.ProcessEngineTests.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doThrow; -import java.io.IOException; import org.camunda.bpm.engine.delegate.BpmnError; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.junit.Test; @@ -31,7 +30,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class DeleteInstanceGroupBBTest extends BaseBPMNTest { @Test - public void sunnyDay() throws InterruptedException, IOException { + public void sunnyDay() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeleteInstanceGroupBB", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted().hasPassedInOrder("DeleteInstanceGroupBB_Start", "DeleteInstanceGroupNaming", diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteNetworkBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteNetworkBBTest.java index 5a62436bfc..d496b3bd38 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteNetworkBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteNetworkBBTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class DeleteNetworkBBTest extends BaseBPMNTest { @Test - public void sunnyDayDeleteNetwork_Test() throws InterruptedException { + public void sunnyDayDeleteNetwork_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeleteNetworkBB", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted().hasPassedInOrder("deleteNetwork_startEvent", "deleteNetworkAIC", "updateNetworkAAI", @@ -40,7 +40,7 @@ public class DeleteNetworkBBTest extends BaseBPMNTest { } @Test - public void rainyDayDeleteNetwork_Test() throws Exception { + public void rainyDayDeleteNetwork_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(networkAdapterDeleteTasks) .deleteNetwork(any(BuildingBlockExecution.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeleteNetworkBB", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteNetworkCollectionBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteNetworkCollectionBBTest.java index f1da33d75a..90d179114b 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteNetworkCollectionBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteNetworkCollectionBBTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class DeleteNetworkCollectionBBTest extends BaseBPMNTest { @Test - public void sunnyDayCreateNetworkCollection_Test() throws InterruptedException { + public void sunnyDayCreateNetworkCollection_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeleteNetworkCollectionBB", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted().hasPassedInOrder("deleteNetworkCollection_startEvent", diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVolumeGroupBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVolumeGroupBBTest.java index 00adcd2c59..5dfa9c6e3f 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVolumeGroupBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVolumeGroupBBTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class DeleteVolumeGroupBBTest extends BaseBPMNTest { @Test - public void sunnyDayDeleteVolumeGroup_Test() throws InterruptedException { + public void sunnyDayDeleteVolumeGroup_Test() { mockSubprocess("VnfAdapter", "Mocked VnfAdapter", "GenericStub"); ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeleteVolumeGroupBB", variables); assertThat(pi).isNotNull(); @@ -41,7 +41,7 @@ public class DeleteVolumeGroupBBTest extends BaseBPMNTest { } @Test - public void rainyDayDeleteVolumeGroup_Test() throws Exception { + public void rainyDayDeleteVolumeGroup_Test() { mockSubprocess("VnfAdapter", "Mocked VnfAdapter", "GenericStub"); doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiUpdateTasks) .updateOrchestrationStatusAssignedVolumeGroup(any(BuildingBlockExecution.class)); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DistributeTrafficActivityTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DistributeTrafficActivityTest.java index 2ae8f12c47..5a2a1539b8 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DistributeTrafficActivityTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DistributeTrafficActivityTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class DistributeTrafficActivityTest extends BaseBPMNTest { @Test - public void sunnyDayDistributeTrafficActivity_Test() throws InterruptedException { + public void sunnyDayDistributeTrafficActivity_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("DistributeTrafficActivity", variables); assertThat(pi).isNotNull(); processExternalTasks(pi, "TaskDistributeTraffic"); @@ -41,7 +41,7 @@ public class DistributeTrafficActivityTest extends BaseBPMNTest { } @Test - public void rainyDayDistributeTrafficActivity_Test() throws Exception { + public void rainyDayDistributeTrafficActivity_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(appcOrchestratorPreProcessor) .buildAppcTaskRequest(any(BuildingBlockExecution.class), any(String.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("DistributeTrafficActivity", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DistributeTrafficCheckActivityTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DistributeTrafficCheckActivityTest.java index 54f3a07839..fcf9cd4d62 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DistributeTrafficCheckActivityTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DistributeTrafficCheckActivityTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class DistributeTrafficCheckActivityTest extends BaseBPMNTest { @Test - public void sunnyDayDistributeTrafficCheckActivity_Test() throws InterruptedException { + public void sunnyDayDistributeTrafficCheckActivity_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("DistributeTrafficCheckActivity", variables); assertThat(pi).isNotNull(); processExternalTasks(pi, "TaskDistributeTrafficCheck"); @@ -41,7 +41,7 @@ public class DistributeTrafficCheckActivityTest extends BaseBPMNTest { } @Test - public void rainyDayDistributeTrafficActivity_Test() throws Exception { + public void rainyDayDistributeTrafficActivity_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(appcOrchestratorPreProcessor) .buildAppcTaskRequest(any(BuildingBlockExecution.class), any(String.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("DistributeTrafficCheckActivity", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ExecuteBuildingBlockTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ExecuteBuildingBlockTest.java index c2363b78c5..76de2d741d 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ExecuteBuildingBlockTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ExecuteBuildingBlockTest.java @@ -63,7 +63,7 @@ public class ExecuteBuildingBlockTest extends BaseBPMNTest { } @Test - public void test_sunnyDayExecuteBuildingBlock_silentSuccess() throws Exception { + public void test_sunnyDayExecuteBuildingBlock_silentSuccess() { variables.put("orchestrationStatusValidationResult", OrchestrationStatusValidationDirective.SILENT_SUCCESS); variables.put("homing", false); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/FlowCompleteActivity.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/FlowCompleteActivity.java index 1b0e8ed8a3..c8fbdf6d7c 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/FlowCompleteActivity.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/FlowCompleteActivity.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class FlowCompleteActivity extends BaseBPMNTest { @Test - public void sunnyDayFlowCompleteActivity_Test() throws InterruptedException { + public void sunnyDayFlowCompleteActivity_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("FlowCompleteActivity", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted().hasPassedInOrder("FlowCompleteActivity_Start", "TaskUpdateRequestDB", @@ -40,7 +40,7 @@ public class FlowCompleteActivity extends BaseBPMNTest { } @Test - public void rainyDayFlowCompleteActivity_Test() throws Exception { + public void rainyDayFlowCompleteActivity_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(flowCompletionTasks) .updateRequestDbStatus(any(BuildingBlockExecution.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("FlowCompleteActivity", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/GenericVnfHealthCheckBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/GenericVnfHealthCheckBBTest.java index b10a1007f5..9599fcd90e 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/GenericVnfHealthCheckBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/GenericVnfHealthCheckBBTest.java @@ -23,7 +23,6 @@ package org.onap.so.bpmn.infrastructure.bpmn.subprocess; import static org.camunda.bpm.engine.test.assertions.ProcessEngineTests.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doThrow; -import java.io.IOException; import org.camunda.bpm.engine.delegate.BpmnError; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.junit.Test; @@ -35,7 +34,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class GenericVnfHealthCheckBBTest extends BaseBPMNTest { @Test - public void sunnyDayGenericVnfHealthCheckBBTest() throws InterruptedException, IOException { + public void sunnyDayGenericVnfHealthCheckBBTest() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("GenericVnfHealthCheckBB", variables); assertThat(pi).isNotNull(); @@ -45,7 +44,7 @@ public class GenericVnfHealthCheckBBTest extends BaseBPMNTest { } @Test - public void genericVnfHealthCheckBBExceptionTest() throws Exception { + public void genericVnfHealthCheckBBExceptionTest() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(genericVnfHealthCheck) .setParamsForGenericVnfHealthCheck(any(BuildingBlockExecution.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("GenericVnfHealthCheckBB", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/PauseForManualTaskActivityTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/PauseForManualTaskActivityTest.java index 4b35afa78a..22c7e2bec6 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/PauseForManualTaskActivityTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/PauseForManualTaskActivityTest.java @@ -46,7 +46,7 @@ public class PauseForManualTaskActivityTest extends BaseBPMNTest { protected TaskService taskService; @Test - public void sunnyDayPauseForManualTaskTimeout_Test() throws InterruptedException { + public void sunnyDayPauseForManualTaskTimeout_Test() { variables.put("taskTimeout", TIMEOUT_10_S); ProcessInstance pi = runtimeService.startProcessInstanceByKey("PauseForManualTaskActivity", variables); assertThat(pi).isNotNull(); @@ -65,7 +65,7 @@ public class PauseForManualTaskActivityTest extends BaseBPMNTest { } @Test - public void sunnyDayPauseForManualTaskCompleted_Test() throws InterruptedException { + public void sunnyDayPauseForManualTaskCompleted_Test() { variables.put("taskTimeout", TIMEOUT_10_S); ProcessInstance pi = runtimeService.startProcessInstanceByKey("PauseForManualTaskActivity", variables); assertThat(pi).isNotNull(); @@ -82,7 +82,7 @@ public class PauseForManualTaskActivityTest extends BaseBPMNTest { } @Test - public void rainyDayPauseForManualTask_Test() throws Exception { + public void rainyDayPauseForManualTask_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(manualHandlingTasks) .createExternalTicket((any(BuildingBlockExecution.class))); ProcessInstance pi = runtimeService.startProcessInstanceByKey("PauseForManualTaskActivity", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/PauseForManualTaskRainyDayTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/PauseForManualTaskRainyDayTest.java index 6a87656134..481706cd99 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/PauseForManualTaskRainyDayTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/PauseForManualTaskRainyDayTest.java @@ -47,7 +47,7 @@ public class PauseForManualTaskRainyDayTest extends BaseBPMNTest { protected TaskService taskService; @Test - public void sunnyDayPauseForManualTaskRainyDayTimeout_Test() throws InterruptedException { + public void sunnyDayPauseForManualTaskRainyDayTimeout_Test() { variables.put("taskTimeout", TIMEOUT_10_S); ProcessInstance pi = runtimeService.startProcessInstanceByKey("PauseForManualTaskRainyDay", variables); assertThat(pi).isNotNull(); @@ -66,7 +66,7 @@ public class PauseForManualTaskRainyDayTest extends BaseBPMNTest { } @Test - public void sunnyDayPauseForManualTaskCompleted_Test() throws InterruptedException { + public void sunnyDayPauseForManualTaskCompleted_Test() { variables.put("taskTimeout", TIMEOUT_10_S); ProcessInstance pi = runtimeService.startProcessInstanceByKey("PauseForManualTaskRainyDay", variables); assertThat(pi).isNotNull(); @@ -83,7 +83,7 @@ public class PauseForManualTaskRainyDayTest extends BaseBPMNTest { } @Test - public void rainyDayPauseForManualTask_Test() throws Exception { + public void rainyDayPauseForManualTask_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(manualHandlingTasks) .createExternalTicket((any(BuildingBlockExecution.class))); ProcessInstance pi = runtimeService.startProcessInstanceByKey("PauseForManualTaskRainyDay", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/SDNCHandlerTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/SDNCHandlerTest.java index 8f48e02afa..3996308176 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/SDNCHandlerTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/SDNCHandlerTest.java @@ -41,8 +41,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; public class SDNCHandlerTest extends BaseBPMNTest { @Test - public void sunnyDay_SDNCHandler_Sync_Final_Test() - throws InterruptedException, MapperException, BadResponseException, IOException { + public void sunnyDay_SDNCHandler_Sync_Final_Test() throws MapperException, BadResponseException, IOException { final String sdncResponse = new String(Files.readAllBytes(Paths.get("src/test/resources/SDNCClientPut200Response.json"))); doReturn(sdncResponse).when(sdncClient).post(createSDNCRequest().getSDNCPayload(), SDNCTopology.CONFIGURATION); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetworkBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetworkBBTest.java index c20a56af66..2a0bfe3d24 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetworkBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetworkBBTest.java @@ -32,7 +32,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class UnassignNetworkBBTest extends BaseBPMNTest { @Test - public void sunnyDayAssignNetwork_Test() throws InterruptedException { + public void sunnyDayAssignNetwork_Test() { mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignNetworkBB", variables); assertThat(pi).isNotNull(); @@ -43,7 +43,7 @@ public class UnassignNetworkBBTest extends BaseBPMNTest { } @Test - public void rainyDayAssignNetwork_Test() throws Exception { + public void rainyDayAssignNetwork_Test() { mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); doThrow(new BpmnError("7000", "TESTING ERRORS")).when(unassignNetworkBB) .checkRelationshipRelatedTo(any(BuildingBlockExecution.class), eq("vf-module")); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignServiceInstanceBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignServiceInstanceBBTest.java index 3b503618f1..4f07f36659 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignServiceInstanceBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignServiceInstanceBBTest.java @@ -30,7 +30,7 @@ import org.onap.so.bpmn.common.DelegateExecutionImpl; public class UnassignServiceInstanceBBTest extends BaseBPMNTest { @Test - public void sunnyDayUnassignServiceInstanceSDNC() throws InterruptedException { + public void sunnyDayUnassignServiceInstanceSDNC() { mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); BuildingBlockExecution bbe = new DelegateExecutionImpl(new ExecutionImpl()); variables.put("gBuildingBlockExecution", bbe); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignVfModuleBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignVfModuleBBTest.java index e6fae0b005..2c290a9fcf 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignVfModuleBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignVfModuleBBTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class UnassignVfModuleBBTest extends BaseBPMNTest { @Test - public void sunnyDayUnassignVfModule_Test() throws InterruptedException { + public void sunnyDayUnassignVfModule_Test() { mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignVfModuleBB", variables); assertThat(pi).isNotNull(); @@ -53,7 +53,7 @@ public class UnassignVfModuleBBTest extends BaseBPMNTest { } @Test - public void rainyDayUnassignVfModuleSDNCUnassignFailed_Test() throws Exception { + public void rainyDayUnassignVfModuleSDNCUnassignFailed_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(sdncUnassignTasks) .unassignVfModule(any(BuildingBlockExecution.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignVfModuleBB", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignVnfBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignVnfBBTest.java index 2a6435218d..8924c53116 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignVnfBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignVnfBBTest.java @@ -32,7 +32,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class UnassignVnfBBTest extends BaseBPMNTest { @Test - public void sunnyDayUnassignVnf_Test() throws InterruptedException { + public void sunnyDayUnassignVnf_Test() { mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignVnfBB", variables); assertThat(pi).isNotNull(); @@ -43,7 +43,7 @@ public class UnassignVnfBBTest extends BaseBPMNTest { @Test @Ignore - public void rainyDayUnassignVnfInstanceGroupsDeleteFailed_Test() throws Exception { + public void rainyDayUnassignVnfInstanceGroupsDeleteFailed_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(unassignVnf) .deleteInstanceGroups(any(BuildingBlockExecution.class)); // .deleteVnf(any(BuildingBlockExecution.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignVnfBB", variables); @@ -65,7 +65,7 @@ public class UnassignVnfBBTest extends BaseBPMNTest { } @Test - public void rainyDayUnassignVnfSDNCUnassignFailed_Test() throws Exception { + public void rainyDayUnassignVnfSDNCUnassignFailed_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(sdncUnassignTasks) .unassignVnf(any(BuildingBlockExecution.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignVnfBB", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignVolumeGroupBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignVolumeGroupBBTest.java index 1cc0788613..4258bf1498 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignVolumeGroupBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignVolumeGroupBBTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class UnassignVolumeGroupBBTest extends BaseBPMNTest { @Test - public void sunnyDayUnassignVolumeGroup_Test() throws InterruptedException { + public void sunnyDayUnassignVolumeGroup_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignVolumeGroupBB", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted().hasPassedInOrder("UnassignVolumeGroupBB_Start", "UnassignVolumeGroup", @@ -40,7 +40,7 @@ public class UnassignVolumeGroupBBTest extends BaseBPMNTest { } @Test - public void rainyDayUnassignVolumeGroup_Test() throws InterruptedException { + public void rainyDayUnassignVolumeGroup_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiDeleteTasks) .deleteVolumeGroup(any(BuildingBlockExecution.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignVolumeGroupBB", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UpdateNetworkBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UpdateNetworkBBTest.java index d9194587c6..15ed76bd16 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UpdateNetworkBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UpdateNetworkBBTest.java @@ -32,7 +32,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class UpdateNetworkBBTest extends BaseBPMNTest { @Test - public void updateNetworkBBTest() throws InterruptedException { + public void updateNetworkBBTest() { mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("UpdateNetworkBB", variables); assertThat(processInstance).isNotNull(); @@ -44,7 +44,7 @@ public class UpdateNetworkBBTest extends BaseBPMNTest { } @Test - public void updateNetworkBBExceptionTest() throws Exception { + public void updateNetworkBBExceptionTest() { mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiQueryTasks) .queryNetworkVpnBinding(any(BuildingBlockExecution.class)); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFCheckClosedLoopDisabledFlagActivityTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFCheckClosedLoopDisabledFlagActivityTest.java index ac03cac4f9..6cde3bb8b5 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFCheckClosedLoopDisabledFlagActivityTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFCheckClosedLoopDisabledFlagActivityTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class VNFCheckClosedLoopDisabledFlagActivityTest extends BaseBPMNTest { @Test - public void sunnyDayVNFCheckClosedLoopDisabledFlagActivity_Test() throws InterruptedException { + public void sunnyDayVNFCheckClosedLoopDisabledFlagActivity_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFCheckClosedLoopDisabledFlagActivity", variables); assertThat(pi).isNotNull(); @@ -41,7 +41,7 @@ public class VNFCheckClosedLoopDisabledFlagActivityTest extends BaseBPMNTest { } @Test - public void rainyDayVNFCheckClosedLoopDisabledFlagActivity_Test() throws Exception { + public void rainyDayVNFCheckClosedLoopDisabledFlagActivity_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiFlagTasks) .checkVnfClosedLoopDisabledFlag(any(BuildingBlockExecution.class)); ProcessInstance pi = diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFCheckInMaintFlagActivityTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFCheckInMaintFlagActivityTest.java index 7b94865771..d2bb508c48 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFCheckInMaintFlagActivityTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFCheckInMaintFlagActivityTest.java @@ -32,7 +32,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class VNFCheckInMaintFlagActivityTest extends BaseBPMNTest { @Test - public void sunnyDayVNFCheckInMaintFlagActivity_Test() throws InterruptedException { + public void sunnyDayVNFCheckInMaintFlagActivity_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFCheckInMaintFlagActivity", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted().hasPassedInOrder("VNFCheckInMaintFlagActivity_Start", "TaskCheckInMaintFlag", @@ -41,7 +41,7 @@ public class VNFCheckInMaintFlagActivityTest extends BaseBPMNTest { } @Test - public void rainyDayVNFCheckInMaintFlagActivity_Test() throws Exception { + public void rainyDayVNFCheckInMaintFlagActivity_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiFlagTasks) .checkVnfInMaintFlag(any(BuildingBlockExecution.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFCheckInMaintFlagActivity", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFCheckPserversLockedFlagActivity.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFCheckPserversLockedFlagActivity.java index c4fc017c36..aa9d85ece3 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFCheckPserversLockedFlagActivity.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFCheckPserversLockedFlagActivity.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class VNFCheckPserversLockedFlagActivity extends BaseBPMNTest { @Test - public void sunnyDayVNFCheckInMaintFlagActivity_Test() throws InterruptedException { + public void sunnyDayVNFCheckInMaintFlagActivity_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFCheckPserversLockedFlagActivity", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted().hasPassedInOrder("VNFCheckPserversLockedFlagActivity_Start", @@ -40,7 +40,7 @@ public class VNFCheckPserversLockedFlagActivity extends BaseBPMNTest { } @Test - public void rainyDayVNFCheckPserversLockedFlagActivity_Test() throws Exception { + public void rainyDayVNFCheckPserversLockedFlagActivity_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiFlagTasks) .checkVnfPserversLockedFlag(any(BuildingBlockExecution.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFCheckPserversLockedFlagActivity", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFConfigModifyActivityTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFConfigModifyActivityTest.java index 45511087fd..6f2bb9d571 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFConfigModifyActivityTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFConfigModifyActivityTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class VNFConfigModifyActivityTest extends BaseBPMNTest { @Test - public void sunnyDayVNFConfigModifyActivity_Test() throws InterruptedException { + public void sunnyDayVNFConfigModifyActivity_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFConfigModifyActivity", variables); assertThat(pi).isNotNull(); processExternalTasks(pi, "ConfigModify"); @@ -41,7 +41,7 @@ public class VNFConfigModifyActivityTest extends BaseBPMNTest { } @Test - public void rainyDayVNFConfigModifyActivity_Test() throws Exception { + public void rainyDayVNFConfigModifyActivity_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(appcOrchestratorPreProcessor) .buildAppcTaskRequest(any(BuildingBlockExecution.class), any(String.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFConfigModifyActivity", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFHealthCheckActivityTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFHealthCheckActivityTest.java index a9a6d50a2b..bd2ef6eeb3 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFHealthCheckActivityTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFHealthCheckActivityTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class VNFHealthCheckActivityTest extends BaseBPMNTest { @Test - public void sunnyDayVNFHealthCheckActivity_Test() throws InterruptedException { + public void sunnyDayVNFHealthCheckActivity_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFHealthCheckActivity", variables); assertThat(pi).isNotNull(); processExternalTasks(pi, "TaskHealthCheck"); @@ -41,7 +41,7 @@ public class VNFHealthCheckActivityTest extends BaseBPMNTest { } @Test - public void rainyDayVNFHealthCheckActivity_Test() throws Exception { + public void rainyDayVNFHealthCheckActivity_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(appcOrchestratorPreProcessor) .buildAppcTaskRequest(any(BuildingBlockExecution.class), any(String.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFHealthCheckActivity", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFLockActivityTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFLockActivityTest.java index 4167a5203e..c548a49286 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFLockActivityTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFLockActivityTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class VNFLockActivityTest extends BaseBPMNTest { @Test - public void sunnyDayVNFLockActivity_Test() throws InterruptedException { + public void sunnyDayVNFLockActivity_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFLockActivity", variables); assertThat(pi).isNotNull(); processExternalTasks(pi, "TaskLock"); @@ -41,7 +41,7 @@ public class VNFLockActivityTest extends BaseBPMNTest { } @Test - public void rainyDayVNFLockActivity_Test() throws Exception { + public void rainyDayVNFLockActivity_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(appcOrchestratorPreProcessor) .buildAppcTaskRequest(any(BuildingBlockExecution.class), any(String.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFLockActivity", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFQuiesceTrafficActivityTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFQuiesceTrafficActivityTest.java index 36c400b8a0..aaddbd25b8 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFQuiesceTrafficActivityTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFQuiesceTrafficActivityTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class VNFQuiesceTrafficActivityTest extends BaseBPMNTest { @Test - public void sunnyDayVNFQuiesceTrafficActivity_Test() throws InterruptedException { + public void sunnyDayVNFQuiesceTrafficActivity_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFQuiesceTrafficActivity", variables); assertThat(pi).isNotNull(); processExternalTasks(pi, "TaskQuiesceTraffic"); @@ -41,7 +41,7 @@ public class VNFQuiesceTrafficActivityTest extends BaseBPMNTest { } @Test - public void rainyDayVNFQuiesceTrafficActivity_Test() throws Exception { + public void rainyDayVNFQuiesceTrafficActivity_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(appcOrchestratorPreProcessor) .buildAppcTaskRequest(any(BuildingBlockExecution.class), any(String.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFQuiesceTrafficActivity", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFResumeTrafficActivityTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFResumeTrafficActivityTest.java index ad04137e5a..a3547ccdc6 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFResumeTrafficActivityTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFResumeTrafficActivityTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class VNFResumeTrafficActivityTest extends BaseBPMNTest { @Test - public void sunnyDayVNFResumeTrafficActivity_Test() throws InterruptedException { + public void sunnyDayVNFResumeTrafficActivity_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFResumeTrafficActivity", variables); assertThat(pi).isNotNull(); processExternalTasks(pi, "TaskResumeTraffic"); @@ -41,7 +41,7 @@ public class VNFResumeTrafficActivityTest extends BaseBPMNTest { } @Test - public void rainyDayVNFResumeTrafficActivity_Test() throws Exception { + public void rainyDayVNFResumeTrafficActivity_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(appcOrchestratorPreProcessor) .buildAppcTaskRequest(any(BuildingBlockExecution.class), any(String.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFResumeTrafficActivity", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFSetClosedLoopDisabledFlagActivityTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFSetClosedLoopDisabledFlagActivityTest.java index 513afd35e5..7c2e6106f3 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFSetClosedLoopDisabledFlagActivityTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFSetClosedLoopDisabledFlagActivityTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class VNFSetClosedLoopDisabledFlagActivityTest extends BaseBPMNTest { @Test - public void sunnyDayVNFSetClosedLoopDisabledFlagActivity_Test() throws InterruptedException { + public void sunnyDayVNFSetClosedLoopDisabledFlagActivity_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFSetClosedLoopDisabledFlagActivity", variables); assertThat(pi).isNotNull(); @@ -41,7 +41,7 @@ public class VNFSetClosedLoopDisabledFlagActivityTest extends BaseBPMNTest { } @Test - public void rainyDayVNFSetClosedLoopDisabledFlagActivity_Test() throws Exception { + public void rainyDayVNFSetClosedLoopDisabledFlagActivity_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiFlagTasks) .modifyVnfClosedLoopDisabledFlag(any(BuildingBlockExecution.class), any(boolean.class)); ProcessInstance pi = diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFSetInMaintFlagActivityTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFSetInMaintFlagActivityTest.java index 1df0ea2e65..c7a14f6d52 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFSetInMaintFlagActivityTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFSetInMaintFlagActivityTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class VNFSetInMaintFlagActivityTest extends BaseBPMNTest { @Test - public void sunnyDayVNFSetInMaintFlagActivity_Test() throws InterruptedException { + public void sunnyDayVNFSetInMaintFlagActivity_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFSetInMaintFlagActivity", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted().hasPassedInOrder("VNFSetInMaintFlagActivity_Start", "TaskSetInMaint", @@ -40,7 +40,7 @@ public class VNFSetInMaintFlagActivityTest extends BaseBPMNTest { } @Test - public void rainyDayVNFSetInMaintFlagActivity_Test() throws Exception { + public void rainyDayVNFSetInMaintFlagActivity_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiFlagTasks) .modifyVnfInMaintFlag(any(BuildingBlockExecution.class), any(boolean.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFSetInMaintFlagActivity", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFSnapShotActivityTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFSnapShotActivityTest.java index b883f1cb28..a755042eb5 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFSnapShotActivityTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFSnapShotActivityTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class VNFSnapShotActivityTest extends BaseBPMNTest { @Test - public void sunnyDayVNFSnapShotActivity_Test() throws InterruptedException { + public void sunnyDayVNFSnapShotActivity_Test() { variables.put("vmIdListSize", 0); variables.put("vmIdList", null); ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFSnapShotActivity", variables); @@ -43,7 +43,7 @@ public class VNFSnapShotActivityTest extends BaseBPMNTest { } @Test - public void rainyDayVNFSnapShotActivity_Test() throws Exception { + public void rainyDayVNFSnapShotActivity_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(appcOrchestratorPreProcessor) .buildAppcTaskRequest(any(BuildingBlockExecution.class), any(String.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFSnapShotActivity", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFStartActivityTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFStartActivityTest.java index 7de8e5b45f..ed63f7ee6d 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFStartActivityTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFStartActivityTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class VNFStartActivityTest extends BaseBPMNTest { @Test - public void sunnyDayVNFStartActivity_Test() throws InterruptedException { + public void sunnyDayVNFStartActivity_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFStartActivity", variables); assertThat(pi).isNotNull(); processExternalTasks(pi, "TaskStart"); @@ -41,7 +41,7 @@ public class VNFStartActivityTest extends BaseBPMNTest { } @Test - public void rainyDayVNFStartActivity_Test() throws Exception { + public void rainyDayVNFStartActivity_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(appcOrchestratorPreProcessor) .buildAppcTaskRequest(any(BuildingBlockExecution.class), any(String.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFStartActivity", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFStopActivityTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFStopActivityTest.java index 0720814317..ed5d60c0a0 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFStopActivityTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFStopActivityTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class VNFStopActivityTest extends BaseBPMNTest { @Test - public void sunnyDayVNFStopActivity_Test() throws InterruptedException { + public void sunnyDayVNFStopActivity_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFStopActivity", variables); assertThat(pi).isNotNull(); processExternalTasks(pi, "TaskStop"); @@ -41,7 +41,7 @@ public class VNFStopActivityTest extends BaseBPMNTest { } @Test - public void rainyDayVNFStopActivity_Test() throws Exception { + public void rainyDayVNFStopActivity_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(appcOrchestratorPreProcessor) .buildAppcTaskRequest(any(BuildingBlockExecution.class), any(String.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFStopActivity", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUnlockActivityTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUnlockActivityTest.java index b873d02da7..34ccb125c1 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUnlockActivityTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUnlockActivityTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class VNFUnlockActivityTest extends BaseBPMNTest { @Test - public void sunnyDayVNFUnlockActivity_Test() throws InterruptedException { + public void sunnyDayVNFUnlockActivity_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFUnlockActivity", variables); assertThat(pi).isNotNull(); processExternalTasks(pi, "TaskUnlock"); @@ -41,7 +41,7 @@ public class VNFUnlockActivityTest extends BaseBPMNTest { } @Test - public void rainyDayVNFUnlockActivity_Test() throws Exception { + public void rainyDayVNFUnlockActivity_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(appcOrchestratorPreProcessor) .buildAppcTaskRequest(any(BuildingBlockExecution.class), any(String.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFUnlockActivity", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUnsetClosedLoopDisabledFlagActivityTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUnsetClosedLoopDisabledFlagActivityTest.java index 6657cd8ce5..f54e762c25 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUnsetClosedLoopDisabledFlagActivityTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUnsetClosedLoopDisabledFlagActivityTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class VNFUnsetClosedLoopDisabledFlagActivityTest extends BaseBPMNTest { @Test - public void sunnyDayVNFUnsetClosedLoopDisabledFlagActivity_Test() throws InterruptedException { + public void sunnyDayVNFUnsetClosedLoopDisabledFlagActivity_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFUnsetClosedLoopDisabledFlagActivity", variables); assertThat(pi).isNotNull(); @@ -41,7 +41,7 @@ public class VNFUnsetClosedLoopDisabledFlagActivityTest extends BaseBPMNTest { } @Test - public void rainyDayVNFUnsetClosedLoopFlag_Test() throws Exception { + public void rainyDayVNFUnsetClosedLoopFlag_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiFlagTasks) .modifyVnfClosedLoopDisabledFlag(any(BuildingBlockExecution.class), any(boolean.class)); ProcessInstance pi = diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUnsetInMaintFlagActivityTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUnsetInMaintFlagActivityTest.java index 15623bab3d..9b3419cfa3 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUnsetInMaintFlagActivityTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUnsetInMaintFlagActivityTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class VNFUnsetInMaintFlagActivityTest extends BaseBPMNTest { @Test - public void sunnyDayVNFUnsetInMaintFlagActivity_Test() throws InterruptedException { + public void sunnyDayVNFUnsetInMaintFlagActivity_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFUnsetInMaintFlagActivity", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted().hasPassedInOrder("VNFUnsetInMaintFlagActivity_Start", "TaskUnsetInMaint", @@ -40,7 +40,7 @@ public class VNFUnsetInMaintFlagActivityTest extends BaseBPMNTest { } @Test - public void rainyDayVNFUnsetInMaintFlag_Test() throws Exception { + public void rainyDayVNFUnsetInMaintFlag_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiFlagTasks) .modifyVnfInMaintFlag(any(BuildingBlockExecution.class), any(boolean.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFUnsetInMaintFlagActivity", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUpgradeBackupActivityTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUpgradeBackupActivityTest.java index b73794f097..60b9b07009 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUpgradeBackupActivityTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUpgradeBackupActivityTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class VNFUpgradeBackupActivityTest extends BaseBPMNTest { @Test - public void sunnyDayVNFUpgradeBackupActivity_Test() throws InterruptedException { + public void sunnyDayVNFUpgradeBackupActivity_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFUpgradeBackupActivity", variables); assertThat(pi).isNotNull(); processExternalTasks(pi, "TaskUpgradeBackup"); @@ -41,7 +41,7 @@ public class VNFUpgradeBackupActivityTest extends BaseBPMNTest { } @Test - public void rainyDayVNFUpgradeBackupActivity_Test() throws Exception { + public void rainyDayVNFUpgradeBackupActivity_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(appcOrchestratorPreProcessor) .buildAppcTaskRequest(any(BuildingBlockExecution.class), any(String.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFUpgradeBackupActivity", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUpgradePostCheckActivityTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUpgradePostCheckActivityTest.java index be5f04382c..46a835c4fb 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUpgradePostCheckActivityTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUpgradePostCheckActivityTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class VNFUpgradePostCheckActivityTest extends BaseBPMNTest { @Test - public void sunnyDayVNFUpgradePostCheckActivity_Test() throws InterruptedException { + public void sunnyDayVNFUpgradePostCheckActivity_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFUpgradePostCheckActivity", variables); processExternalTasks(pi, "TaskUpgradePostCheck"); assertThat(pi).isNotNull().isStarted().hasPassedInOrder("VNFUpgradePostCheckActivity_Start", @@ -40,7 +40,7 @@ public class VNFUpgradePostCheckActivityTest extends BaseBPMNTest { } @Test - public void rainyDayVNFUpgradePostCheckActivity_Test() throws Exception { + public void rainyDayVNFUpgradePostCheckActivity_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(appcOrchestratorPreProcessor) .buildAppcTaskRequest(any(BuildingBlockExecution.class), any(String.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFUpgradePostCheckActivity", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUpgradePreCheckActivityTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUpgradePreCheckActivityTest.java index 2471a59934..b02b1994b2 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUpgradePreCheckActivityTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUpgradePreCheckActivityTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class VNFUpgradePreCheckActivityTest extends BaseBPMNTest { @Test - public void sunnyDayVNFUpgradePreCheckActivity_Test() throws InterruptedException { + public void sunnyDayVNFUpgradePreCheckActivity_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFUpgradePreCheckActivity", variables); assertThat(pi).isNotNull(); processExternalTasks(pi, "TaskUpgradePreCheck"); @@ -41,7 +41,7 @@ public class VNFUpgradePreCheckActivityTest extends BaseBPMNTest { } @Test - public void rainyDayVNFUpgradePreCheckActivity_Test() throws Exception { + public void rainyDayVNFUpgradePreCheckActivity_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(appcOrchestratorPreProcessor) .buildAppcTaskRequest(any(BuildingBlockExecution.class), any(String.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFUpgradePreCheckActivity", variables); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUpgradeSoftwareActivityTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUpgradeSoftwareActivityTest.java index 909b61001b..1a8265f6fd 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUpgradeSoftwareActivityTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUpgradeSoftwareActivityTest.java @@ -31,7 +31,7 @@ import org.onap.so.bpmn.BaseBPMNTest; public class VNFUpgradeSoftwareActivityTest extends BaseBPMNTest { @Test - public void sunnyDayVNFUpgradeSoftwareActivity_Test() throws InterruptedException { + public void sunnyDayVNFUpgradeSoftwareActivity_Test() { ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFUpgradeSoftwareActivity", variables); assertThat(pi).isNotNull(); processExternalTasks(pi, "TaskUpgradeSoftware"); @@ -41,7 +41,7 @@ public class VNFUpgradeSoftwareActivityTest extends BaseBPMNTest { } @Test - public void rainyDayVNFUpgradeSoftwareActivity_Test() throws Exception { + public void rainyDayVNFUpgradeSoftwareActivity_Test() { doThrow(new BpmnError("7000", "TESTING ERRORS")).when(appcOrchestratorPreProcessor) .buildAppcTaskRequest(any(BuildingBlockExecution.class), any(String.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFUpgradeSoftwareActivity", variables); diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/kafka/PnfEventReadyKafkaClient.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/kafka/PnfEventReadyKafkaClient.java index 0d3e0e0230..fceabf5e38 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/kafka/PnfEventReadyKafkaClient.java +++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/kafka/PnfEventReadyKafkaClient.java @@ -114,24 +114,18 @@ public class PnfEventReadyKafkaClient implements KafkaClient { class KafkaTopicListenerThread implements Runnable { @Override public void run() { - try { - List response; - System.out.println(pnfUpdateTopic + " " + consumerGroup); - response = consumerForPnfUpdate.get(pnfUpdateTopic, consumerGroup, consumerIdUpdate); - if (response.isEmpty()) { - response = consumerForPnfReady.get(pnfReadyTopic, consumerGroup, consumerId); - getPnfCorrelationIdListFromResponse(response) - .forEach(this::informAboutPnfReadyIfPnfCorrelationIdFound); - } else { - getPnfCorrelationIdListFromResponse(response) - .forEach(this::informAboutPnfReadyIfPnfCorrelationIdFound); - } - } catch (IOException e) { - logger.error("Exception caught during sending rest request to kafka for listening event topic", e); + List response; + System.out.println(pnfUpdateTopic + " " + consumerGroup); + response = consumerForPnfUpdate.get(pnfUpdateTopic, consumerGroup, consumerIdUpdate); + if (response.isEmpty()) { + response = consumerForPnfReady.get(pnfReadyTopic, consumerGroup, consumerId); + getPnfCorrelationIdListFromResponse(response).forEach(this::informAboutPnfReadyIfPnfCorrelationIdFound); + } else { + getPnfCorrelationIdListFromResponse(response).forEach(this::informAboutPnfReadyIfPnfCorrelationIdFound); } } - private List getPnfCorrelationIdListFromResponse(List response) throws IOException { + private List getPnfCorrelationIdListFromResponse(List response) { if (response != null) { return JsonUtilForPnfCorrelationId.parseJsonToGelAllPnfCorrelationId(response); } @@ -147,4 +141,3 @@ public class PnfEventReadyKafkaClient implements KafkaClient { } } } - diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/aai/AAIServiceInstanceTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/aai/AAIServiceInstanceTest.java index 90576c9566..284864fd27 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/aai/AAIServiceInstanceTest.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/aai/AAIServiceInstanceTest.java @@ -33,82 +33,82 @@ public class AAIServiceInstanceTest { .setWorkloadContext("workloadContext").createAAIServiceInstance(); @Test - public void getServiceInstanceNameTest() throws Exception { + public void getServiceInstanceNameTest() { test.getServiceInstanceName(); } @Test - public void setServiceInstanceNameTest() throws Exception { + public void setServiceInstanceNameTest() { test.setServiceInstanceName("serviceInstanceName"); } @Test - public void getServiceTypeTest() throws Exception { + public void getServiceTypeTest() { test.getServiceType(); } @Test - public void setServiceTypeTest() throws Exception { + public void setServiceTypeTest() { test.setServiceType("serviceType"); } @Test - public void getServiceRoleTest() throws Exception { + public void getServiceRoleTest() { test.getServiceRole(); } @Test - public void setServiceRoleTest() throws Exception { + public void setServiceRoleTest() { test.setServiceRole("serviceRole"); } @Test - public void getOrchestrationStatusTest() throws Exception { + public void getOrchestrationStatusTest() { test.getOrchestrationStatus(); } @Test - public void setOrchestrationStatusTest() throws Exception { + public void setOrchestrationStatusTest() { test.setOrchestrationStatus("status"); } @Test - public void getModelInvariantUuidTest() throws Exception { + public void getModelInvariantUuidTest() { test.getModelInvariantUuid(); } @Test - public void setModelInvariantUuidTest() throws Exception { + public void setModelInvariantUuidTest() { test.setModelInvariantUuid("uuid"); } @Test - public void getModelVersionIdTest() throws Exception { + public void getModelVersionIdTest() { test.getModelVersionId(); } @Test - public void setModelVersionIdTest() throws Exception { + public void setModelVersionIdTest() { test.setModelVersionId("versionId"); } @Test - public void getEnvironmentContextTest() throws Exception { + public void getEnvironmentContextTest() { test.getEnvironmentContext(); } @Test - public void setEnvironmentContextTest() throws Exception { + public void setEnvironmentContextTest() { test.setEnvironmentContext("context"); } @Test - public void getWorkloadContextTest() throws Exception { + public void getWorkloadContextTest() { test.getWorkloadContext(); } @Test - public void setWorkloadContextTest() throws Exception { + public void setWorkloadContextTest() { test.setWorkloadContext("context"); } diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/common/name/generation/AAIObjectInstanceNameGeneratorTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/common/name/generation/AAIObjectInstanceNameGeneratorTest.java index fd5383268f..340d899696 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/common/name/generation/AAIObjectInstanceNameGeneratorTest.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/common/name/generation/AAIObjectInstanceNameGeneratorTest.java @@ -35,7 +35,7 @@ public class AAIObjectInstanceNameGeneratorTest { public void before() {} @Test - public void generateInstanceGroupNameTest() throws Exception { + public void generateInstanceGroupNameTest() { ModelInfoInstanceGroup modelVnfc = new ModelInfoInstanceGroup(); modelVnfc.setFunction("vre"); diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForPnfCorrelationIdDelegateTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForPnfCorrelationIdDelegateTest.java index 4206d796f6..b99e6067d4 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForPnfCorrelationIdDelegateTest.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForPnfCorrelationIdDelegateTest.java @@ -56,7 +56,7 @@ public class CheckAaiForPnfCorrelationIdDelegateTest { } @Test - public void shouldThrowExceptionWhenPnfCorrelationIdIsNotSet() throws Exception { + public void shouldThrowExceptionWhenPnfCorrelationIdIsNotSet() { // given DelegateExecution execution = mock(DelegateExecution.class); when(execution.getVariable(PNF_CORRELATION_ID)).thenReturn(null); @@ -68,7 +68,7 @@ public class CheckAaiForPnfCorrelationIdDelegateTest { } @Test - public void shouldSetCorrectVariablesWhenAaiDoesNotContainInfoAboutPnf() throws Exception { + public void shouldSetCorrectVariablesWhenAaiDoesNotContainInfoAboutPnf() { // given DelegateExecution execution = mock(DelegateExecution.class); when(execution.getVariable(PNF_CORRELATION_ID)).thenReturn(ID_WITHOUT_ENTRY); @@ -79,7 +79,7 @@ public class CheckAaiForPnfCorrelationIdDelegateTest { } @Test - public void shouldSetCorrectVariablesWhenAaiContainsInfoAboutPnfWithoutIp() throws Exception { + public void shouldSetCorrectVariablesWhenAaiContainsInfoAboutPnfWithoutIp() { // given DelegateExecution execution = mock(DelegateExecution.class); when(execution.getVariable(PNF_CORRELATION_ID)).thenReturn(ID_WITH_ENTRY); @@ -104,7 +104,7 @@ public class CheckAaiForPnfCorrelationIdDelegateTest { } @Test - public void shouldThrowExceptionWhenIoExceptionOnConnectionToAai() throws Exception { + public void shouldThrowExceptionWhenIoExceptionOnConnectionToAai() { // given DelegateExecution execution = mock(DelegateExecution.class); when(execution.getVariable(PNF_CORRELATION_ID)).thenReturn(ID_WITH_ENTRY); diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/kafka/PnfEventReadyKafkaClientTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/kafka/PnfEventReadyKafkaClientTest.java index c870762cdf..a3f21547d4 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/kafka/PnfEventReadyKafkaClientTest.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/kafka/PnfEventReadyKafkaClientTest.java @@ -101,7 +101,7 @@ public class PnfEventReadyKafkaClientTest { * and shutdown the executor because of empty map */ @Test - public void pnfCorrelationIdIsFoundInHttpResponse_notifyAboutPnfUpdate() throws IOException { + public void pnfCorrelationIdIsFoundInHttpResponse_notifyAboutPnfUpdate() { when(kafkaConsumerMock.get(any(String.class), any(String.class), any(String.class))) .thenReturn(Arrays.asList(String.format(JSON_EXAMPLE_WITH_PNF_CORRELATION_ID[0], PNF_CORRELATION_ID), JSON_EXAMPLE_WITH_PNF_CORRELATION_ID[1])); @@ -113,7 +113,7 @@ public class PnfEventReadyKafkaClientTest { @Test - public void pnfCorrelationIdIsFoundInHttpResponse_notifyAboutPnfReady() throws IOException { + public void pnfCorrelationIdIsFoundInHttpResponse_notifyAboutPnfReady() { when(kafkaConsumerMock.get(any(String.class), any(String.class), any(String.class))) .thenReturn(Collections.emptyList()) .thenReturn(Arrays.asList(String.format(JSON_EXAMPLE_WITH_PNF_CORRELATION_ID[0], PNF_CORRELATION_ID), @@ -135,7 +135,7 @@ public class PnfEventReadyKafkaClientTest { * response. run method should not do anything with the map not run any thread to notify camunda process */ @Test - public void pnfCorrelationIdIsFoundInHttpResponse_NotFoundInMap() throws IOException { + public void pnfCorrelationIdIsFoundInHttpResponse_NotFoundInMap() { when(kafkaConsumerMock.get(any(String.class), any(String.class), any(String.class))).thenReturn(Arrays.asList( String.format(JSON_EXAMPLE_WITH_PNF_CORRELATION_ID[0], PNF_CORRELATION_ID_NOT_FOUND_IN_MAP), JSON_EXAMPLE_WITH_PNF_CORRELATION_ID[1])); @@ -152,7 +152,7 @@ public class PnfEventReadyKafkaClientTest { * method should not do anything with the map and not run any thread to notify camunda process */ @Test - public void pnfCorrelationIdIsNotFoundInHttpResponse() throws IOException { + public void pnfCorrelationIdIsNotFoundInHttpResponse() { when(kafkaConsumerMock.get(any(String.class), any(String.class), any(String.class))) .thenReturn(Arrays.asList(JSON_EXAMPLE_WITH_NO_PNF_CORRELATION_ID)); testedObjectInnerClassThread.run(); diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/client/HeaderUtilTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/client/HeaderUtilTest.java index f523e7ab1d..d0fde0d427 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/client/HeaderUtilTest.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/client/HeaderUtilTest.java @@ -25,7 +25,7 @@ import org.junit.Test; public class HeaderUtilTest { @Test - public void getAuthorizationTest() throws Exception { + public void getAuthorizationTest() { String authorization = HeaderUtil.getAuthorization(HeaderUtil.USER, HeaderUtil.PASS); assertEquals("Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==", authorization); } diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilderTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilderTest.java index 6f884cb126..3fd6c3abe9 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilderTest.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilderTest.java @@ -355,13 +355,13 @@ public class AbstractBuilderTest { } @Test - public void getRequestActionBlankOperationTypeTest() throws Exception { + public void getRequestActionBlankOperationTypeTest() { assertEquals(AbstractBuilder.RequestAction.CREATE_NETWORK_INSTANCE.getName(), abstractBuilder.getRequestAction(delegateExecution)); } @Test - public void getRequestActionDeleteOperationTypeBlankResourceTypeTest() throws Exception { + public void getRequestActionDeleteOperationTypeBlankResourceTypeTest() { delegateExecution.setVariable(AbstractBuilder.OPERATION_TYPE, RequestsDbConstant.OperationType.DELETE); delegateExecution.setVariable(AbstractBuilder.RESOURCE_TYPE, ""); assertEquals(AbstractBuilder.RequestAction.DELETE_SERVICE_INSTANCE.getName(), @@ -369,7 +369,7 @@ public class AbstractBuilderTest { } @Test - public void getRequestActionDeleteOperationTypeBadResourceTypeTest() throws Exception { + public void getRequestActionDeleteOperationTypeBadResourceTypeTest() { delegateExecution.setVariable(AbstractBuilder.OPERATION_TYPE, RequestsDbConstant.OperationType.DELETE); delegateExecution.setVariable(AbstractBuilder.RESOURCE_TYPE, "bad"); assertEquals(AbstractBuilder.RequestAction.DELETE_SERVICE_INSTANCE.getName(), @@ -377,7 +377,7 @@ public class AbstractBuilderTest { } @Test - public void getRequestActionDeleteOperationTypeOverlayResourceTypeTest() throws Exception { + public void getRequestActionDeleteOperationTypeOverlayResourceTypeTest() { delegateExecution.setVariable(AbstractBuilder.OPERATION_TYPE, RequestsDbConstant.OperationType.DELETE); delegateExecution.setVariable(AbstractBuilder.RESOURCE_TYPE, "overlay"); assertEquals(AbstractBuilder.RequestAction.DEACTIVATE_DCI_NETWORK_INSTANCE.getName(), @@ -385,7 +385,7 @@ public class AbstractBuilderTest { } @Test - public void getRequestActionDeleteOperationTypeUnderlayResourceTypeTest() throws Exception { + public void getRequestActionDeleteOperationTypeUnderlayResourceTypeTest() { delegateExecution.setVariable(AbstractBuilder.OPERATION_TYPE, RequestsDbConstant.OperationType.DELETE); delegateExecution.setVariable(AbstractBuilder.RESOURCE_TYPE, "underlay"); assertEquals(AbstractBuilder.RequestAction.DELETE_NETWORK_INSTANCE.getName(), @@ -393,14 +393,14 @@ public class AbstractBuilderTest { } @Test - public void getRequestActionDeleteOperationTypeTest() throws Exception { + public void getRequestActionDeleteOperationTypeTest() { delegateExecution.setVariable(AbstractBuilder.OPERATION_TYPE, RequestsDbConstant.OperationType.DELETE); assertEquals(AbstractBuilder.RequestAction.DELETE_SERVICE_INSTANCE.getName(), abstractBuilder.getRequestAction(delegateExecution)); } @Test - public void getRequestActionCreateOperationTypeBlankResourceTypeTest() throws Exception { + public void getRequestActionCreateOperationTypeBlankResourceTypeTest() { delegateExecution.setVariable(AbstractBuilder.OPERATION_TYPE, RequestsDbConstant.OperationType.CREATE); delegateExecution.setVariable(AbstractBuilder.RESOURCE_TYPE, ""); assertEquals(AbstractBuilder.RequestAction.CREATE_SERVICE_INSTANCE.getName(), @@ -408,7 +408,7 @@ public class AbstractBuilderTest { } @Test - public void getRequestActionCreateOperationTypeBadResourceTypeTest() throws Exception { + public void getRequestActionCreateOperationTypeBadResourceTypeTest() { delegateExecution.setVariable(AbstractBuilder.OPERATION_TYPE, RequestsDbConstant.OperationType.CREATE); delegateExecution.setVariable(AbstractBuilder.RESOURCE_TYPE, "bad"); assertEquals(AbstractBuilder.RequestAction.CREATE_SERVICE_INSTANCE.getName(), @@ -416,7 +416,7 @@ public class AbstractBuilderTest { } @Test - public void getRequestActionCreateOperationTypeOverlayResourceTypeTest() throws Exception { + public void getRequestActionCreateOperationTypeOverlayResourceTypeTest() { delegateExecution.setVariable(AbstractBuilder.OPERATION_TYPE, RequestsDbConstant.OperationType.CREATE); delegateExecution.setVariable(AbstractBuilder.RESOURCE_TYPE, "overlay"); assertEquals(AbstractBuilder.RequestAction.ACTIVATE_DCI_NETWORK_INSTANCE.getName(), @@ -424,7 +424,7 @@ public class AbstractBuilderTest { } @Test - public void getRequestActionCreateOperationTypeUnderlayResourceTypeTest() throws Exception { + public void getRequestActionCreateOperationTypeUnderlayResourceTypeTest() { delegateExecution.setVariable(AbstractBuilder.OPERATION_TYPE, RequestsDbConstant.OperationType.CREATE); delegateExecution.setVariable(AbstractBuilder.RESOURCE_TYPE, "underlay"); assertEquals(AbstractBuilder.RequestAction.CREATE_NETWORK_INSTANCE.getName(), @@ -432,7 +432,7 @@ public class AbstractBuilderTest { } @Test - public void getRequestActionCreateOperationTypeTest() throws Exception { + public void getRequestActionCreateOperationTypeTest() { delegateExecution.setVariable(AbstractBuilder.OPERATION_TYPE, RequestsDbConstant.OperationType.CREATE); assertEquals(AbstractBuilder.RequestAction.CREATE_SERVICE_INSTANCE.getName(), abstractBuilder.getRequestAction(delegateExecution)); @@ -446,74 +446,74 @@ public class AbstractBuilderTest { } @Test - public void getSvcActionBlankOperationTypeTest() throws Exception { + public void getSvcActionBlankOperationTypeTest() { assertEquals(AbstractBuilder.SvcAction.CREATE.getName(), abstractBuilder.getSvcAction(delegateExecution)); } @Test - public void getSvcActionDeleteOperationTypeBlankResourceTypeTest() throws Exception { + public void getSvcActionDeleteOperationTypeBlankResourceTypeTest() { delegateExecution.setVariable(AbstractBuilder.OPERATION_TYPE, RequestsDbConstant.OperationType.DELETE); delegateExecution.setVariable(AbstractBuilder.RESOURCE_TYPE, ""); assertEquals(AbstractBuilder.SvcAction.UNASSIGN.getName(), abstractBuilder.getSvcAction(delegateExecution)); } @Test - public void getSvcActionDeleteOperationTypeBadResourceTypeTest() throws Exception { + public void getSvcActionDeleteOperationTypeBadResourceTypeTest() { delegateExecution.setVariable(AbstractBuilder.OPERATION_TYPE, RequestsDbConstant.OperationType.DELETE); delegateExecution.setVariable(AbstractBuilder.RESOURCE_TYPE, "bad"); assertEquals(AbstractBuilder.SvcAction.UNASSIGN.getName(), abstractBuilder.getSvcAction(delegateExecution)); } @Test - public void getSvcActionDeleteOperationTypeOverlayResourceTypeTest() throws Exception { + public void getSvcActionDeleteOperationTypeOverlayResourceTypeTest() { delegateExecution.setVariable(AbstractBuilder.OPERATION_TYPE, RequestsDbConstant.OperationType.DELETE); delegateExecution.setVariable(AbstractBuilder.RESOURCE_TYPE, "overlay"); assertEquals(AbstractBuilder.SvcAction.DEACTIVATE.getName(), abstractBuilder.getSvcAction(delegateExecution)); } @Test - public void getSvcActionDeleteOperationTypeUnderlayResourceTypeTest() throws Exception { + public void getSvcActionDeleteOperationTypeUnderlayResourceTypeTest() { delegateExecution.setVariable(AbstractBuilder.OPERATION_TYPE, RequestsDbConstant.OperationType.DELETE); delegateExecution.setVariable(AbstractBuilder.RESOURCE_TYPE, "underlay"); assertEquals(AbstractBuilder.SvcAction.DELETE.getName(), abstractBuilder.getSvcAction(delegateExecution)); } @Test - public void getSvcActionDeleteOperationTypeTest() throws Exception { + public void getSvcActionDeleteOperationTypeTest() { delegateExecution.setVariable(AbstractBuilder.OPERATION_TYPE, RequestsDbConstant.OperationType.DELETE); assertEquals(AbstractBuilder.SvcAction.UNASSIGN.getName(), abstractBuilder.getSvcAction(delegateExecution)); } @Test - public void getSvcActionCreateOperationTypeBlankResourceTypeTest() throws Exception { + public void getSvcActionCreateOperationTypeBlankResourceTypeTest() { delegateExecution.setVariable(AbstractBuilder.OPERATION_TYPE, RequestsDbConstant.OperationType.CREATE); delegateExecution.setVariable(AbstractBuilder.RESOURCE_TYPE, ""); assertEquals(AbstractBuilder.SvcAction.ASSIGN.getName(), abstractBuilder.getSvcAction(delegateExecution)); } @Test - public void getSvcActionCreateOperationTypeBadResourceTypeTest() throws Exception { + public void getSvcActionCreateOperationTypeBadResourceTypeTest() { delegateExecution.setVariable(AbstractBuilder.OPERATION_TYPE, RequestsDbConstant.OperationType.CREATE); delegateExecution.setVariable(AbstractBuilder.RESOURCE_TYPE, "bad"); assertEquals(AbstractBuilder.SvcAction.ASSIGN.getName(), abstractBuilder.getSvcAction(delegateExecution)); } @Test - public void getSvcActionCreateOperationTypeOverlayResourceTypeTest() throws Exception { + public void getSvcActionCreateOperationTypeOverlayResourceTypeTest() { delegateExecution.setVariable(AbstractBuilder.OPERATION_TYPE, RequestsDbConstant.OperationType.CREATE); delegateExecution.setVariable(AbstractBuilder.RESOURCE_TYPE, "overlay"); assertEquals(AbstractBuilder.SvcAction.ACTIVATE.getName(), abstractBuilder.getSvcAction(delegateExecution)); } @Test - public void getSvcActionCreateOperationTypeUnderlayResourceTypeTest() throws Exception { + public void getSvcActionCreateOperationTypeUnderlayResourceTypeTest() { delegateExecution.setVariable(AbstractBuilder.OPERATION_TYPE, RequestsDbConstant.OperationType.CREATE); delegateExecution.setVariable(AbstractBuilder.RESOURCE_TYPE, "underlay"); assertEquals(AbstractBuilder.SvcAction.CREATE.getName(), abstractBuilder.getSvcAction(delegateExecution)); } @Test - public void getSvcActionCreateOperationTypeTest() throws Exception { + public void getSvcActionCreateOperationTypeTest() { delegateExecution.setVariable(AbstractBuilder.OPERATION_TYPE, RequestsDbConstant.OperationType.CREATE); assertEquals(AbstractBuilder.SvcAction.ASSIGN.getName(), abstractBuilder.getSvcAction(delegateExecution)); } @@ -544,17 +544,17 @@ public class AbstractBuilderTest { } @Test - public void getOnapServiceModelInformationEntityTest() throws Exception { + public void getOnapServiceModelInformationEntityTest() { abstractBuilder.getOnapServiceModelInformationEntity(delegateExecution); } @Test - public void getOnapNetworkModelInformationEntityTest() throws Exception { + public void getOnapNetworkModelInformationEntityTest() { abstractBuilder.getOnapNetworkModelInformationEntity(delegateExecution); } @Test - public void getParamEntitiesTest() throws Exception { + public void getParamEntitiesTest() { Map inputs = new HashMap<>(); inputs.put("foo", "bar"); List list = abstractBuilder.getParamEntities(inputs); @@ -576,17 +576,17 @@ public class AbstractBuilderTest { } @Test - public void getRequestInformationEntityTest() throws Exception { + public void getRequestInformationEntityTest() { abstractBuilder.getRequestInformationEntity(delegateExecution); } @Test - public void getServiceInformationEntityTest() throws Exception { + public void getServiceInformationEntityTest() { abstractBuilder.getServiceInformationEntity(delegateExecution); } @Test - public void getServiceInstanceNameTest() throws Exception { + public void getServiceInstanceNameTest() { abstractBuilder.getServiceInstanceName(delegateExecution); } diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java index f93492bea5..c6c91e42e0 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java +++ b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java @@ -35,7 +35,6 @@ import org.onap.aaiclient.client.aai.AAIVersion; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import java.io.IOException; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -74,7 +73,7 @@ public class CreateVcpeResCustServiceSimplifiedTest extends BaseBPMNTest { private GrpcNettyServer grpcNettyServer; @Before - public void setUp() throws IOException { + public void setUp() { requestObject = FileUtil.readResourceFile("request/" + getClass().getSimpleName() + ".json"); responseObject = FileUtil.readResourceFile("response/" + getClass().getSimpleName() + ".json"); diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/GenericPnfSWUPDownloadTest.java b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/GenericPnfSWUPDownloadTest.java index cd54c49671..5afa094e9a 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/GenericPnfSWUPDownloadTest.java +++ b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/GenericPnfSWUPDownloadTest.java @@ -28,7 +28,6 @@ import static org.assertj.core.api.Assertions.fail; import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import java.io.IOException; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -70,7 +69,7 @@ public class GenericPnfSWUPDownloadTest extends BaseBPMNTest { private GrpcNettyServer grpcNettyServer; @Before - public void setUp() throws IOException { + public void setUp() { actionNames[0] = "preCheck"; actionNames[1] = "downloadNESw"; diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/GenericPnfSoftwareUpgradeTest.java b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/GenericPnfSoftwareUpgradeTest.java index ca4f4a7ae5..804f518571 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/GenericPnfSoftwareUpgradeTest.java +++ b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/GenericPnfSoftwareUpgradeTest.java @@ -35,7 +35,6 @@ import org.onap.aaiclient.client.aai.AAIVersion; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import java.io.IOException; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -71,7 +70,7 @@ public class GenericPnfSoftwareUpgradeTest extends BaseBPMNTest { private GrpcNettyServer grpcNettyServer; @Before - public void setUp() throws IOException { + public void setUp() { actionNames[0] = "preCheck"; actionNames[1] = "downloadNESw"; actionNames[2] = "activateNESw"; diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/ServiceLevelUpgradeTest.java b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/ServiceLevelUpgradeTest.java index 60c7e4e769..974ffd3745 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/ServiceLevelUpgradeTest.java +++ b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/ServiceLevelUpgradeTest.java @@ -29,7 +29,6 @@ import static org.assertj.core.api.Assertions.fail; import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import java.io.IOException; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -74,7 +73,7 @@ public class ServiceLevelUpgradeTest extends BaseBPMNTest { private GrpcNettyServer grpcNettyServer; @Before - public void setUp() throws IOException { + public void setUp() { actionNames[0] = "healthCheck"; actionNames[1] = "healthCheck"; actionNames[2] = "preCheck"; diff --git a/bpmn/so-bpmn-moi/src/main/java/org/onap/so/bpmn/moi/tasks/DeleteRANNssiBBTask.java b/bpmn/so-bpmn-moi/src/main/java/org/onap/so/bpmn/moi/tasks/DeleteRANNssiBBTask.java index f464ed23f3..f25a3aca49 100644 --- a/bpmn/so-bpmn-moi/src/main/java/org/onap/so/bpmn/moi/tasks/DeleteRANNssiBBTask.java +++ b/bpmn/so-bpmn-moi/src/main/java/org/onap/so/bpmn/moi/tasks/DeleteRANNssiBBTask.java @@ -61,8 +61,7 @@ public class DeleteRANNssiBBTask { - private String mapUserParamsToSliceProfile(List> sliceProfilesData) - throws JsonProcessingException { + private String mapUserParamsToSliceProfile(List> sliceProfilesData) { Map mapParam = (Map) sliceProfilesData.get(0).get("nssi"); List list = (ArrayList) mapParam.get("sliceProfileList"); Map idMap = (Map) list.get(0); diff --git a/bpmn/so-bpmn-moi/src/main/java/org/onap/so/bpmn/moi/tasks/ModifyRANNssiBBTask.java b/bpmn/so-bpmn-moi/src/main/java/org/onap/so/bpmn/moi/tasks/ModifyRANNssiBBTask.java index fd57ae3b3c..81cb5467ce 100644 --- a/bpmn/so-bpmn-moi/src/main/java/org/onap/so/bpmn/moi/tasks/ModifyRANNssiBBTask.java +++ b/bpmn/so-bpmn-moi/src/main/java/org/onap/so/bpmn/moi/tasks/ModifyRANNssiBBTask.java @@ -102,8 +102,7 @@ public class ModifyRANNssiBBTask { return sliceProfileServiceInstanceObj; } - SliceProfile mapUserParamsToSliceProfile(List> sliceProfilesData) - throws JsonProcessingException { + SliceProfile mapUserParamsToSliceProfile(List> sliceProfilesData) { SliceProfile sliceProfile = new SliceProfile(); Map mapParam = (Map) sliceProfilesData.get(0).get("nssi"); LOGGER.info(">>> mapParam in map: {}", mapParam); @@ -174,8 +173,7 @@ public class ModifyRANNssiBBTask { return sliceProfile; } - private String getSliceProfileIdFromReq(List> sliceProfilesData) - throws JsonProcessingException { + private String getSliceProfileIdFromReq(List> sliceProfilesData) { Map mapParam = (Map) sliceProfilesData.get(0).get("nssi"); List list = (ArrayList) mapParam.get("sliceProfileList"); diff --git a/bpmn/so-bpmn-moi/src/test/java/org/onap/so/bpmn/moi/tasks/EnrichGBBTaskTest.java b/bpmn/so-bpmn-moi/src/test/java/org/onap/so/bpmn/moi/tasks/EnrichGBBTaskTest.java index 569b58d3ef..eb8e655407 100644 --- a/bpmn/so-bpmn-moi/src/test/java/org/onap/so/bpmn/moi/tasks/EnrichGBBTaskTest.java +++ b/bpmn/so-bpmn-moi/src/test/java/org/onap/so/bpmn/moi/tasks/EnrichGBBTaskTest.java @@ -30,7 +30,7 @@ public class EnrichGBBTaskTest { DelegateExecution execution; @Before - public void setUp() throws Exception {} + public void setUp() {} @Test public void prepareOofRequest() {} diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkBBUtils.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkBBUtils.java index 4b88f741de..88b73581e9 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkBBUtils.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkBBUtils.java @@ -53,7 +53,7 @@ public class AssignNetworkBBUtils { * @param execution * @return */ - public boolean networkFoundByName(BuildingBlockExecution execution) throws Exception { + public boolean networkFoundByName(BuildingBlockExecution execution) { // TODO - populate logic after iTrack MSO-2143 implemented return false; diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/service/composition/CreateChildServiceBB.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/service/composition/CreateChildServiceBB.java index ad9924530c..0680068eb8 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/service/composition/CreateChildServiceBB.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/service/composition/CreateChildServiceBB.java @@ -95,7 +95,7 @@ public class CreateChildServiceBB { * */ - public void updateRelations(BuildingBlockExecution buildingBlockExecution) throws Exception { + public void updateRelations(BuildingBlockExecution buildingBlockExecution) { Map lookupMap = buildingBlockExecution.getLookupMap(); diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/CnfAdapterClient.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/CnfAdapterClient.java index 82c0e4916e..b42984de13 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/CnfAdapterClient.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/CnfAdapterClient.java @@ -59,7 +59,7 @@ public class CnfAdapterClient { private static final String INSTANCE_CREATE_PATH = "/api/cnf-adapter/v1/instance"; @Retryable(value = {HttpServerErrorException.class}, maxAttempts = 3, backoff = @Backoff(delay = 3000)) - public InstanceResponse createVfModule(InstanceRequest request) throws CnfAdapterClientException { + public InstanceResponse createVfModule(InstanceRequest request) { try { // String uri = env.getRequiredProperty("mso.cnf.adapter.endpoint"); //TODO: This needs to be added as well // for configuration @@ -80,7 +80,7 @@ public class CnfAdapterClient { @Retryable(value = {HttpServerErrorException.class}, maxAttempts = 3, backoff = @Backoff(delay = 3000)) - public void deleteVfModule(String heatStackId) throws CnfAdapterClientException { + public void deleteVfModule(String heatStackId) { try { // String uri = env.getRequiredProperty("mso.cnf.adapter.endpoint"); //TODO: This needs to be added as well // for configuration @@ -98,7 +98,7 @@ public class CnfAdapterClient { } @Retryable(value = {HttpServerErrorException.class}, maxAttempts = 3, backoff = @Backoff(delay = 3000)) - public InstanceResponse healthcheck() throws CnfAdapterClientException { + public InstanceResponse healthcheck() { try { // String uri = env.getRequiredProperty("mso.cnf.adapter.endpoint"); //TODO: This needs to be added as well // for configuration @@ -118,8 +118,7 @@ public class CnfAdapterClient { } @Retryable(value = {HttpServerErrorException.class}, maxAttempts = 3, backoff = @Backoff(delay = 3000)) - public UpgradeInstanceResponse upgradeVfModule(UpgradeInstanceRequest request, String heatStackId) - throws CnfAdapterClientException { + public UpgradeInstanceResponse upgradeVfModule(UpgradeInstanceRequest request, String heatStackId) { try { String uri = "http://so-cnf-adapter:8090"; String endpoint = UriBuilder.fromUri(uri).path(INSTANCE_CREATE_PATH + "/" + heatStackId + "/upgrade") diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java index a7206d569a..2f50ebefcd 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java @@ -118,8 +118,7 @@ public class VnfAdapterObjectMapper { } public Map createVolumeGroupParams(RequestContext requestContext, GenericVnf genericVnf, - VolumeGroup volumeGroup, String sdncVfModuleQueryResponse) - throws JsonParseException, JsonMappingException, IOException { + VolumeGroup volumeGroup, String sdncVfModuleQueryResponse) throws JsonMappingException, IOException { Map volumeGroupParams = new HashMap<>(); final String USER_PARAM_NAME_KEY = "name"; final String USER_PARAM_VALUE_KEY = "value"; diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapperUtils.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapperUtils.java index 269484eadf..92135f05b9 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapperUtils.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapperUtils.java @@ -20,7 +20,6 @@ package org.onap.so.client.adapter.vnf.mapper; -import java.io.UnsupportedEncodingException; import java.util.UUID; import org.onap.so.bpmn.core.UrnPropertiesReader; import org.springframework.stereotype.Component; @@ -33,7 +32,7 @@ public class VnfAdapterObjectMapperUtils { return UUID.randomUUID().toString(); } - public String createCallbackUrl(String messageType, String correlator) throws UnsupportedEncodingException { + public String createCallbackUrl(String messageType, String correlator) { String endpoint = getProperty("mso.workflow.message.endpoint"); if (endpoint != null) { while (endpoint.endsWith("/")) { diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java index 9065264a9c..43972efd7f 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java @@ -84,10 +84,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Joiner; @@ -269,7 +267,7 @@ public class VnfAdapterVfModuleObjectMapper { private void buildParamsMapFromVnfSdncResponse(Map paramsMap, GenericResourceApiVnftopologyVnfTopology vnfTopology, Map networkRoleMap, - boolean skipVnfResourceAssignments) throws IOException { + boolean skipVnfResourceAssignments) { // Get VNF parameters from SDNC response GenericResourceApiParam vnfParametersData = vnfTopology.getVnfParametersData(); buildParamsMapFromSdncParams(paramsMap, vnfParametersData); @@ -345,8 +343,7 @@ public class VnfAdapterVfModuleObjectMapper { } private void buildParamsMapFromVfModuleSdncResponse(Map paramsMap, - GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleTopology, boolean skipVfModuleAssignments) - throws IOException { + GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleTopology, boolean skipVfModuleAssignments) { // Get VF Module parameters from SDNC response GenericResourceApiParam vfModuleParametersData = vfModuleTopology.getVfModuleParameters(); buildParamsMapFromSdncParams(paramsMap, vfModuleParametersData); @@ -841,8 +838,8 @@ public class VnfAdapterVfModuleObjectMapper { } } - private Map buildNetworkRoleMap(GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleTopology) - throws JsonParseException, JsonMappingException, IOException { + private Map buildNetworkRoleMap( + GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleTopology) { Map networkRoleMap = new HashMap<>(); GenericResourceApiVfmoduleassignmentsVfModuleAssignments vfModuleAssignments = vfModuleTopology.getVfModuleAssignments(); diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClient.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClient.java index 593426a85f..1210f78c7e 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClient.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClient.java @@ -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. diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NetworkAdapterResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NetworkAdapterResources.java index b3efa71969..ab643110ba 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NetworkAdapterResources.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NetworkAdapterResources.java @@ -20,7 +20,6 @@ package org.onap.so.client.orchestration; -import java.io.UnsupportedEncodingException; import java.util.Map; import java.util.Optional; import javax.ws.rs.core.Response; @@ -56,7 +55,7 @@ public class NetworkAdapterResources { public Optional createNetwork(RequestContext requestContext, CloudRegion cloudRegion, OrchestrationContext orchestrationContext, ServiceInstance serviceInstance, L3Network l3Network, Map userInput, String cloudRegionPo, Customer customer) - throws UnsupportedEncodingException, NetworkAdapterClientException { + throws NetworkAdapterClientException { CreateNetworkRequest createNetworkRequest = networkAdapterObjectMapper.createNetworkRequestMapper(requestContext, cloudRegion, orchestrationContext, @@ -67,8 +66,7 @@ public class NetworkAdapterResources { public Optional rollbackCreateNetwork(RequestContext requestContext, CloudRegion cloudRegion, OrchestrationContext orchestrationContext, ServiceInstance serviceInstance, L3Network l3Network, Map userInput, String cloudRegionPo, - CreateNetworkResponse createNetworkResponse) - throws UnsupportedEncodingException, NetworkAdapterClientException { + CreateNetworkResponse createNetworkResponse) throws NetworkAdapterClientException { RollbackNetworkRequest rollbackNetworkRequest = null; rollbackNetworkRequest = networkAdapterObjectMapper.createNetworkRollbackRequestMapper(requestContext, @@ -80,8 +78,7 @@ public class NetworkAdapterResources { public Optional updateNetwork(RequestContext requestContext, CloudRegion cloudRegion, OrchestrationContext orchestrationContext, ServiceInstance serviceInstance, L3Network l3Network, - Map userInput, Customer customer) - throws UnsupportedEncodingException, NetworkAdapterClientException { + Map userInput, Customer customer) throws NetworkAdapterClientException { UpdateNetworkRequest updateNetworkRequest = networkAdapterObjectMapper.createNetworkUpdateRequestMapper( requestContext, cloudRegion, orchestrationContext, serviceInstance, l3Network, userInput, customer); @@ -89,8 +86,7 @@ public class NetworkAdapterResources { } public Optional deleteNetwork(RequestContext requestContext, CloudRegion cloudRegion, - ServiceInstance serviceInstance, L3Network l3Network) - throws UnsupportedEncodingException, NetworkAdapterClientException { + ServiceInstance serviceInstance, L3Network l3Network) throws NetworkAdapterClientException { DeleteNetworkRequest deleteNetworkRequest = networkAdapterObjectMapper .deleteNetworkRequestMapper(requestContext, cloudRegion, serviceInstance, l3Network); @@ -98,41 +94,40 @@ public class NetworkAdapterResources { } public Optional createNetworkAsync(CreateNetworkRequest createNetworkRequest) - throws UnsupportedEncodingException, NetworkAdapterClientException { + throws NetworkAdapterClientException { return Optional.of(networkAdapterClient.createNetworkAsync(createNetworkRequest)); } public Optional deleteNetworkAsync(DeleteNetworkRequest deleteNetworkRequest) - throws UnsupportedEncodingException, NetworkAdapterClientException { + throws NetworkAdapterClientException { return Optional .of(networkAdapterClient.deleteNetworkAsync(deleteNetworkRequest.getNetworkId(), deleteNetworkRequest)); } public Optional updateNetworkAsync(UpdateNetworkRequest updateNetworkRequest) - throws UnsupportedEncodingException, NetworkAdapterClientException { + throws NetworkAdapterClientException { return Optional .of(networkAdapterClient.updateNetworkAsync(updateNetworkRequest.getNetworkId(), updateNetworkRequest)); } public Optional rollbackCreateNetwork(String networkId, - RollbackNetworkRequest rollbackNetworkRequest) - throws UnsupportedEncodingException, NetworkAdapterClientException { + RollbackNetworkRequest rollbackNetworkRequest) throws NetworkAdapterClientException { return Optional.of(networkAdapterClient.rollbackNetwork(networkId, rollbackNetworkRequest)); } public Optional updateNetwork(UpdateNetworkRequest updateNetworkRequest) - throws UnsupportedEncodingException, NetworkAdapterClientException { + throws NetworkAdapterClientException { return Optional .of(networkAdapterClient.updateNetwork(updateNetworkRequest.getNetworkId(), updateNetworkRequest)); } public Optional deleteNetwork(DeleteNetworkRequest deleteNetworkRequest) - throws UnsupportedEncodingException, NetworkAdapterClientException { + throws NetworkAdapterClientException { return Optional .of(networkAdapterClient.deleteNetwork(deleteNetworkRequest.getNetworkId(), deleteNetworkRequest)); diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/ticket/ExternalTicket.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/ticket/ExternalTicket.java index 12adec9e24..af7438847c 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/ticket/ExternalTicket.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/ticket/ExternalTicket.java @@ -165,7 +165,7 @@ public class ExternalTicket { - public void createTicket() throws Exception { + public void createTicket() { // Replace with your ticket creation mechanism if any } diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasksTest.java index 857807ef2e..a14b33f485 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasksTest.java @@ -212,7 +212,7 @@ public class AAICreateTasksTest extends TestDataSetup { } @Test - public void createProjectTest() throws Exception { + public void createProjectTest() { doNothing().when(aaiServiceInstanceResources) .createProjectandConnectServiceInstance(serviceInstance.getProject(), serviceInstance); aaiCreateTasks.createProject(execution); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/cnfm/tasks/CnfInstantiateTaskTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/cnfm/tasks/CnfInstantiateTaskTest.java index 1268828a20..46857a25a2 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/cnfm/tasks/CnfInstantiateTaskTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/cnfm/tasks/CnfInstantiateTaskTest.java @@ -75,7 +75,7 @@ public class CnfInstantiateTaskTest { private final BuildingBlockExecution stubbedExecution = new StubbedBuildingBlockExecution(); @Test - public void testCreateCreateASRequest_withValidValues_storesRequestInExecution() throws Exception { + public void testCreateCreateASRequest_withValidValues_storesRequestInExecution() { final CnfInstantiateTask objUnderTest = getCnfInstantiateTask(); stubbedExecution.setVariable(INPUT_PARAMETER, @@ -96,7 +96,7 @@ public class CnfInstantiateTaskTest { } @Test - public void testCreateCreateASRequest_ForBBThrowsException_exceptionBuilderCalled() throws Exception { + public void testCreateCreateASRequest_ForBBThrowsException_exceptionBuilderCalled() { final CnfInstantiateTask objUnderTest = getCnfInstantiateTask(); @@ -116,7 +116,7 @@ public class CnfInstantiateTaskTest { } @Test - public void invokeCnfmWithCreateAsRequest_validValues_storesResponseInExecution() throws Exception { + public void invokeCnfmWithCreateAsRequest_validValues_storesResponseInExecution() { final CnfInstantiateTask objUnderTest = getCnfInstantiateTask(); stubbedExecution.setVariable(CREATE_AS_REQUEST_OBJECT, new CreateAsRequest()); @@ -130,7 +130,7 @@ public class CnfInstantiateTaskTest { } @Test - public void invokeCnfmWithCreateAsRequest_ForBBThrowsException_exceptionBuilderCalled() throws Exception { + public void invokeCnfmWithCreateAsRequest_ForBBThrowsException_exceptionBuilderCalled() { final CnfInstantiateTask objUnderTest = getCnfInstantiateTask(); stubbedExecution.setVariable(CREATE_AS_REQUEST_OBJECT, new CreateAsRequest()); @@ -149,7 +149,7 @@ public class CnfInstantiateTaskTest { } @Test - public void testcreateAsInstanceRequest_withValidValues_storesRequestInExecution() throws Exception { + public void testcreateAsInstanceRequest_withValidValues_storesRequestInExecution() { final CnfInstantiateTask objUnderTest = getCnfInstantiateTask(); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/MonitorInstantiateVnfmNodeTaskTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/MonitorInstantiateVnfmNodeTaskTest.java index effcf24a8d..06d8208188 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/MonitorInstantiateVnfmNodeTaskTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/MonitorInstantiateVnfmNodeTaskTest.java @@ -101,7 +101,7 @@ public class MonitorInstantiateVnfmNodeTaskTest extends BaseTaskTest { } @Test - public void testTimeOutLogFailue() throws Exception { + public void testTimeOutLogFailue() { objUnderTest.timeOutLogFailue(stubbedxecution); verify(exceptionUtil).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(1221), eq("Node operation time out")); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/MonitorVnfmCreateJobTaskTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/MonitorVnfmCreateJobTaskTest.java index 57c9c0846c..5c505949ae 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/MonitorVnfmCreateJobTaskTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/MonitorVnfmCreateJobTaskTest.java @@ -57,7 +57,7 @@ public class MonitorVnfmCreateJobTaskTest extends BaseTaskTest { private final BuildingBlockExecution stubbedxecution = new StubbedBuildingBlockExecution(); @Test - public void testGetCurrentOperationStatus() throws Exception { + public void testGetCurrentOperationStatus() { final MonitorVnfmCreateJobTask objUnderTest = getEtsiVnfMonitorJobTask(); stubbedxecution.setVariable(Constants.CREATE_VNF_RESPONSE_PARAM_NAME, getCreateVnfResponse()); Optional queryJobResponse = getQueryJobResponse(); @@ -72,7 +72,7 @@ public class MonitorVnfmCreateJobTaskTest extends BaseTaskTest { } @Test - public void testGetCurrentOperationStatusFailed() throws Exception { + public void testGetCurrentOperationStatusFailed() { final MonitorVnfmCreateJobTask objUnderTest = getEtsiVnfMonitorJobTask(); stubbedxecution.setVariable(Constants.CREATE_VNF_RESPONSE_PARAM_NAME, getCreateVnfResponse()); Optional queryJobResponse = getQueryJobResponse(); @@ -88,7 +88,7 @@ public class MonitorVnfmCreateJobTaskTest extends BaseTaskTest { } @Test - public void testGetCurrentOperationStatusEmpty() throws Exception { + public void testGetCurrentOperationStatusEmpty() { final MonitorVnfmCreateJobTask objUnderTest = getEtsiVnfMonitorJobTask(); stubbedxecution.setVariable(Constants.CREATE_VNF_RESPONSE_PARAM_NAME, getCreateVnfResponse()); Optional queryJobResponse = getQueryJobResponse(); @@ -101,7 +101,7 @@ public class MonitorVnfmCreateJobTaskTest extends BaseTaskTest { } @Test - public void testGetCurrentOperationStatusException() throws Exception { + public void testGetCurrentOperationStatusException() { final MonitorVnfmCreateJobTask objUnderTest = getEtsiVnfMonitorJobTask(); stubbedxecution.setVariable(Constants.CREATE_VNF_RESPONSE_PARAM_NAME, getCreateVnfResponse()); Optional queryJobResponse = getQueryJobResponse(); @@ -114,21 +114,21 @@ public class MonitorVnfmCreateJobTaskTest extends BaseTaskTest { } @Test - public void testHasOperationFinished() throws Exception { + public void testHasOperationFinished() { final MonitorVnfmCreateJobTask objUnderTest = getEtsiVnfMonitorJobTask(); stubbedxecution.setVariable(Constants.OPERATION_STATUS_PARAM_NAME, Optional.of(OperationStateEnum.COMPLETED)); assertTrue(objUnderTest.hasOperationFinished(stubbedxecution)); } @Test - public void testHasOperationPending() throws Exception { + public void testHasOperationPending() { final MonitorVnfmCreateJobTask objUnderTest = getEtsiVnfMonitorJobTask(); stubbedxecution.setVariable(Constants.OPERATION_STATUS_PARAM_NAME, Optional.absent()); assertFalse(objUnderTest.hasOperationFinished(stubbedxecution)); } @Test - public void testTimeOutLogFailue() throws Exception { + public void testTimeOutLogFailue() { final MonitorVnfmCreateJobTask objUnderTest = getEtsiVnfMonitorJobTask(); objUnderTest.timeOutLogFailue(stubbedxecution); verify(exceptionUtil).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(1205), @@ -136,7 +136,7 @@ public class MonitorVnfmCreateJobTaskTest extends BaseTaskTest { } @Test - public void testCheckIfOperationWasSuccessful() throws Exception { + public void testCheckIfOperationWasSuccessful() { stubbedxecution.setVariable(Constants.OPERATION_STATUS_PARAM_NAME, Optional.of(OperationStateEnum.COMPLETED)); MonitorVnfmCreateJobTask objUnderTest = Mockito.spy(getEtsiVnfMonitorJobTask()); objUnderTest.checkIfOperationWasSuccessful(stubbedxecution); @@ -144,7 +144,7 @@ public class MonitorVnfmCreateJobTaskTest extends BaseTaskTest { } @Test - public void testCheckIfOperationWasSuccessfulWithPending() throws Exception { + public void testCheckIfOperationWasSuccessfulWithPending() { final MonitorVnfmCreateJobTask objUnderTest = getEtsiVnfMonitorJobTask(); stubbedxecution.setVariable(Constants.OPERATION_STATUS_PARAM_NAME, Optional.of(OperationStateEnum.PROCESSING)); objUnderTest.checkIfOperationWasSuccessful(stubbedxecution); @@ -152,7 +152,7 @@ public class MonitorVnfmCreateJobTaskTest extends BaseTaskTest { } @Test - public void testCheckIfOperationWasSuccessfulEmpty() throws Exception { + public void testCheckIfOperationWasSuccessfulEmpty() { MonitorVnfmCreateJobTask objUnderTest = getEtsiVnfMonitorJobTask(); stubbedxecution.setVariable(Constants.CREATE_VNF_RESPONSE_PARAM_NAME, getCreateVnfResponse()); stubbedxecution.setVariable(Constants.OPERATION_STATUS_PARAM_NAME, Optional.absent()); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/MonitorVnfmDeleteJobTaskTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/MonitorVnfmDeleteJobTaskTest.java index b8957d2d8a..702500373c 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/MonitorVnfmDeleteJobTaskTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/MonitorVnfmDeleteJobTaskTest.java @@ -66,7 +66,7 @@ public class MonitorVnfmDeleteJobTaskTest extends BaseTaskTest { } @Test - public void testGetCurrentOperationStatus() throws Exception { + public void testGetCurrentOperationStatus() { Optional queryJobResponse = getQueryJobResponse(); queryJobResponse.get().setOperationStatusRetrievalStatus(OperationStatusRetrievalStatusEnum.STATUS_FOUND); queryJobResponse.get().setOperationState(OperationStateEnum.COMPLETED); @@ -79,7 +79,7 @@ public class MonitorVnfmDeleteJobTaskTest extends BaseTaskTest { } @Test - public void testGetCurrentOperationStatusFailed() throws Exception { + public void testGetCurrentOperationStatusFailed() { Optional queryJobResponse = getQueryJobResponse(); queryJobResponse.get() .setOperationStatusRetrievalStatus(OperationStatusRetrievalStatusEnum.CANNOT_RETRIEVE_STATUS); @@ -93,7 +93,7 @@ public class MonitorVnfmDeleteJobTaskTest extends BaseTaskTest { } @Test - public void testGetCurrentOperationStatusEmpty() throws Exception { + public void testGetCurrentOperationStatusEmpty() { Optional queryJobResponse = getQueryJobResponse(); queryJobResponse.get().setOperationStatusRetrievalStatus(OperationStatusRetrievalStatusEnum.STATUS_FOUND); when(mockedVnfmAdapterServiceProvider.getInstantiateOperationJobStatus(JOB_ID)).thenReturn(queryJobResponse); @@ -104,7 +104,7 @@ public class MonitorVnfmDeleteJobTaskTest extends BaseTaskTest { } @Test - public void testGetCurrentOperationStatusException() throws Exception { + public void testGetCurrentOperationStatusException() { Optional queryJobResponse = getQueryJobResponse(); queryJobResponse.get().setOperationStatusRetrievalStatus(OperationStatusRetrievalStatusEnum.STATUS_FOUND); when(mockedVnfmAdapterServiceProvider.getInstantiateOperationJobStatus(JOB_ID)).thenReturn(queryJobResponse); @@ -115,26 +115,26 @@ public class MonitorVnfmDeleteJobTaskTest extends BaseTaskTest { } @Test - public void testHasOperationFinished() throws Exception { + public void testHasOperationFinished() { stubbedxecution.setVariable(Constants.OPERATION_STATUS_PARAM_NAME, Optional.of(OperationStateEnum.COMPLETED)); assertTrue(objUnderTest.hasOperationFinished(stubbedxecution)); } @Test - public void testHasOperationPending() throws Exception { + public void testHasOperationPending() { stubbedxecution.setVariable(Constants.OPERATION_STATUS_PARAM_NAME, Optional.absent()); assertFalse(objUnderTest.hasOperationFinished(stubbedxecution)); } @Test - public void testTimeOutLogFailue() throws Exception { + public void testTimeOutLogFailue() { objUnderTest.timeOutLogFailue(stubbedxecution); verify(exceptionUtil).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(1213), eq("Delete operation time out")); } @Test - public void testCheckIfOperationWasSuccessful() throws Exception { + public void testCheckIfOperationWasSuccessful() { stubbedxecution.setVariable(Constants.OPERATION_STATUS_PARAM_NAME, Optional.of(OperationStateEnum.COMPLETED)); MonitorVnfmDeleteJobTask spyObject = Mockito.spy(objUnderTest); spyObject.checkIfOperationWasSuccessful(stubbedxecution); @@ -142,14 +142,14 @@ public class MonitorVnfmDeleteJobTaskTest extends BaseTaskTest { } @Test - public void testCheckIfOperationWasSuccessfulWithPending() throws Exception { + public void testCheckIfOperationWasSuccessfulWithPending() { stubbedxecution.setVariable(Constants.OPERATION_STATUS_PARAM_NAME, Optional.of(OperationStateEnum.PROCESSING)); objUnderTest.checkIfOperationWasSuccessful(stubbedxecution); verify(exceptionUtil).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(1215), anyString()); } @Test - public void testCheckIfOperationWasSuccessfulEmpty() throws Exception { + public void testCheckIfOperationWasSuccessfulEmpty() { stubbedxecution.setVariable(Constants.OPERATION_STATUS_PARAM_NAME, Optional.absent()); objUnderTest.checkIfOperationWasSuccessful(stubbedxecution); verify(exceptionUtil).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(1214), anyString()); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/UserParamInputParametersProviderTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/UserParamInputParametersProviderTest.java index ce0fabc29a..643f2be1ea 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/UserParamInputParametersProviderTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/UserParamInputParametersProviderTest.java @@ -39,7 +39,7 @@ import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.ExternalVirtualLink; public class UserParamInputParametersProviderTest { @Test - public void testGetInputParameter_ValidUserParams_NotEmptyInputParameter() throws Exception { + public void testGetInputParameter_ValidUserParams_NotEmptyInputParameter() { final InputParametersProvider> objUnderTest = new UserParamInputParametersProvider(); final InputParameter actual = @@ -61,7 +61,7 @@ public class UserParamInputParametersProviderTest { } @Test - public void testGetInputParameter_EmptyOrNullUserParams_EmptyInputParameter() throws Exception { + public void testGetInputParameter_EmptyOrNullUserParams_EmptyInputParameter() { final InputParametersProvider> objUnderTest = new UserParamInputParametersProvider(); InputParameter actual = objUnderTest.getInputParameter(Collections.emptyMap()); @@ -78,7 +78,7 @@ public class UserParamInputParametersProviderTest { } @Test - public void testGetInputParameter_InValidExtVirtualLinks_NotEmptyInputParameter() throws Exception { + public void testGetInputParameter_InValidExtVirtualLinks_NotEmptyInputParameter() { final InputParametersProvider> objUnderTest = new UserParamInputParametersProvider(); final InputParameter actual = diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/VnfParameterTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/VnfParameterTest.java index c7c61f9a1d..cbedad0baf 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/VnfParameterTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/VnfParameterTest.java @@ -29,7 +29,7 @@ import nl.jqno.equalsverifier.Warning; */ public class VnfParameterTest { @Test - public void testVnfParameter_equalAndHasCode() throws ClassNotFoundException { + public void testVnfParameter_equalAndHasCode() { EqualsVerifier.forClass(VnfParameter.class).suppress(Warning.STRICT_INHERITANCE, Warning.NONFINAL_FIELDS) .verify(); } diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasksIT.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasksIT.java index db489f6f5f..4dfe473ce4 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasksIT.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasksIT.java @@ -116,7 +116,7 @@ public class AppcRunTasksIT extends BaseIntegrationTest { } @Test - public void runAppcCommandTest() throws Exception { + public void runAppcCommandTest() { Action action = Action.QuiesceTraffic; ControllerSelectionReference controllerSelectionReference = new ControllerSelectionReference(); controllerSelectionReference.setControllerName("testName"); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/audit/AuditTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/audit/AuditTasksTest.java index 27f40c5bce..f04cc8a093 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/audit/AuditTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/audit/AuditTasksTest.java @@ -83,7 +83,7 @@ public class AuditTasksTest extends BaseTaskTest { } @Test - public void setupAuditVariableTest() throws Exception { + public void setupAuditVariableTest() { AuditInventory expectedAuditInventory = new AuditInventory(); expectedAuditInventory.setCloudOwner("testCloudOwner"); expectedAuditInventory.setCloudRegion("testLcpCloudRegionId"); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ActivateVfModuleTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ActivateVfModuleTest.java index b8bcef6dba..a1850b0600 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ActivateVfModuleTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ActivateVfModuleTest.java @@ -34,7 +34,7 @@ public class ActivateVfModuleTest extends BaseTaskTest { private ActivateVfModule activateVfModule = new ActivateVfModule(); @Test - public void setWaitBeforeDurationTest() throws Exception { + public void setWaitBeforeDurationTest() { when(env.getProperty(ActivateVfModule.VF_MODULE_TIMER_DURATION_PATH, ActivateVfModule.DEFAULT_TIMER_DURATION)) .thenReturn("PT300S"); activateVfModule.setTimerDuration(execution); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkBBUtilsTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkBBUtilsTest.java index 8ca0e79c6e..91d309ee8a 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkBBUtilsTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkBBUtilsTest.java @@ -39,7 +39,7 @@ public class AssignNetworkBBUtilsTest extends BaseTaskTest { } @Test - public void getCloudRegionTest25() throws Exception { + public void getCloudRegionTest25() { cloudRegion.setCloudRegionVersion("2.5"); nonMockAssignNetworkBBUtils.getCloudRegion(execution); @@ -49,7 +49,7 @@ public class AssignNetworkBBUtilsTest extends BaseTaskTest { } @Test - public void getCloudRegionTest30() throws Exception { + public void getCloudRegionTest30() { cloudRegion.setCloudRegionVersion("3.0"); nonMockAssignNetworkBBUtils.getCloudRegion(execution); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignVnfTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignVnfTest.java index 944b1351c1..4b7642dec1 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignVnfTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignVnfTest.java @@ -100,7 +100,7 @@ public class AssignVnfTest extends BaseTaskTest { } @Test - public void createInstanceGroupsSunnyDayTest() throws Exception { + public void createInstanceGroupsSunnyDayTest() { List instanceGroupList = genericVnf.getInstanceGroups(); instanceGroupList.add(instanceGroup1); @@ -123,7 +123,7 @@ public class AssignVnfTest extends BaseTaskTest { } @Test - public void createVnfcInstanceGroupNoneTest() throws Exception { + public void createVnfcInstanceGroupNoneTest() { assignVnf.createInstanceGroups(execution); @@ -133,7 +133,7 @@ public class AssignVnfTest extends BaseTaskTest { } @Test - public void createVnfcInstanceGroupExceptionTest() throws Exception { + public void createVnfcInstanceGroupExceptionTest() { List instanceGroupList = genericVnf.getInstanceGroups(); instanceGroupList.add(instanceGroup1); instanceGroupList.add(instanceGroup2); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CloudSiteCatalogUtilsTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CloudSiteCatalogUtilsTest.java index 99516e69e3..a278b953a6 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CloudSiteCatalogUtilsTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CloudSiteCatalogUtilsTest.java @@ -34,7 +34,7 @@ public class CloudSiteCatalogUtilsTest extends BaseTaskTest { private CloudSiteCatalogUtils cloudSiteCatalogUtils = new CloudSiteCatalogUtils(); @Test - public void testGetCloudSiteGetVersion30Test() throws Exception { + public void testGetCloudSiteGetVersion30Test() { CloudSite cloudSite = new CloudSite(); String testCloudSiteId = "testCloudSiteId"; cloudSite.setClli(testCloudSiteId); @@ -44,7 +44,7 @@ public class CloudSiteCatalogUtilsTest extends BaseTaskTest { } @Test - public void testGetCloudSiteGetVersion25Test() throws Exception { + public void testGetCloudSiteGetVersion25Test() { CloudSite cloudSite = new CloudSite(); String testCloudSiteId = "testCloudSiteId"; cloudSite.setClli(testCloudSiteId); @@ -55,7 +55,7 @@ public class CloudSiteCatalogUtilsTest extends BaseTaskTest { } @Test - public void testGetIdentityUrlFromCloudSiteSuccessTest() throws Exception { + public void testGetIdentityUrlFromCloudSiteSuccessTest() { CloudSite cloudSite = new CloudSite(); String testCloudSiteId = "testCloudSiteId"; String testIdentityUrl = "testIdentityUrl"; @@ -71,7 +71,7 @@ public class CloudSiteCatalogUtilsTest extends BaseTaskTest { } @Test - public void testGetIdentityUrlFromCloudSiteNoCloudIdProvidedTest() throws Exception { + public void testGetIdentityUrlFromCloudSiteNoCloudIdProvidedTest() { CloudSite cloudSite = new CloudSite(); String testCloudSiteId = "testCloudSiteId"; String testIdentityUrl = "testIdentityUrl"; diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigDeployVnfTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigDeployVnfTest.java index 982b75ae8e..0a900a978b 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigDeployVnfTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigDeployVnfTest.java @@ -74,7 +74,7 @@ public class ConfigDeployVnfTest extends BaseTaskTest { @Test - public void preProcessAbstractCDSProcessingTest() throws Exception { + public void preProcessAbstractCDSProcessingTest() { configDeployVnf.preProcessAbstractCDSProcessing(execution); @@ -82,14 +82,14 @@ public class ConfigDeployVnfTest extends BaseTaskTest { } @Test - public void updateAAIConfigureTaskTest() throws Exception { + public void updateAAIConfigureTaskTest() { configDeployVnf.updateAAIConfigure(execution); assertTrue(true); } @Test - public void updateAAIConfiguredTaskTest() throws Exception { + public void updateAAIConfiguredTaskTest() { configDeployVnf.updateAAIConfigured(execution); assertTrue(true); } diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOutTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOutTest.java index 4d43bbbce7..5cc6d73c9c 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOutTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOutTest.java @@ -116,7 +116,7 @@ public class ConfigurationScaleOutTest extends BaseTaskTest { } @Test - public void callAppcClientTest() throws Exception { + public void callAppcClientTest() { Action action = Action.ConfigScaleOut; String vnfId = genericVnf.getVnfId(); String controllerType = "testType"; @@ -172,7 +172,7 @@ public class ConfigurationScaleOutTest extends BaseTaskTest { } @Test - public void callAppcClientExceptionTest() throws Exception { + public void callAppcClientExceptionTest() { expectedException.expect(BpmnError.class); Action action = Action.ConfigScaleOut; String vnfId = genericVnf.getVnfId(); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ControllerExecutionTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ControllerExecutionTest.java index f35939ec39..8fd9277b95 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ControllerExecutionTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ControllerExecutionTest.java @@ -91,7 +91,7 @@ public class ControllerExecutionTest extends BaseTaskTest { } @Test - public void testSetControllerActorScopeAction() throws Exception { + public void testSetControllerActorScopeAction() { doReturn(vnfResourceCustomization).when(catalogDbClient).getVnfResourceCustomizationByModelCustomizationUUID( @@ -105,7 +105,7 @@ public class ControllerExecutionTest extends BaseTaskTest { @Test - public void testSelectBB() throws Exception { + public void testSelectBB() { // given BBNameSelectionReference bbNameSelectionReference = new BBNameSelectionReference(); bbNameSelectionReference.setBbName(TEST_BBNAME); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/NetworkBBUtilsTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/NetworkBBUtilsTest.java index 0fa0f6a26e..b5fb686c42 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/NetworkBBUtilsTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/NetworkBBUtilsTest.java @@ -73,7 +73,7 @@ public class NetworkBBUtilsTest extends BaseTaskTest { } @Test - public void getCloudRegionSDNC25Test() throws Exception { + public void getCloudRegionSDNC25Test() { cloudRegion.setCloudRegionVersion("2.5"); NetworkBBUtils spyAssign = Mockito.spy(NetworkBBUtils.class); @@ -84,7 +84,7 @@ public class NetworkBBUtilsTest extends BaseTaskTest { } @Test - public void getCloudRegionSDNC30Test() throws Exception { + public void getCloudRegionSDNC30Test() { cloudRegion.setCloudRegionVersion("3.0"); NetworkBBUtils spyAssign = Mockito.spy(NetworkBBUtils.class); @@ -95,7 +95,7 @@ public class NetworkBBUtilsTest extends BaseTaskTest { } @Test - public void getCloudRegionPO25Test() throws Exception { + public void getCloudRegionPO25Test() { cloudRegion.setCloudRegionVersion("2.5"); NetworkBBUtils spyAssign = Mockito.spy(NetworkBBUtils.class); @@ -106,7 +106,7 @@ public class NetworkBBUtilsTest extends BaseTaskTest { } @Test - public void getCloudRegionPO30Test() throws Exception { + public void getCloudRegionPO30Test() { cloudRegion.setCloudRegionVersion("3.0"); NetworkBBUtils spyAssignPO = Mockito.spy(NetworkBBUtils.class); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/SniroHomingV2IT.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/SniroHomingV2IT.java index b18a6ac2c4..c1ece719e9 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/SniroHomingV2IT.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/SniroHomingV2IT.java @@ -27,7 +27,6 @@ import static org.junit.Assert.*; import static org.mockito.ArgumentMatchers.isA; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.camunda.bpm.engine.delegate.BpmnError; @@ -49,7 +48,6 @@ import org.onap.so.bpmn.servicedecomposition.homingobjects.Candidate; import org.onap.so.bpmn.servicedecomposition.homingobjects.CandidateType; import org.onap.so.client.exception.BadResponseException; import org.onap.so.client.sniro.beans.SniroManagerRequest; -import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; public class SniroHomingV2IT extends BaseIntegrationTest { @@ -122,7 +120,7 @@ public class SniroHomingV2IT extends BaseIntegrationTest { } @Test(expected = Test.None.class) - public void testCallSniro_success_1VpnLink() throws BadResponseException, IOException { + public void testCallSniro_success_1VpnLink() throws BadResponseException { beforeVpnBondingLink("1"); wireMockServer.stubFor(post(urlEqualTo("/sniro/api/placement/v2")).willReturn( @@ -139,7 +137,7 @@ public class SniroHomingV2IT extends BaseIntegrationTest { } @Test - public void testCallSniro_success_3VpnLink() throws JsonProcessingException, BadResponseException { + public void testCallSniro_success_3VpnLink() throws BadResponseException { beforeVpnBondingLink("1"); beforeVpnBondingLink("2"); beforeVpnBondingLink("3"); @@ -158,7 +156,7 @@ public class SniroHomingV2IT extends BaseIntegrationTest { } @Test - public void testCallSniro_success_3Allotteds() throws BadResponseException, JsonProcessingException { + public void testCallSniro_success_3Allotteds() throws BadResponseException { beforeAllottedResource(); wireMockServer.stubFor(post(urlEqualTo("/sniro/api/placement/v2")).willReturn( @@ -175,7 +173,7 @@ public class SniroHomingV2IT extends BaseIntegrationTest { } @Test - public void testCallSniro_success_1Vnf() throws JsonProcessingException, BadResponseException { + public void testCallSniro_success_1Vnf() throws BadResponseException { beforeVnf(); wireMockServer.stubFor(post(urlEqualTo("/sniro/api/placement/v2")).willReturn( @@ -189,7 +187,7 @@ public class SniroHomingV2IT extends BaseIntegrationTest { } @Test - public void testCallSniro_success_3Allotteds1Vnf() throws JsonProcessingException, BadResponseException { + public void testCallSniro_success_3Allotteds1Vnf() throws BadResponseException { beforeAllottedResource(); beforeVnf(); @@ -202,7 +200,7 @@ public class SniroHomingV2IT extends BaseIntegrationTest { } @Test - public void testCallSniro_success_1ServiceProxy() throws JsonProcessingException, BadResponseException { + public void testCallSniro_success_1ServiceProxy() throws BadResponseException { beforeServiceProxy(); wireMockServer.stubFor(post(urlEqualTo("/sniro/api/placement/v2")).willReturn( @@ -642,7 +640,7 @@ public class SniroHomingV2IT extends BaseIntegrationTest { @Test(expected = BpmnError.class) - public void testCallSniro_error_0Resources() throws BadResponseException, JsonProcessingException { + public void testCallSniro_error_0Resources() throws BadResponseException { sniroHoming.callSniro(execution); @@ -650,7 +648,7 @@ public class SniroHomingV2IT extends BaseIntegrationTest { } @Test(expected = BpmnError.class) - public void testCallSniro_error_badResponse() throws BadResponseException, JsonProcessingException { + public void testCallSniro_error_badResponse() throws BadResponseException { beforeAllottedResource(); mockResponse = diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBBTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBBTest.java index b4b7ad86b1..7a0a5623af 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBBTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBBTest.java @@ -82,7 +82,7 @@ public class UnassignNetworkBBTest extends BaseTaskTest { } @Test - public void checkRelationshipRelatedToUnassignNetworkExceptionTest() throws Exception { + public void checkRelationshipRelatedToUnassignNetworkExceptionTest() { String msg = "Cannot perform Unassign Network. Network is still related to vf-module"; expectedException.expect(BpmnError.class); doReturn(true).when(networkBBUtils).isRelationshipRelatedToExists(any(Optional.class), eq("vf-module")); @@ -91,7 +91,7 @@ public class UnassignNetworkBBTest extends BaseTaskTest { } @Test - public void getCloudSdncRegion25Test() throws Exception { + public void getCloudSdncRegion25Test() { CloudRegion cloudRegion = setCloudRegion(); cloudRegion.setCloudRegionVersion("2.5"); doReturn("AAIAIC25").when(networkBBUtils).getCloudRegion(execution, SourceSystem.SDNC); @@ -100,7 +100,7 @@ public class UnassignNetworkBBTest extends BaseTaskTest { } @Test - public void getCloudSdncRegion30Test() throws Exception { + public void getCloudSdncRegion30Test() { CloudRegion cloudRegion = setCloudRegion(); cloudRegion.setCloudRegionVersion("3.0"); gBBInput.setCloudRegion(cloudRegion); @@ -110,7 +110,7 @@ public class UnassignNetworkBBTest extends BaseTaskTest { } @Test - public void errorEncounteredTest_rollback() throws Exception { + public void errorEncounteredTest_rollback() { expectedException.expect(BpmnError.class); execution.setVariable("ErrorUnassignNetworkBB", "Relationship's RelatedTo still exists in AAI, remove the relationship vf-module first."); @@ -119,7 +119,7 @@ public class UnassignNetworkBBTest extends BaseTaskTest { } @Test - public void errorEncounteredTest_noRollback() throws Exception { + public void errorEncounteredTest_noRollback() { expectedException.expect(BpmnError.class); execution.setVariable("ErrorUnassignNetworkBB", "Relationship's RelatedTo still exists in AAI, remove the relationship vf-module first."); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignVnfTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignVnfTest.java index 04345a6792..90a0f4fab4 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignVnfTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignVnfTest.java @@ -75,7 +75,7 @@ public class UnassignVnfTest extends BaseTaskTest { } @Test - public void deletecreateVnfcInstanceGroupExceptionTest() throws Exception { + public void deletecreateVnfcInstanceGroupExceptionTest() { expectedException.expect(BpmnError.class); unassignVnf.deleteInstanceGroups(execution); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/manualhandling/tasks/ExternalTicketTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/manualhandling/tasks/ExternalTicketTasksTest.java index f8ecf01579..68f68f2b27 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/manualhandling/tasks/ExternalTicketTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/manualhandling/tasks/ExternalTicketTasksTest.java @@ -50,7 +50,7 @@ public class ExternalTicketTasksTest extends BaseTaskTest { private ExternalTicket MOCK_externalTicket; @Before - public void before() throws Exception { + public void before() { delegateExecution = new DelegateExecutionFake(); buildingBlockExecution = new DelegateExecutionImpl(delegateExecution); generalBuildingBlock = new GeneralBuildingBlock(); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/manualhandling/tasks/ManualHandlingTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/manualhandling/tasks/ManualHandlingTasksTest.java index e3bbd11cc4..c6ff6d6c84 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/manualhandling/tasks/ManualHandlingTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/manualhandling/tasks/ManualHandlingTasksTest.java @@ -75,7 +75,7 @@ public class ManualHandlingTasksTest extends BaseTaskTest { private ExternalTicket MOCK_externalTicket; @Before - public void before() throws Exception { + public void before() { MockitoAnnotations.initMocks(this); delegateExecution = new DelegateExecutionFake(); buildingBlockExecution = new DelegateExecutionImpl(delegateExecution); @@ -114,7 +114,7 @@ public class ManualHandlingTasksTest extends BaseTaskTest { } @Test - public void completeTask_Test() throws Exception { + public void completeTask_Test() { when(task.getId()).thenReturn("taskId"); when(task.getExecution()).thenReturn(mockExecution); Map taskVariables = new HashMap(); @@ -127,7 +127,7 @@ public class ManualHandlingTasksTest extends BaseTaskTest { } @Test - public void updateRequestDbStatus_Test() throws Exception { + public void updateRequestDbStatus_Test() { InfraActiveRequests mockedRequest = new InfraActiveRequests(); when(requestsDbClient.getInfraActiveRequestbyRequestId(any(String.class))).thenReturn(mockedRequest); doNothing().when(requestsDbClient).updateInfraActiveRequests(any(InfraActiveRequests.class)); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/mapper/NetworkTopologyOperationRequestMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/mapper/NetworkTopologyOperationRequestMapperTest.java index 0808c35857..ce54dfc0f6 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/mapper/NetworkTopologyOperationRequestMapperTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/mapper/NetworkTopologyOperationRequestMapperTest.java @@ -142,7 +142,7 @@ public class NetworkTopologyOperationRequestMapperTest { } @Test - public void createGenericResourceApiNetworkOperationInformationReqContextNullTest() throws Exception { + public void createGenericResourceApiNetworkOperationInformationReqContextNullTest() { RequestContext rc = new RequestContext(); rc.setMsoRequestId(null); @@ -159,7 +159,7 @@ public class NetworkTopologyOperationRequestMapperTest { } @Test - public void reqMapperTest() throws Exception { + public void reqMapperTest() { GenericResourceApiNetworkOperationInformation networkSDNCrequest = mapper.reqMapper(SDNCSvcOperation.NETWORK_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN, @@ -172,7 +172,7 @@ public class NetworkTopologyOperationRequestMapperTest { } @Test - public void reqMapperNoCollectionTest() throws Exception { + public void reqMapperNoCollectionTest() { GenericResourceApiNetworkOperationInformation networkSDNCrequest = mapper.reqMapper(SDNCSvcOperation.NETWORK_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN, GenericResourceApiRequestActionEnumeration.CREATENETWORKINSTANCE, network, diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCActivateTaskTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCActivateTaskTest.java index 510dc47649..4125db59ac 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCActivateTaskTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCActivateTaskTest.java @@ -93,7 +93,7 @@ public class SDNCActivateTaskTest extends BaseTaskTest { } @Test - public void activateVnfTest() throws Exception { + public void activateVnfTest() { doReturn(new GenericResourceApiVnfOperationInformation()).when(sdncVnfResources).activateVnf(eq(genericVnf), eq(serviceInstance), eq(customer), eq(cloudRegion), eq(requestContext), any(URI.class)); sdncActivateTasks.activateVnf(execution); @@ -104,7 +104,7 @@ public class SDNCActivateTaskTest extends BaseTaskTest { } @Test - public void activateVnfTestException() throws Exception { + public void activateVnfTestException() { expectedException.expect(BpmnError.class); doThrow(RuntimeException.class).when(sdncVnfResources).activateVnf(eq(genericVnf), eq(serviceInstance), eq(customer), eq(cloudRegion), eq(requestContext), any(URI.class)); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasksTest.java index b72766c386..f96f47b7d4 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasksTest.java @@ -94,7 +94,7 @@ public class SDNCAssignTasksTest extends BaseTaskTest { } @Test - public void assignServiceInstanceTest() throws Exception { + public void assignServiceInstanceTest() { doReturn(new GenericResourceApiServiceOperationInformation()).when(sdncServiceInstanceResources) .assignServiceInstance(serviceInstance, customer, requestContext); sdncAssignTasks.assignServiceInstance(execution); @@ -104,7 +104,7 @@ public class SDNCAssignTasksTest extends BaseTaskTest { } @Test - public void assignServiceInstanceExceptionTest() throws Exception { + public void assignServiceInstanceExceptionTest() { expectedException.expect(BpmnError.class); doThrow(RuntimeException.class).when(sdncServiceInstanceResources).assignServiceInstance(serviceInstance, customer, requestContext); @@ -112,7 +112,7 @@ public class SDNCAssignTasksTest extends BaseTaskTest { } @Test - public void assignVnfTest() throws Exception { + public void assignVnfTest() { doReturn(new GenericResourceApiVnfOperationInformation()).when(sdncVnfResources).assignVnf(eq(genericVnf), eq(serviceInstance), eq(customer), eq(cloudRegion), eq(requestContext), eq(false), any(URI.class)); execution.setVariable("generalBuildingBlock", gBBInput); @@ -124,7 +124,7 @@ public class SDNCAssignTasksTest extends BaseTaskTest { } @Test - public void assignVnfExceptionTest() throws Exception { + public void assignVnfExceptionTest() { expectedException.expect(BpmnError.class); doThrow(RuntimeException.class).when(sdncVnfResources).assignVnf(eq(genericVnf), eq(serviceInstance), eq(customer), eq(cloudRegion), eq(requestContext), eq(false), any(URI.class)); @@ -152,7 +152,7 @@ public class SDNCAssignTasksTest extends BaseTaskTest { } @Test - public void assignNetworkTest() throws Exception { + public void assignNetworkTest() { doReturn(new GenericResourceApiNetworkOperationInformation()).when(sdncNetworkResources).assignNetwork(network, serviceInstance, customer, requestContext, cloudRegion); sdncAssignTasks.assignNetwork(execution); @@ -163,7 +163,7 @@ public class SDNCAssignTasksTest extends BaseTaskTest { } @Test - public void assignNetworkExceptionTest() throws Exception { + public void assignNetworkExceptionTest() { expectedException.expect(BpmnError.class); doThrow(RuntimeException.class).when(sdncNetworkResources).assignNetwork(network, serviceInstance, customer, requestContext, cloudRegion); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCChangeAssignTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCChangeAssignTasksTest.java index 96ff01f78b..2e0525c1c4 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCChangeAssignTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCChangeAssignTasksTest.java @@ -79,7 +79,7 @@ public class SDNCChangeAssignTasksTest extends BaseTaskTest { } @Test - public void changeModelVnfTest() throws Exception { + public void changeModelVnfTest() { doReturn(new GenericResourceApiVnfOperationInformation()).when(sdncVnfResources).changeModelVnf(eq(genericVnf), eq(serviceInstance), eq(customer), eq(cloudRegion), eq(requestContext), any(URI.class)); sdncChangeAssignTasks.changeModelVnf(execution); @@ -90,7 +90,7 @@ public class SDNCChangeAssignTasksTest extends BaseTaskTest { } @Test - public void changeModelVnfExceptionTest() throws Exception { + public void changeModelVnfExceptionTest() { expectedException.expect(BpmnError.class); doThrow(RuntimeException.class).when(sdncVnfResources).changeModelVnf(eq(genericVnf), eq(serviceInstance), eq(customer), eq(cloudRegion), eq(requestContext), any(URI.class)); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCDeactivateTaskTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCDeactivateTaskTest.java index 3714f9d9a9..8947fc8008 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCDeactivateTaskTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCDeactivateTaskTest.java @@ -144,7 +144,7 @@ public class SDNCDeactivateTaskTest extends BaseTaskTest { } @Test - public void test_deactivateNetwork() throws Exception { + public void test_deactivateNetwork() { doReturn(new GenericResourceApiNetworkOperationInformation()).when(sdncNetworkResources) .deactivateNetwork(network, serviceInstance, customer, requestContext, cloudRegion); sdncDeactivateTasks.deactivateNetwork(execution); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasksTest.java index e158925568..2e68dce0a5 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasksTest.java @@ -184,7 +184,7 @@ public class SDNCQueryTasksTest extends BaseTaskTest { } @Test - public void queryVfModuleForVolumeGroupNoSelfLinkExceptionTest() throws Exception { + public void queryVfModuleForVolumeGroupNoSelfLinkExceptionTest() { expectedException.expect(BpmnError.class); vfModule.setSelflink(""); @@ -203,7 +203,7 @@ public class SDNCQueryTasksTest extends BaseTaskTest { } @Test - public void queryVfModuleForVolumeGroupNonVfObjectExceptionTest() throws Exception { + public void queryVfModuleForVolumeGroupNonVfObjectExceptionTest() { expectedException.expect(BpmnError.class); sdncQueryTasks.queryVfModuleForVolumeGroup(execution); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCRequestTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCRequestTasksTest.java index 596d4ad159..c5e0ff9a0c 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCRequestTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCRequestTasksTest.java @@ -112,26 +112,26 @@ public class SDNCRequestTasksTest { } @Test - public void convertIndicatorToBoolean_True_Test() throws MapperException, BadResponseException { + public void convertIndicatorToBoolean_True_Test() { boolean testValue = sndcRequestTasks.convertIndicatorToBoolean("Y"); assertEquals(true, testValue); } @Test - public void convertIndicatorToBoolean_False_Test() throws MapperException, BadResponseException { + public void convertIndicatorToBoolean_False_Test() { boolean testValue = sndcRequestTasks.convertIndicatorToBoolean("N"); assertEquals(false, testValue); } @Test - public void HandleTimeout_Test() throws MapperException, BadResponseException { + public void HandleTimeout_Test() { doReturn("processKey").when(exceptionBuilder).getProcessKey(delegateExecution); expectedException.expect(BpmnError.class); sndcRequestTasks.handleTimeOutException(delegateExecution); } @Test - public void processCallBack_Final_Test() throws MapperException, BadResponseException, IOException { + public void processCallBack_Final_Test() throws IOException { final String sdncResponse = new String(Files.readAllBytes(Paths.get("src/test/resources/__files/SDNC_Async_Request2.xml"))); delegateExecution.setVariable("correlationName_MESSAGE", sdncResponse); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasksTest.java index 98f6bfab9c..37b9bd4f52 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasksTest.java @@ -86,7 +86,7 @@ public class SDNCUnassignTasksTest extends BaseTaskTest { } @Test - public void unassignServiceInstanceTest() throws Exception { + public void unassignServiceInstanceTest() { doReturn(new GenericResourceApiServiceOperationInformation()).when(sdncServiceInstanceResources) .unassignServiceInstance(serviceInstance, customer, requestContext); sdncUnassignTasks.unassignServiceInstance(execution); @@ -97,7 +97,7 @@ public class SDNCUnassignTasksTest extends BaseTaskTest { } @Test - public void unassignServiceInstanceExceptionTest() throws Exception { + public void unassignServiceInstanceExceptionTest() { expectedException.expect(BpmnError.class); doThrow(RuntimeException.class).when(sdncServiceInstanceResources).unassignServiceInstance(serviceInstance, customer, requestContext); @@ -124,7 +124,7 @@ public class SDNCUnassignTasksTest extends BaseTaskTest { } @Test - public void unassignVnfTest() throws Exception { + public void unassignVnfTest() { doReturn(new GenericResourceApiVnfOperationInformation()).when(sdncVnfResources).unassignVnf(eq(genericVnf), eq(serviceInstance), eq(customer), eq(cloudRegion), eq(requestContext), any(URI.class)); sdncUnassignTasks.unassignVnf(execution); @@ -135,7 +135,7 @@ public class SDNCUnassignTasksTest extends BaseTaskTest { } @Test - public void unassignVnfExceptionTest() throws Exception { + public void unassignVnfExceptionTest() { expectedException.expect(BpmnError.class); doThrow(RuntimeException.class).when(sdncVnfResources).unassignVnf(eq(genericVnf), eq(serviceInstance), eq(customer), eq(cloudRegion), eq(requestContext), any(URI.class)); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/service/level/ServiceLevelPreparationTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/service/level/ServiceLevelPreparationTest.java index 0b1c5b0f5e..a16fb88a4a 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/service/level/ServiceLevelPreparationTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/service/level/ServiceLevelPreparationTest.java @@ -101,7 +101,7 @@ public class ServiceLevelPreparationTest extends BaseTaskTest { } @Test - public void validateFailureParamsForPnfTest() throws Exception { + public void validateFailureParamsForPnfTest() { invalidExecution.removeVariable(BPMN_REQUEST); // BPMN exception is thrown in case of validation failure or invalid execution thrown.expect(BpmnError.class); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/FlowCompletionTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/FlowCompletionTasksTest.java index 132b8774b3..0970ff755a 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/FlowCompletionTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/FlowCompletionTasksTest.java @@ -44,7 +44,7 @@ public class FlowCompletionTasksTest extends BaseTaskTest { } @Test - public void updateRequestDbStatusComplete_Test() throws Exception { + public void updateRequestDbStatusComplete_Test() { InfraActiveRequests mockedRequest = new InfraActiveRequests(); when(requestsDbClient.getInfraActiveRequestbyRequestId(any(String.class))).thenReturn(mockedRequest); doNothing().when(requestsDbClient).updateInfraActiveRequests(any(InfraActiveRequests.class)); @@ -54,7 +54,7 @@ public class FlowCompletionTasksTest extends BaseTaskTest { } @Test - public void updateRequestDbStatusFailed_Test() throws Exception { + public void updateRequestDbStatusFailed_Test() { WorkflowException workflowException = new WorkflowException("testProcessKey", 7000, "Error"); execution.setVariable("WorkflowException", workflowException); InfraActiveRequests mockedRequest = new InfraActiveRequests(); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java index 2e4d99f9c6..007d696d2e 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java @@ -668,7 +668,7 @@ public class WorkflowActionBBTasksTest extends BaseTaskTest { } @Test - public void postProcessingExecuteBBActivateVfModuleNotReplaceInstanceTest() throws CloneNotSupportedException { + public void postProcessingExecuteBBActivateVfModuleNotReplaceInstanceTest() { WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds(); workflowResourceIds.setServiceInstanceId("1"); workflowResourceIds.setVnfId("1"); @@ -733,8 +733,7 @@ public class WorkflowActionBBTasksTest extends BaseTaskTest { } @Test - public void postProcessingExecuteBBActivateVfModuleReplaceInstanceHasConfigurationTest() - throws CloneNotSupportedException { + public void postProcessingExecuteBBActivateVfModuleReplaceInstanceHasConfigurationTest() { RequestDetails reqDetails = new RequestDetails(); RelatedInstanceList[] list = new RelatedInstanceList[2]; RelatedInstanceList vnfList = new RelatedInstanceList(); @@ -826,8 +825,7 @@ public class WorkflowActionBBTasksTest extends BaseTaskTest { } @Test - public void postProcessingExecuteBBActivateVfModuleReplaceInstanceHasNoConfigurationTest() - throws CloneNotSupportedException { + public void postProcessingExecuteBBActivateVfModuleReplaceInstanceHasNoConfigurationTest() { WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds(); workflowResourceIds.setServiceInstanceId("1"); @@ -889,7 +887,7 @@ public class WorkflowActionBBTasksTest extends BaseTaskTest { @Test - public void getExecuteBBForConfigTest() throws CloneNotSupportedException { + public void getExecuteBBForConfigTest() { BuildingBlock bbActivateVfModule = new BuildingBlock().setBpmnFlowName("ActivateVfModuleBB"); ExecuteBuildingBlock ebbActivateVfModule = new ExecuteBuildingBlock().setBuildingBlock(bbActivateVfModule); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksUpdateReqDbTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksUpdateReqDbTest.java index 73aace7592..cab52f5f9f 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksUpdateReqDbTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksUpdateReqDbTest.java @@ -65,7 +65,7 @@ public class WorkflowActionBBTasksUpdateReqDbTest extends BaseTaskTest { } @Test - public void getUpdatedRequestTest() throws Exception { + public void getUpdatedRequestTest() { List flowsToExecute = new ArrayList(); BuildingBlock bb1 = new BuildingBlock().setBpmnFlowName("CreateNetworkBB"); ExecuteBuildingBlock ebb1 = new ExecuteBuildingBlock().setBuildingBlock(bb1); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java index c6015cd45c..d66643ae09 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java @@ -45,7 +45,6 @@ import static org.mockito.Mockito.when; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.IOException; -import java.net.MalformedURLException; import java.nio.file.Files; import java.nio.file.Paths; import java.util.ArrayList; @@ -2086,7 +2085,7 @@ public class WorkflowActionTest extends BaseTaskTest { } @Test - public void sortExecutionPathByObjectForVlanTaggingCreateTest() throws Exception { + public void sortExecutionPathByObjectForVlanTaggingCreateTest() { List executeFlows = new ArrayList<>(); BuildingBlock bb = new BuildingBlock().setBpmnFlowName("AssignNetworkBB").setKey("0"); @@ -2120,7 +2119,7 @@ public class WorkflowActionTest extends BaseTaskTest { } @Test - public void sortExecutionPathByObjectForVlanTaggingDeleteTest() throws Exception { + public void sortExecutionPathByObjectForVlanTaggingDeleteTest() { List executeFlows = new ArrayList<>(); BuildingBlock bb = new BuildingBlock().setBpmnFlowName("DeactivateNetworkBB").setKey("0"); @@ -2154,7 +2153,7 @@ public class WorkflowActionTest extends BaseTaskTest { } @Test - public void queryNorthBoundRequestCatalogDbNestedTest() throws MalformedURLException { + public void queryNorthBoundRequestCatalogDbNestedTest() { NorthBoundRequest northBoundRequest = new NorthBoundRequest(); List orchFlows = createFlowList("AAICheckVnfInMaintBB", "AAISetVnfInMaintBB", "VNF-Macro-Replace", "SDNOVnfHealthCheckBB", "AAIUnsetVnfInMaintBB"); @@ -2180,7 +2179,7 @@ public class WorkflowActionTest extends BaseTaskTest { } @Test - public void queryNorthBoundRequestCatalogDbTransportTest() throws MalformedURLException { + public void queryNorthBoundRequestCatalogDbTransportTest() { NorthBoundRequest northBoundRequest = new NorthBoundRequest(); List orchFlows = createFlowList("AssignServiceInstanceBB"); northBoundRequest.setOrchestrationFlowList(orchFlows); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ebb/loader/ServiceEBBLoaderTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ebb/loader/ServiceEBBLoaderTest.java index 2d41a24ac3..fc8cc57023 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ebb/loader/ServiceEBBLoaderTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ebb/loader/ServiceEBBLoaderTest.java @@ -103,7 +103,7 @@ public class ServiceEBBLoaderTest extends BaseTaskTest { private BBInputSetup mockBbInputSetup; @Before - public void before() throws Exception { + public void before() { execution = new DelegateExecutionFake(); mockUserParamsServiceTraversal = mock(UserParamsServiceTraversal.class); mockCatalogDbClient = mock(CatalogDbClient.class); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ebb/loader/UserParamsServiceTraversalTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ebb/loader/UserParamsServiceTraversalTest.java index cf6588e113..bf2efbd237 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ebb/loader/UserParamsServiceTraversalTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ebb/loader/UserParamsServiceTraversalTest.java @@ -74,7 +74,7 @@ public class UserParamsServiceTraversalTest extends BaseTaskTest { private String requestAction; @Before - public void before() throws Exception { + public void before() { execution = new DelegateExecutionFake(); mockCatalogDbClient = mock(CatalogDbClient.class); userParamsServiceTraversal = new UserParamsServiceTraversal(mockCatalogDbClient, mock(ExceptionBuilder.class)); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ebb/loader/VrfValidationTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ebb/loader/VrfValidationTest.java index dcccb74f58..cdf6324c67 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ebb/loader/VrfValidationTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ebb/loader/VrfValidationTest.java @@ -49,8 +49,6 @@ import org.onap.so.bpmn.infrastructure.workflow.tasks.VrfBondingServiceException import org.onap.so.db.catalog.beans.ConfigurationResourceCustomization; import org.onap.so.db.catalog.beans.Service; import org.onap.so.db.catalog.beans.ServiceProxyResourceCustomization; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; public class VrfValidationTest extends BaseTaskTest { @@ -64,7 +62,7 @@ public class VrfValidationTest extends BaseTaskTest { public ExpectedException exceptionRule = ExpectedException.none(); @Before - public void before() throws Exception { + public void before() { vrfValidation.setBbInputSetupUtils(bbSetupUtils); } @@ -199,8 +197,7 @@ public class VrfValidationTest extends BaseTaskTest { } @Test - public void testAaiRouteTargetValidation() - throws VrfBondingServiceException, JsonParseException, JsonMappingException, IOException { + public void testAaiRouteTargetValidation() throws VrfBondingServiceException, IOException { L3Network l3Network = mapper.readValue( new File("src/test/resources/__files/BuildingBlocks/aaiNetworkWrapper.json"), L3Network.class); AAIResultWrapper networkWrapper = new AAIResultWrapper(l3Network); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java index 1e58a83f0a..51a066ee09 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java @@ -104,7 +104,7 @@ public class AAIObjectMapperTest { } @Test - public void mapVolumeGroupTest() throws Exception { + public void mapVolumeGroupTest() { VolumeGroup volumeGroup = new VolumeGroup(); volumeGroup.setHeatStackId("heatStackId"); volumeGroup.setModelInfoVfModule(new ModelInfoVfModule()); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapperTest.java index 7ff784815b..da97da2848 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapperTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapperTest.java @@ -23,7 +23,6 @@ import static com.shazam.shazamcrest.MatcherAssert.assertThat; import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.doReturn; -import java.io.UnsupportedEncodingException; import java.nio.file.Files; import java.nio.file.Paths; import java.util.ArrayList; @@ -95,7 +94,7 @@ public class NetworkAdapterObjectMapperTest extends TestDataSetup { } @Test - public void buildCreateNetworkRequestFromBbobjectTest() throws Exception { + public void buildCreateNetworkRequestFromBbobjectTest() { String cloudRegionPo = "cloudRegionPo"; CreateNetworkRequest expectedCreateNetworkRequest = new CreateNetworkRequest(); @@ -146,7 +145,7 @@ public class NetworkAdapterObjectMapperTest extends TestDataSetup { } @Test - public void createNetworkRollbackRequestMapperTest() throws Exception { + public void createNetworkRollbackRequestMapperTest() { String cloudRegionPo = "cloudRegionPo"; RollbackNetworkRequest expectedRollbackNetworkRequest = new RollbackNetworkRequest(); @@ -173,7 +172,7 @@ public class NetworkAdapterObjectMapperTest extends TestDataSetup { } @Test - public void updateNetworkRequestMapperTest() throws UnsupportedEncodingException { + public void updateNetworkRequestMapperTest() { org.onap.so.openstack.beans.Subnet subnet = new org.onap.so.openstack.beans.Subnet(); subnet.setSubnetId("subnetId"); subnet.setGatewayIp("NULL"); @@ -275,7 +274,7 @@ public class NetworkAdapterObjectMapperTest extends TestDataSetup { } @Test - public void deleteNetworkRequestMapperTest() throws Exception { + public void deleteNetworkRequestMapperTest() { DeleteNetworkRequest expectedDeleteNetworkRequest = new DeleteNetworkRequest(); String messageId = "messageId"; @@ -317,7 +316,7 @@ public class NetworkAdapterObjectMapperTest extends TestDataSetup { } @Test - public void deleteNetworkRequestNoHeatIdMapperTest() throws Exception { + public void deleteNetworkRequestNoHeatIdMapperTest() { DeleteNetworkRequest expectedDeleteNetworkRequest = new DeleteNetworkRequest(); String messageId = "messageId"; diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/VnfVolumeAdapterRestPropertiesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/VnfVolumeAdapterRestPropertiesTest.java index 63c73322a5..430b1f6917 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/VnfVolumeAdapterRestPropertiesTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/VnfVolumeAdapterRestPropertiesTest.java @@ -21,7 +21,6 @@ package org.onap.so.client.adapter.vnf; import static org.junit.Assert.assertEquals; -import java.net.MalformedURLException; import org.junit.Test; public class VnfVolumeAdapterRestPropertiesTest { @@ -38,7 +37,7 @@ public class VnfVolumeAdapterRestPropertiesTest { } @Test - public void testGetUrl() throws MalformedURLException { + public void testGetUrl() { assertEquals("mso.adapters.volume-groups.rest.endpoint", VnfVolumeAdapterRestProperties.endpointProp); } } diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/namingservice/NamingClientIT.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/namingservice/NamingClientIT.java index 0e99f8a9be..f016041cc9 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/namingservice/NamingClientIT.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/namingservice/NamingClientIT.java @@ -39,7 +39,6 @@ import org.onap.namingservice.model.NameGenRequest; import org.onap.so.BaseIntegrationTest; import org.onap.so.client.exception.BadResponseException; import org.springframework.beans.factory.annotation.Autowired; -import com.fasterxml.jackson.core.JsonProcessingException; public class NamingClientIT extends BaseIntegrationTest { @Autowired @@ -93,7 +92,7 @@ public class NamingClientIT extends BaseIntegrationTest { client.deleteNameGenRequest(unassignSetup()); } - public NameGenRequest assignSetup() throws JsonProcessingException { + public NameGenRequest assignSetup() { NameGenRequest request = new NameGenRequest(); List elements = new ArrayList<>(); Element testElement = new Element(); @@ -104,7 +103,7 @@ public class NamingClientIT extends BaseIntegrationTest { return request; } - public NameGenDeleteRequest unassignSetup() throws JsonProcessingException { + public NameGenDeleteRequest unassignSetup() { NameGenDeleteRequest request = new NameGenDeleteRequest(); List deleteElements = new ArrayList<>(); Deleteelement testElement = new Deleteelement(); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/namingservice/NamingRequestUtilsTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/namingservice/NamingRequestUtilsTest.java index 5fdb790405..d3278d0de6 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/namingservice/NamingRequestUtilsTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/namingservice/NamingRequestUtilsTest.java @@ -102,7 +102,7 @@ public class NamingRequestUtilsTest extends BaseTaskTest { } @Test - public void checkNamingPolicyAndAndEcompGeneratedNamingFalse1Test() throws BBObjectNotFoundException { + public void checkNamingPolicyAndAndEcompGeneratedNamingFalse1Test() { doReturn(null).when(modelInfoServiceInstanceMock).getNamingPolicy(); doReturn(true).when(modelInfoServiceInstanceMock).getOnapGeneratedNaming(); namingServiceUtils.checkNamingPolicyAndOnapGeneratedNaming(execution); @@ -110,7 +110,7 @@ public class NamingRequestUtilsTest extends BaseTaskTest { } @Test - public void checkNamingPolicyAndAndEcompGeneratedNamingFalse2Test() throws BBObjectNotFoundException { + public void checkNamingPolicyAndAndEcompGeneratedNamingFalse2Test() { doReturn("testNaminPolicy").when(modelInfoServiceInstanceMock).getNamingPolicy(); doReturn(false).when(modelInfoServiceInstanceMock).getOnapGeneratedNaming(); namingServiceUtils.checkNamingPolicyAndOnapGeneratedNaming(execution); @@ -118,7 +118,7 @@ public class NamingRequestUtilsTest extends BaseTaskTest { } @Test - public void checkNamingPolicyAndAndEcompGeneratedNamingFalse3Test() throws BBObjectNotFoundException { + public void checkNamingPolicyAndAndEcompGeneratedNamingFalse3Test() { doReturn("").when(modelInfoServiceInstanceMock).getNamingPolicy(); doReturn(false).when(modelInfoServiceInstanceMock).getOnapGeneratedNaming(); namingServiceUtils.checkNamingPolicyAndOnapGeneratedNaming(execution); @@ -126,7 +126,7 @@ public class NamingRequestUtilsTest extends BaseTaskTest { } @Test - public void checkNamingPolicyAndAndEcompGeneratedNamingFalse4Test() throws BBObjectNotFoundException { + public void checkNamingPolicyAndAndEcompGeneratedNamingFalse4Test() { doReturn("bonding").when(modelInfoServiceInstanceMock).getNamingPolicy(); doReturn(null).when(modelInfoServiceInstanceMock).getOnapGeneratedNaming(); namingServiceUtils.checkNamingPolicyAndOnapGeneratedNaming(execution); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAICollectionResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAICollectionResourcesTest.java index fcd44e137b..562cbe0293 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAICollectionResourcesTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAICollectionResourcesTest.java @@ -50,7 +50,7 @@ public class AAICollectionResourcesTest extends BaseTaskTest { } @Test - public void createCollectionTest() throws Exception { + public void createCollectionTest() { networkCollection.setOrchestrationStatus(OrchestrationStatus.PRECREATED); doReturn(new org.onap.aai.domain.yang.Collection()).when(MOCK_aaiObjectMapper).mapCollection(networkCollection); @@ -64,7 +64,7 @@ public class AAICollectionResourcesTest extends BaseTaskTest { } @Test - public void updateCollectionTest() throws Exception { + public void updateCollectionTest() { doReturn(new org.onap.aai.domain.yang.Collection()).when(MOCK_aaiObjectMapper).mapCollection(networkCollection); aaiCollectionResources.updateCollection(networkCollection); verify(MOCK_aaiResourcesClient, times(1)).update( @@ -74,7 +74,7 @@ public class AAICollectionResourcesTest extends BaseTaskTest { } @Test - public void deleteCollectionTest() throws Exception { + public void deleteCollectionTest() { aaiCollectionResources.deleteCollection(networkCollection); verify(MOCK_aaiResourcesClient, times(1)).delete(eq( AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().collection(networkCollection.getId())))); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java index 11694ff83f..6ec96abb78 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java @@ -181,7 +181,7 @@ public class AAIConfigurationResourcesTest extends TestDataSetup { } @Test - public void connectVrfConfigurationToVnrConfigurationTest() throws Exception { + public void connectVrfConfigurationToVnrConfigurationTest() { Configuration vrfConfiguration = buildConfiguration(); Configuration vnrConfiguration = buildConfiguration(); doNothing().when(MOCK_aaiResourcesClient).connect(isA(AAIResourceUri.class), isA(AAIResourceUri.class)); @@ -191,7 +191,7 @@ public class AAIConfigurationResourcesTest extends TestDataSetup { } @Test - public void connectConfigurationToPnfObjectTest() throws Exception { + public void connectConfigurationToPnfObjectTest() { doNothing().when(MOCK_aaiResourcesClient).connect(isA(AAIResourceUri.class), isA(AAIResourceUri.class)); Pnf primaryPnf = serviceProxy.getServiceInstance().getPnfs().stream().filter(o -> o.getRole().equals("Primary")) @@ -222,7 +222,7 @@ public class AAIConfigurationResourcesTest extends TestDataSetup { } @Test - public void updateOrchestrationStatusConfigurationTest() throws Exception { + public void updateOrchestrationStatusConfigurationTest() { configuration.setOrchestrationStatus(OrchestrationStatus.ACTIVE); doNothing().when(MOCK_aaiResourcesClient).update(isA(AAIResourceUri.class), isA(org.onap.aai.domain.yang.Configuration.class)); @@ -232,7 +232,7 @@ public class AAIConfigurationResourcesTest extends TestDataSetup { } @Test - public void updateConfigurationOrchestrationStatusTest() throws Exception { + public void updateConfigurationOrchestrationStatusTest() { doNothing().when(MOCK_aaiResourcesClient).update(isA(AAIResourceUri.class), isA(org.onap.aai.domain.yang.Configuration.class)); aaiConfigurationResources.updateConfigurationOrchestrationStatus(configuration, OrchestrationStatus.ACTIVE); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIInstanceGroupResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIInstanceGroupResourcesTest.java index b2978e6e62..a8e0dfb440 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIInstanceGroupResourcesTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIInstanceGroupResourcesTest.java @@ -77,7 +77,7 @@ public class AAIInstanceGroupResourcesTest extends TestDataSetup { } @Test - public void createInstanceGroupTest() throws Exception { + public void createInstanceGroupTest() { doReturn(new org.onap.aai.domain.yang.InstanceGroup()).when(MOCK_aaiObjectMapper) .mapInstanceGroup(instanceGroup); aaiInstanceGroupResources.createInstanceGroup(instanceGroup); @@ -88,14 +88,14 @@ public class AAIInstanceGroupResourcesTest extends TestDataSetup { } @Test - public void deleteInstanceGroupTest() throws Exception { + public void deleteInstanceGroupTest() { aaiInstanceGroupResources.deleteInstanceGroup(instanceGroup); verify(MOCK_aaiResourcesClient, times(1)).delete(eq( AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroup.getId())))); } @Test - public void connectInstanceGroupTest() throws Exception { + public void connectInstanceGroupTest() { aaiInstanceGroupResources.connectInstanceGroupToVnf(instanceGroup, vnf); verify(MOCK_aaiResourcesClient, times(1)).connect( eq(AAIUriFactory @@ -104,7 +104,7 @@ public class AAIInstanceGroupResourcesTest extends TestDataSetup { } @Test - public void connectInstanceGroupWithEdgeTest() throws Exception { + public void connectInstanceGroupWithEdgeTest() { aaiInstanceGroupResources.connectInstanceGroupToVnf(instanceGroup, vnf, AAIEdgeLabel.BELONGS_TO); verify(MOCK_aaiResourcesClient, times(1)).connect( eq(AAIUriFactory @@ -114,7 +114,7 @@ public class AAIInstanceGroupResourcesTest extends TestDataSetup { } @Test - public void existsTest() throws Exception { + public void existsTest() { aaiInstanceGroupResources.exists(instanceGroup); verify(MOCK_aaiResourcesClient, times(1)).exists(eq( AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroup.getId())))); @@ -136,7 +136,7 @@ public class AAIInstanceGroupResourcesTest extends TestDataSetup { } @Test - public void checkInstanceGroupNameInUseTrueTest() throws Exception { + public void checkInstanceGroupNameInUseTrueTest() { AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().instanceGroups()) .queryParam("instance-group-name", "instanceGroupName"); doReturn(true).when(MOCK_aaiResourcesClient).exists(eq(uri)); @@ -145,7 +145,7 @@ public class AAIInstanceGroupResourcesTest extends TestDataSetup { } @Test - public void checkInstanceGroupNameInUseFalseTest() throws Exception { + public void checkInstanceGroupNameInUseFalseTest() { AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().instanceGroups()) .queryParam("instance-group-name", "instanceGroupName"); doReturn(false).when(MOCK_aaiResourcesClient).exists(eq(uri)); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAINetworkResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAINetworkResourcesTest.java index 535a159e10..8197d4751e 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAINetworkResourcesTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAINetworkResourcesTest.java @@ -115,7 +115,7 @@ public class AAINetworkResourcesTest extends TestDataSetup { @Test - public void updateNetworkTest() throws Exception { + public void updateNetworkTest() { network.setOrchestrationStatus(OrchestrationStatus.ASSIGNED); @@ -131,7 +131,7 @@ public class AAINetworkResourcesTest extends TestDataSetup { } @Test - public void createNetworkConnectToServiceInstanceTest() throws Exception { + public void createNetworkConnectToServiceInstanceTest() { network.setOrchestrationStatus(OrchestrationStatus.PRECREATED); @@ -149,7 +149,7 @@ public class AAINetworkResourcesTest extends TestDataSetup { } @Test - public void deleteNetworkTest() throws Exception { + public void deleteNetworkTest() { network.setOrchestrationStatus(OrchestrationStatus.INVENTORIED); @@ -283,7 +283,7 @@ public class AAINetworkResourcesTest extends TestDataSetup { } @Test - public void createNetworkCollectionTest() throws Exception { + public void createNetworkCollectionTest() { doNothing().when(MOCK_aaiResourcesClient).create(isA(AAIResourceUri.class), isA(org.onap.aai.domain.yang.Collection.class)); @@ -297,7 +297,7 @@ public class AAINetworkResourcesTest extends TestDataSetup { } @Test - public void createNetworkInstanceGroupTest() throws Exception { + public void createNetworkInstanceGroupTest() { doReturn(new org.onap.aai.domain.yang.InstanceGroup()).when(MOCK_aaiObjectMapper) .mapInstanceGroup(instanceGroup); doNothing().when(MOCK_aaiResourcesClient).create(isA(AAIResourceUri.class), @@ -308,7 +308,7 @@ public class AAINetworkResourcesTest extends TestDataSetup { } @Test - public void connectNetworkToNetworkCollectionInstanceGroupTest() throws Exception { + public void connectNetworkToNetworkCollectionInstanceGroupTest() { aaiNetworkResources.connectNetworkToNetworkCollectionInstanceGroup(network, instanceGroup); verify(MOCK_aaiResourcesClient, times(1)).connect( eq(AAIUriFactory @@ -317,14 +317,14 @@ public class AAINetworkResourcesTest extends TestDataSetup { } @Test - public void connectNetworkToNetworkCollectionServiceInstanceTest() throws Exception { + public void connectNetworkToNetworkCollectionServiceInstanceTest() { aaiNetworkResources.connectNetworkToNetworkCollectionServiceInstance(network, serviceInstance); verify(MOCK_aaiResourcesClient, times(1)).connect(any(AAIResourceUri.class), eq(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(network.getNetworkId())))); } @Test - public void connectNetworkToCloudRegionTest() throws Exception { + public void connectNetworkToCloudRegionTest() { aaiNetworkResources.connectNetworkToCloudRegion(network, cloudRegion); verify(MOCK_aaiResourcesClient, times(1)).connect( eq(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(network.getNetworkId()))), @@ -333,7 +333,7 @@ public class AAINetworkResourcesTest extends TestDataSetup { } @Test - public void connectNetworkToTenantTest() throws Exception { + public void connectNetworkToTenantTest() { aaiNetworkResources.connectNetworkToTenant(network, cloudRegion); verify(MOCK_aaiResourcesClient, times(1)).connect( eq(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure() @@ -344,7 +344,7 @@ public class AAINetworkResourcesTest extends TestDataSetup { } @Test - public void connectNetworkCollectionInstanceGroupToNetworkCollectionTest() throws Exception { + public void connectNetworkCollectionInstanceGroupToNetworkCollectionTest() { aaiNetworkResources.connectNetworkCollectionInstanceGroupToNetworkCollection(instanceGroup, collection); verify(MOCK_aaiResourcesClient, times(1)).connect( eq(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().collection(collection.getId()))), @@ -353,27 +353,27 @@ public class AAINetworkResourcesTest extends TestDataSetup { } @Test - public void connectNetworkCollectionToServiceInstanceTest() throws Exception { + public void connectNetworkCollectionToServiceInstanceTest() { aaiNetworkResources.connectNetworkCollectionToServiceInstance(collection, serviceInstance); verify(MOCK_aaiResourcesClient, times(1)).connect(any(AAIResourceUri.class), any(AAIResourceUri.class)); } @Test - public void deleteCollectionTest() throws Exception { + public void deleteCollectionTest() { doNothing().when(MOCK_aaiResourcesClient).delete(isA(AAIResourceUri.class)); aaiNetworkResources.deleteCollection(collection); verify(MOCK_aaiResourcesClient, times(1)).delete(any(AAIResourceUri.class)); } @Test - public void deleteInstanceGroupTest() throws Exception { + public void deleteInstanceGroupTest() { doNothing().when(MOCK_aaiResourcesClient).delete(isA(AAIResourceUri.class)); aaiNetworkResources.deleteNetworkInstanceGroup(instanceGroup); verify(MOCK_aaiResourcesClient, times(1)).delete(any(AAIResourceUri.class)); } @Test - public void updateSubnetTest() throws Exception { + public void updateSubnetTest() { doReturn(new org.onap.aai.domain.yang.Subnet()).when(MOCK_aaiObjectMapper).mapSubnet(subnet); doNothing().when(MOCK_aaiResourcesClient).update(isA(AAIResourceUri.class), @@ -386,7 +386,7 @@ public class AAINetworkResourcesTest extends TestDataSetup { } @Test - public void connectInstanceGroupToCloudRegionTest() throws Exception { + public void connectInstanceGroupToCloudRegionTest() { aaiNetworkResources.connectInstanceGroupToCloudRegion(instanceGroup, cloudRegion); verify(MOCK_aaiResourcesClient, times(1)).connect( eq(AAIUriFactory @@ -416,7 +416,7 @@ public class AAINetworkResourcesTest extends TestDataSetup { } @Test - public void createNetworkPolicyTest() throws Exception { + public void createNetworkPolicyTest() { doNothing().when(MOCK_aaiResourcesClient).create(isA(AAIResourceUri.class), isA(org.onap.aai.domain.yang.NetworkPolicy.class)); doReturn(new org.onap.aai.domain.yang.NetworkPolicy()).when(MOCK_aaiObjectMapper) @@ -427,14 +427,14 @@ public class AAINetworkResourcesTest extends TestDataSetup { } @Test - public void deleteNetworkPolicyTest() throws Exception { + public void deleteNetworkPolicyTest() { doNothing().when(MOCK_aaiResourcesClient).delete(isA(AAIResourceUri.class)); aaiNetworkResources.deleteNetworkPolicy(networkPolicy.getNetworkPolicyId()); verify(MOCK_aaiResourcesClient, times(1)).delete(any(AAIResourceUri.class)); } @Test - public void checkInstanceGroupNameInUseTrueTest() throws Exception { + public void checkInstanceGroupNameInUseTrueTest() { AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Networks()) .queryParam("network-name", "networkName"); doReturn(true).when(MOCK_aaiResourcesClient).exists(eq(uri)); @@ -443,7 +443,7 @@ public class AAINetworkResourcesTest extends TestDataSetup { } @Test - public void checkInstanceGroupNameInUseFalseTest() throws Exception { + public void checkInstanceGroupNameInUseFalseTest() { AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Networks()) .queryParam("network-name", "networkName"); doReturn(false).when(MOCK_aaiResourcesClient).exists(eq(uri)); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIServiceInstanceResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIServiceInstanceResourcesTest.java index 8ccb46257d..5de1195a00 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIServiceInstanceResourcesTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIServiceInstanceResourcesTest.java @@ -86,13 +86,13 @@ public class AAIServiceInstanceResourcesTest extends TestDataSetup { } @Test - public void deleteServiceInstanceSuccessTest() throws Exception { + public void deleteServiceInstanceSuccessTest() { aaiServiceInstanceResources.deleteServiceInstance(serviceInstance); verify(MOCK_aaiResourcesClient, times(1)).delete(any(AAIResourceUri.class)); } @Test - public void deleteServiceInstanceExceptionTest() throws Exception { + public void deleteServiceInstanceExceptionTest() { expectedException.expect(Exception.class); doThrow(Exception.class).when(MOCK_aaiResourcesClient).delete(isA(AAIResourceUri.class)); aaiServiceInstanceResources.deleteServiceInstance(serviceInstance); @@ -194,7 +194,7 @@ public class AAIServiceInstanceResourcesTest extends TestDataSetup { } @Test - public void checkInstanceServiceNameInUseTrueTest() throws Exception { + public void checkInstanceServiceNameInUseTrueTest() { AAIPluralResourceUri uri = AAIUriFactory.createNodesUri(Types.SERVICE_INSTANCES.getFragment()) .queryParam("service-instance-name", serviceInstance.getServiceInstanceName()); doReturn(true).when(MOCK_aaiResourcesClient).exists(eq(uri)); @@ -203,7 +203,7 @@ public class AAIServiceInstanceResourcesTest extends TestDataSetup { } @Test - public void checkInstanceServiceNameInUseFalseTest() throws Exception { + public void checkInstanceServiceNameInUseFalseTest() { AAIPluralResourceUri uri = AAIUriFactory.createNodesUri(Types.SERVICE_INSTANCES.getFragment()) .queryParam("service-instance-name", serviceInstance.getServiceInstanceName()); doReturn(false).when(MOCK_aaiResourcesClient).exists(eq(uri)); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVfModuleResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVfModuleResourcesTest.java index 7cc628266b..03e7b59d27 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVfModuleResourcesTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVfModuleResourcesTest.java @@ -77,7 +77,7 @@ public class AAIVfModuleResourcesTest extends TestDataSetup { } @Test - public void updateOrchestrationStatusVfModuleTest() throws Exception { + public void updateOrchestrationStatusVfModuleTest() { vfModule.setOrchestrationStatus(OrchestrationStatus.ASSIGNED); doNothing().when(MOCK_aaiResourcesClient).update(isA(AAIResourceUri.class), @@ -91,7 +91,7 @@ public class AAIVfModuleResourcesTest extends TestDataSetup { } @Test - public void createVfModuleTest() throws Exception { + public void createVfModuleTest() { vfModule.setOrchestrationStatus(OrchestrationStatus.PRECREATED); doReturn(new org.onap.aai.domain.yang.VfModule()).when(MOCK_aaiObjectMapper).mapVfModule(vfModule); @@ -104,7 +104,7 @@ public class AAIVfModuleResourcesTest extends TestDataSetup { } @Test - public void deleteVfModuleTest() throws Exception { + public void deleteVfModuleTest() { doNothing().when(MOCK_aaiResourcesClient).delete(isA(AAIResourceUri.class)); aaiVfModuleResources.deleteVfModule(vfModule, vnf); @@ -113,7 +113,7 @@ public class AAIVfModuleResourcesTest extends TestDataSetup { } @Test - public void changeAssignVfModuleTest() throws Exception { + public void changeAssignVfModuleTest() { doNothing().when(MOCK_aaiResourcesClient).update(isA(AAIResourceUri.class), isA(org.onap.aai.domain.yang.VfModule.class)); @@ -123,7 +123,7 @@ public class AAIVfModuleResourcesTest extends TestDataSetup { } @Test - public void connectVfModuleToVolumeGroupTest() throws Exception { + public void connectVfModuleToVolumeGroupTest() { VolumeGroup volumeGroup = buildVolumeGroup(); volumeGroup.setOrchestrationStatus(OrchestrationStatus.ASSIGNED); @@ -134,7 +134,7 @@ public class AAIVfModuleResourcesTest extends TestDataSetup { } @Test - public void updateHeatStackIdVfModuleTest() throws Exception { + public void updateHeatStackIdVfModuleTest() { vfModule.setHeatStackId("testHeatStackId"); doNothing().when(MOCK_aaiResourcesClient).update(isA(AAIResourceUri.class), @@ -148,7 +148,7 @@ public class AAIVfModuleResourcesTest extends TestDataSetup { } @Test - public void updateContrailServiceInstanceFqdnVfModuleTest() throws Exception { + public void updateContrailServiceInstanceFqdnVfModuleTest() { vfModule.setContrailServiceInstanceFqdn("testContrailServiceInstanceFqdn"); doNothing().when(MOCK_aaiResourcesClient).update(isA(AAIResourceUri.class), @@ -162,7 +162,7 @@ public class AAIVfModuleResourcesTest extends TestDataSetup { } @Test - public void checkNameInUseTrueTest() throws Exception { + public void checkNameInUseTrueTest() { AAIPluralResourceUri vfModuleUri = AAIUriFactory.createNodesUri(Types.VF_MODULES.getFragment()) .queryParam("vf-module-name", vfModule.getVfModuleName()); AAIPluralResourceUri vfModuleUriWithCustomization = vfModuleUri.clone().queryParam("model-customization-id", @@ -174,7 +174,7 @@ public class AAIVfModuleResourcesTest extends TestDataSetup { } @Test - public void checkNameInUseFalseIsResumeTest() throws Exception { + public void checkNameInUseFalseIsResumeTest() { AAIPluralResourceUri vfModuleUri = AAIUriFactory.createNodesUri(Types.VF_MODULES.getFragment()) .queryParam("vf-module-name", vfModule.getVfModuleName()); AAIPluralResourceUri vfModuleUriWithCustomization = vfModuleUri.clone().queryParam("model-customization-id", @@ -185,7 +185,7 @@ public class AAIVfModuleResourcesTest extends TestDataSetup { } @Test - public void checkNameInUseFalseTest() throws Exception { + public void checkNameInUseFalseTest() { AAIPluralResourceUri vfModuleUri = AAIUriFactory.createNodesUri(Types.VF_MODULES.getFragment()) .queryParam("vf-module-name", vfModule.getVfModuleName()); AAIPluralResourceUri vfModuleUriWithCustomization = vfModuleUri.clone().queryParam("model-customization-id", diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVnfResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVnfResourcesTest.java index bdde1a1237..071a58f1df 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVnfResourcesTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVnfResourcesTest.java @@ -193,7 +193,7 @@ public class AAIVnfResourcesTest extends TestDataSetup { } @Test - public void connectVnfToTenantTest() throws Exception { + public void connectVnfToTenantTest() { aaiVnfResources.connectVnfToTenant(genericVnf, cloudRegion); verify(MOCK_aaiResourcesClient, times(1)).connect( eq(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure() @@ -203,7 +203,7 @@ public class AAIVnfResourcesTest extends TestDataSetup { } @Test - public void connectVnfToCloudRegionTest() throws Exception { + public void connectVnfToCloudRegionTest() { aaiVnfResources.connectVnfToCloudRegion(genericVnf, cloudRegion); verify(MOCK_aaiResourcesClient, times(1)).connect( eq(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(genericVnf.getVnfId()))), diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVolumeGroupResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVolumeGroupResourcesTest.java index ada59721fe..e121102329 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVolumeGroupResourcesTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVolumeGroupResourcesTest.java @@ -77,7 +77,7 @@ public class AAIVolumeGroupResourcesTest extends TestDataSetup { @Test - public void updateOrchestrationStatusVolumeGroupTest() throws Exception { + public void updateOrchestrationStatusVolumeGroupTest() { volumeGroup.setOrchestrationStatus(OrchestrationStatus.ASSIGNED); doNothing().when(MOCK_aaiResourcesClient).update(isA(AAIResourceUri.class), @@ -92,7 +92,7 @@ public class AAIVolumeGroupResourcesTest extends TestDataSetup { } @Test - public void createVolumeGroupTest() throws Exception { + public void createVolumeGroupTest() { volumeGroup.setOrchestrationStatus(OrchestrationStatus.PRECREATED); doNothing().when(MOCK_aaiResourcesClient).create(isA(AAIResourceUri.class), @@ -106,7 +106,7 @@ public class AAIVolumeGroupResourcesTest extends TestDataSetup { } @Test - public void connectVolumeGroupToVnfTest() throws Exception { + public void connectVolumeGroupToVnfTest() { volumeGroup.setOrchestrationStatus(OrchestrationStatus.ASSIGNED); @@ -118,7 +118,7 @@ public class AAIVolumeGroupResourcesTest extends TestDataSetup { } @Test - public void connectVolumeGroupToTenantTest() throws Exception { + public void connectVolumeGroupToTenantTest() { GenericVnf genericVnf = buildGenericVnf(); volumeGroup.setOrchestrationStatus(OrchestrationStatus.ASSIGNED); @@ -140,7 +140,7 @@ public class AAIVolumeGroupResourcesTest extends TestDataSetup { } @Test - public void updateHeatStackIdVolumeGroupTest() throws Exception { + public void updateHeatStackIdVolumeGroupTest() { volumeGroup.setHeatStackId("testVolumeHeatStackId"); doNothing().when(MOCK_aaiResourcesClient).update(isA(AAIResourceUri.class), diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/SDNCNetworkResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/SDNCNetworkResourcesTest.java index f86a712e33..d5053e0865 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/SDNCNetworkResourcesTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/SDNCNetworkResourcesTest.java @@ -38,8 +38,6 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer; import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext; -import org.onap.so.client.exception.BadResponseException; -import org.onap.so.client.exception.MapperException; import org.onap.so.client.sdnc.SDNCClient; import org.onap.so.client.sdnc.beans.SDNCSvcAction; import org.onap.so.client.sdnc.beans.SDNCSvcOperation; @@ -76,7 +74,7 @@ public class SDNCNetworkResourcesTest extends TestDataSetup { } @Test - public void assignNetworkTest() throws Exception { + public void assignNetworkTest() { doReturn(new GenericResourceApiNetworkOperationInformation()).when(MOCK_networkTopologyOperationRequestMapper) .reqMapper(SDNCSvcOperation.NETWORK_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN, GenericResourceApiRequestActionEnumeration.CREATENETWORKINSTANCE, network, serviceInstance, @@ -89,7 +87,7 @@ public class SDNCNetworkResourcesTest extends TestDataSetup { } @Test - public void rollbackAssignNetworkTest() throws Exception { + public void rollbackAssignNetworkTest() { doReturn(new GenericResourceApiNetworkOperationInformation()).when(MOCK_networkTopologyOperationRequestMapper) .reqMapper(SDNCSvcOperation.NETWORK_TOPOLOGY_OPERATION, SDNCSvcAction.UNASSIGN, GenericResourceApiRequestActionEnumeration.DELETENETWORKINSTANCE, network, serviceInstance, @@ -102,7 +100,7 @@ public class SDNCNetworkResourcesTest extends TestDataSetup { } @Test - public void activateNetworkTest() throws Exception { + public void activateNetworkTest() { doReturn(new GenericResourceApiNetworkOperationInformation()).when(MOCK_networkTopologyOperationRequestMapper) .reqMapper(SDNCSvcOperation.NETWORK_TOPOLOGY_OPERATION, SDNCSvcAction.ACTIVATE, GenericResourceApiRequestActionEnumeration.CREATENETWORKINSTANCE, network, serviceInstance, @@ -115,7 +113,7 @@ public class SDNCNetworkResourcesTest extends TestDataSetup { } @Test - public void deleteNetworkTest() throws Exception { + public void deleteNetworkTest() { doReturn(new GenericResourceApiNetworkOperationInformation()).when(MOCK_networkTopologyOperationRequestMapper) .reqMapper(SDNCSvcOperation.NETWORK_TOPOLOGY_OPERATION, SDNCSvcAction.DELETE, GenericResourceApiRequestActionEnumeration.DELETENETWORKINSTANCE, network, serviceInstance, @@ -128,7 +126,7 @@ public class SDNCNetworkResourcesTest extends TestDataSetup { } @Test - public void test_deactivateNetwork() throws MapperException, BadResponseException { + public void test_deactivateNetwork() { doReturn(new GenericResourceApiNetworkOperationInformation()).when(MOCK_networkTopologyOperationRequestMapper) .reqMapper(SDNCSvcOperation.NETWORK_TOPOLOGY_OPERATION, SDNCSvcAction.DEACTIVATE, GenericResourceApiRequestActionEnumeration.DELETENETWORKINSTANCE, network, serviceInstance, @@ -141,7 +139,7 @@ public class SDNCNetworkResourcesTest extends TestDataSetup { } @Test - public void changeAssignNetworkTest() throws MapperException, BadResponseException { + public void changeAssignNetworkTest() { doReturn(new GenericResourceApiNetworkOperationInformation()).when(MOCK_networkTopologyOperationRequestMapper) .reqMapper(SDNCSvcOperation.NETWORK_TOPOLOGY_OPERATION, SDNCSvcAction.CHANGE_ASSIGN, GenericResourceApiRequestActionEnumeration.CREATENETWORKINSTANCE, network, serviceInstance, @@ -154,7 +152,7 @@ public class SDNCNetworkResourcesTest extends TestDataSetup { } @Test - public void unassignNetwork_Test() throws Exception { + public void unassignNetwork_Test() { doReturn(new GenericResourceApiNetworkOperationInformation()).when(MOCK_networkTopologyOperationRequestMapper) .reqMapper(SDNCSvcOperation.NETWORK_TOPOLOGY_OPERATION, SDNCSvcAction.UNASSIGN, GenericResourceApiRequestActionEnumeration.DELETENETWORKINSTANCE, network, serviceInstance, diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/SDNCServiceInstanceResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/SDNCServiceInstanceResourcesTest.java index 4282b0d158..836db34d43 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/SDNCServiceInstanceResourcesTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/SDNCServiceInstanceResourcesTest.java @@ -39,8 +39,6 @@ import org.onap.so.bpmn.infrastructure.sdnc.mapper.ServiceTopologyOperationMappe import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext; -import org.onap.so.client.exception.BadResponseException; -import org.onap.so.client.exception.MapperException; import org.onap.so.client.sdnc.beans.SDNCSvcAction; import org.onap.so.client.sdnc.beans.SDNCSvcOperation; @@ -64,7 +62,7 @@ public class SDNCServiceInstanceResourcesTest extends TestDataSetup { } @Test - public void assignServiceInstanceSuccessTest() throws Exception { + public void assignServiceInstanceSuccessTest() { doReturn(new GenericResourceApiServiceOperationInformation()).when(MOCK_serviceTopologyOperationMapper) .reqMapper(eq(SDNCSvcOperation.SERVICE_TOPOLOGY_OPERATION), eq(SDNCSvcAction.ASSIGN), eq(GenericResourceApiRequestActionEnumeration.CREATESERVICEINSTANCE), @@ -76,7 +74,7 @@ public class SDNCServiceInstanceResourcesTest extends TestDataSetup { } @Test - public void assignServiceInstanceExceptionTest() throws Exception { + public void assignServiceInstanceExceptionTest() { expectedException.expect(Exception.class); doThrow(Exception.class).when(MOCK_serviceTopologyOperationMapper).reqMapper( eq(SDNCSvcOperation.SERVICE_TOPOLOGY_OPERATION), eq(SDNCSvcAction.ASSIGN), @@ -86,7 +84,7 @@ public class SDNCServiceInstanceResourcesTest extends TestDataSetup { } @Test - public void deleteServiceInstanceSuccessTest() throws Exception { + public void deleteServiceInstanceSuccessTest() { doReturn(new GenericResourceApiServiceOperationInformation()).when(MOCK_serviceTopologyOperationMapper) .reqMapper(eq(SDNCSvcOperation.SERVICE_TOPOLOGY_OPERATION), eq(SDNCSvcAction.DELETE), eq(GenericResourceApiRequestActionEnumeration.DELETESERVICEINSTANCE), @@ -98,7 +96,7 @@ public class SDNCServiceInstanceResourcesTest extends TestDataSetup { } @Test - public void deleteServiceInstanceExceptionTest() throws Exception { + public void deleteServiceInstanceExceptionTest() { expectedException.expect(Exception.class); doThrow(Exception.class).when(MOCK_serviceTopologyOperationMapper).reqMapper( eq(SDNCSvcOperation.SERVICE_TOPOLOGY_OPERATION), eq(SDNCSvcAction.DELETE), @@ -108,7 +106,7 @@ public class SDNCServiceInstanceResourcesTest extends TestDataSetup { } @Test - public void unassignServiceInstanceSuccessTest() throws Exception { + public void unassignServiceInstanceSuccessTest() { doReturn(new GenericResourceApiServiceOperationInformation()).when(MOCK_serviceTopologyOperationMapper) .reqMapper(eq(SDNCSvcOperation.SERVICE_TOPOLOGY_OPERATION), eq(SDNCSvcAction.DELETE), eq(GenericResourceApiRequestActionEnumeration.DELETESERVICEINSTANCE), @@ -120,7 +118,7 @@ public class SDNCServiceInstanceResourcesTest extends TestDataSetup { } @Test - public void unassignServiceInstanceExceptionTest() throws Exception { + public void unassignServiceInstanceExceptionTest() { expectedException.expect(Exception.class); doThrow(Exception.class).when(MOCK_serviceTopologyOperationMapper).reqMapper( eq(SDNCSvcOperation.SERVICE_TOPOLOGY_OPERATION), eq(SDNCSvcAction.DELETE), @@ -130,7 +128,7 @@ public class SDNCServiceInstanceResourcesTest extends TestDataSetup { } @Test - public void deactivateServiceInstanceSuccessTest() throws Exception { + public void deactivateServiceInstanceSuccessTest() { doReturn(new GenericResourceApiServiceOperationInformation()).when(MOCK_serviceTopologyOperationMapper) .reqMapper(eq(SDNCSvcOperation.SERVICE_TOPOLOGY_OPERATION), eq(SDNCSvcAction.DEACTIVATE), eq(GenericResourceApiRequestActionEnumeration.DELETESERVICEINSTANCE), @@ -142,7 +140,7 @@ public class SDNCServiceInstanceResourcesTest extends TestDataSetup { } @Test - public void deactivateServiceInstanceExceptionTest() throws Exception { + public void deactivateServiceInstanceExceptionTest() { expectedException.expect(Exception.class); doThrow(Exception.class).when(MOCK_serviceTopologyOperationMapper).reqMapper( eq(SDNCSvcOperation.SERVICE_TOPOLOGY_OPERATION), eq(SDNCSvcAction.DEACTIVATE), @@ -152,7 +150,7 @@ public class SDNCServiceInstanceResourcesTest extends TestDataSetup { } @Test - public void test_changeModelServiceInstance() throws MapperException, BadResponseException { + public void test_changeModelServiceInstance() { doReturn(new GenericResourceApiServiceOperationInformation()).when(MOCK_serviceTopologyOperationMapper) .reqMapper(eq(SDNCSvcOperation.SERVICE_TOPOLOGY_OPERATION), eq(SDNCSvcAction.CHANGE_ASSIGN), eq(GenericResourceApiRequestActionEnumeration.CREATESERVICEINSTANCE), diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/SDNCVfModuleResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/SDNCVfModuleResourcesTest.java index 4b5acbb7e0..d14bcaac75 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/SDNCVfModuleResourcesTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/SDNCVfModuleResourcesTest.java @@ -41,7 +41,6 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule; import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup; import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext; -import org.onap.so.client.exception.BadResponseException; import org.onap.so.client.exception.MapperException; import org.onap.so.client.sdnc.beans.SDNCSvcAction; import org.onap.so.client.sdnc.beans.SDNCSvcOperation;; @@ -131,7 +130,7 @@ public class SDNCVfModuleResourcesTest extends TestDataSetup { } @Test - public void changeAssignVfModuleTest() throws MapperException, BadResponseException { + public void changeAssignVfModuleTest() throws MapperException { doReturn(sdncReq).when(vfModuleTopologyMapper).reqMapper(SDNCSvcOperation.VF_MODULE_TOPOLOGY_OPERATION, SDNCSvcAction.CHANGE_ASSIGN, vfModule, null, vnf, serviceInstance, customer, cloudRegion, requestContext, null, testURI); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/SDNCVnfResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/SDNCVnfResourcesTest.java index f9c380bc84..00c2ac9266 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/SDNCVnfResourcesTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/SDNCVnfResourcesTest.java @@ -180,7 +180,7 @@ public class SDNCVnfResourcesTest extends TestDataSetup { } @Test - public void unassignVnfSuccessTest() throws Exception { + public void unassignVnfSuccessTest() { doReturn(sdncReq).when(MOCK_vnfTopologyOperationRequestMapper).reqMapper( eq(SDNCSvcOperation.VNF_TOPOLOGY_OPERATION), eq(SDNCSvcAction.UNASSIGN), isA(GenericResourceApiRequestActionEnumeration.class), any(GenericVnf.class), @@ -194,7 +194,7 @@ public class SDNCVnfResourcesTest extends TestDataSetup { } @Test - public void unassignVnfExceptionTest() throws Exception { + public void unassignVnfExceptionTest() { expectedException.expect(Exception.class); doThrow(Exception.class).when(MOCK_vnfTopologyOperationRequestMapper).reqMapper( eq(SDNCSvcOperation.VNF_TOPOLOGY_OPERATION), eq(SDNCSvcAction.UNASSIGN), diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/policy/CommonObjectMapperProviderTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/policy/CommonObjectMapperProviderTest.java index 541dc9edc5..12420c6c4b 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/policy/CommonObjectMapperProviderTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/policy/CommonObjectMapperProviderTest.java @@ -32,7 +32,7 @@ import com.fasterxml.jackson.databind.SerializationFeature; public class CommonObjectMapperProviderTest { @Test - public void shouldSetCorrectMapperProperties() throws Exception { + public void shouldSetCorrectMapperProperties() { // given CommonObjectMapperProvider provider = new CommonObjectMapperProvider(); // when diff --git a/common/clients/src/test/java/org/onap/so/client/dmaap/DmaapClientTest.java b/common/clients/src/test/java/org/onap/so/client/dmaap/DmaapClientTest.java index 26fb1cd336..a957611e49 100644 --- a/common/clients/src/test/java/org/onap/so/client/dmaap/DmaapClientTest.java +++ b/common/clients/src/test/java/org/onap/so/client/dmaap/DmaapClientTest.java @@ -21,7 +21,6 @@ package org.onap.so.client.dmaap; import static org.junit.Assert.assertEquals; -import java.io.FileNotFoundException; import java.io.IOException; import org.junit.Test; import org.onap.so.client.sdno.dmaap.SDNOHealthCheckDmaapConsumer; @@ -29,7 +28,7 @@ import org.onap.so.client.sdno.dmaap.SDNOHealthCheckDmaapConsumer; public class DmaapClientTest { @Test - public void deobfuscateTest() throws FileNotFoundException, IOException { + public void deobfuscateTest() throws IOException { String encodedBase64 = "dGVzdHBhc3N3b3Jk"; String notEncoded = "testpassword"; DmaapConsumer consumer = new SDNOHealthCheckDmaapConsumer(); diff --git a/common/logger/src/test/java/org/onap/so/logger/LoggerStartupListenerTest.java b/common/logger/src/test/java/org/onap/so/logger/LoggerStartupListenerTest.java index 35718397dd..1e42ff08ef 100644 --- a/common/logger/src/test/java/org/onap/so/logger/LoggerStartupListenerTest.java +++ b/common/logger/src/test/java/org/onap/so/logger/LoggerStartupListenerTest.java @@ -21,7 +21,6 @@ package org.onap.so.logger; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.*; -import java.net.UnknownHostException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -44,7 +43,7 @@ public class LoggerStartupListenerTest { } @Test - public void thatServerNameIsSetOnStartup() throws UnknownHostException { + public void thatServerNameIsSetOnStartup() { loggerStartupListener.start(); verify(context).putProperty(eq("server.name"), anyString()); diff --git a/common/utils/src/test/java/org/onap/so/utils/ExternalTaskServiceUtilsTest.java b/common/utils/src/test/java/org/onap/so/utils/ExternalTaskServiceUtilsTest.java index 233529dd20..7e19a2642f 100644 --- a/common/utils/src/test/java/org/onap/so/utils/ExternalTaskServiceUtilsTest.java +++ b/common/utils/src/test/java/org/onap/so/utils/ExternalTaskServiceUtilsTest.java @@ -33,7 +33,7 @@ public class ExternalTaskServiceUtilsTest { private ExternalTaskClient actualClient4; @Test - public void testCheckActiveClients() throws Exception { + public void testCheckActiveClients() { Set taskClients = ConcurrentHashMap.newKeySet(); taskClients.add(actualClient1); taskClients.add(actualClient2); diff --git a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/bulkprocess/OperationBodySerializer.java b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/bulkprocess/OperationBodySerializer.java index 11cd6e1ea4..402fcf400e 100644 --- a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/bulkprocess/OperationBodySerializer.java +++ b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/bulkprocess/OperationBodySerializer.java @@ -22,7 +22,6 @@ package org.onap.aaiclient.client.aai.entities.bulkprocess; import java.io.IOException; import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; @@ -39,8 +38,7 @@ public class OperationBodySerializer extends StdSerializer { } @Override - public void serialize(Object value, JsonGenerator gen, SerializerProvider serializers) - throws IOException, JsonProcessingException { + public void serialize(Object value, JsonGenerator gen, SerializerProvider serializers) throws IOException { if (value instanceof String) { gen.writeRawValue((String) value); diff --git a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/singletransaction/OperationBodyRequestSerializer.java b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/singletransaction/OperationBodyRequestSerializer.java index 5a8a2b6f73..abe413f65d 100644 --- a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/singletransaction/OperationBodyRequestSerializer.java +++ b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/singletransaction/OperationBodyRequestSerializer.java @@ -22,7 +22,6 @@ package org.onap.aaiclient.client.aai.entities.singletransaction; import java.io.IOException; import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; @@ -39,8 +38,7 @@ public class OperationBodyRequestSerializer extends StdSerializer { } @Override - public void serialize(Object value, JsonGenerator gen, SerializerProvider serializers) - throws IOException, JsonProcessingException { + public void serialize(Object value, JsonGenerator gen, SerializerProvider serializers) throws IOException { if (value instanceof String) { gen.writeRawValue((String) value); diff --git a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/EmptyStringToNullSerializer.java b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/EmptyStringToNullSerializer.java index 0d0e17a717..81649a93c3 100644 --- a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/EmptyStringToNullSerializer.java +++ b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/EmptyStringToNullSerializer.java @@ -22,7 +22,6 @@ package org.onap.aaiclient.client.graphinventory; import java.io.IOException; import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; @@ -39,8 +38,7 @@ public class EmptyStringToNullSerializer extends StdSerializer { } @Override - public void serialize(String value, JsonGenerator gen, SerializerProvider serializers) - throws IOException, JsonProcessingException { + public void serialize(String value, JsonGenerator gen, SerializerProvider serializers) throws IOException { if ("".equals(value)) { gen.writeNull(); diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIDSLQueryClientTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIDSLQueryClientTest.java index 68858de9a4..1053c6e043 100644 --- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIDSLQueryClientTest.java +++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIDSLQueryClientTest.java @@ -1,7 +1,6 @@ package org.onap.aaiclient.client.aai; import static org.junit.Assert.assertTrue; -import java.net.URISyntaxException; import org.javatuples.Pair; import org.junit.Test; @@ -10,7 +9,7 @@ public class AAIDSLQueryClientTest { @Test - public void verifyHeadersTest() throws URISyntaxException { + public void verifyHeadersTest() { AAIDSLQueryClient client = new AAIDSLQueryClient(); assertTrue(client.getClient().getAdditionalHeaders().get("ALL").contains(Pair.with("X-DslApiVersion", "V2"))); diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIObjectTypeTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIObjectTypeTest.java index 1696445c88..1a797570c2 100644 --- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIObjectTypeTest.java +++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIObjectTypeTest.java @@ -29,14 +29,14 @@ import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.T public class AAIObjectTypeTest { @Test - public void fromTypeNameTest() throws IllegalArgumentException, IllegalAccessException, InstantiationException { + public void fromTypeNameTest() throws IllegalArgumentException { AAIObjectType type = AAIObjectType.fromTypeName("generic-query"); assertEquals("generic-query", type.typeName()); } @Test - public void customTypeTest() throws IllegalArgumentException, IllegalAccessException, InstantiationException { + public void customTypeTest() throws IllegalArgumentException { AAIObjectType type = AAIObjectType.fromTypeName("my-custom-name"); assertEquals("my-custom-name", type.typeName()); diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIRestClientTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIRestClientTest.java index ad460fa322..13bb26e42f 100644 --- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIRestClientTest.java +++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIRestClientTest.java @@ -109,7 +109,7 @@ public class AAIRestClientTest { @Test - public void cacheGetTest() throws URISyntaxException, InterruptedException { + public void cacheGetTest() throws URISyntaxException { wireMockRule.stubFor(get(urlPathMatching("/cached")) .willReturn(aResponse().withStatus(200).withHeader("Content-Type", "text/plain").withBody("value"))); @@ -160,7 +160,7 @@ public class AAIRestClientTest { } @Test - public void cachePutTest() throws URISyntaxException, InterruptedException { + public void cachePutTest() throws URISyntaxException { wireMockRule.stubFor(put(urlPathMatching("/cached/1")).willReturn(aResponse().withStatus(200))); diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAISingleTransactionClientTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAISingleTransactionClientTest.java index 40a046472d..25d3b219c7 100644 --- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAISingleTransactionClientTest.java +++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAISingleTransactionClientTest.java @@ -52,8 +52,6 @@ import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory; import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder; import org.onap.aaiclient.client.graphinventory.GraphInventoryPatchConverter; import org.skyscreamer.jsonassert.JSONAssert; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; @@ -76,7 +74,7 @@ public class AAISingleTransactionClientTest { public AAIResourcesClient aaiClient = new AAIResourcesClient(); @Before - public void before() throws JsonParseException, JsonMappingException, IOException { + public void before() { mapper = new AAICommonObjectMapperProvider().getMapper(); mapper.enable(SerializationFeature.INDENT_OUTPUT); } diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAITransactionalClientTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAITransactionalClientTest.java index d9ae2255a1..e3bb8a6198 100644 --- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAITransactionalClientTest.java +++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAITransactionalClientTest.java @@ -47,9 +47,7 @@ import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri; import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory; import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder; import org.onap.aaiclient.client.graphinventory.GraphInventoryPatchConverter; -import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; @@ -73,7 +71,7 @@ public class AAITransactionalClientTest { public AAIResourcesClient aaiClient = new AAIResourcesClient(); @Before - public void before() throws JsonParseException, JsonMappingException, IOException { + public void before() { mapper = new AAICommonObjectMapperProvider().getMapper(); mapper.enable(SerializationFeature.INDENT_OUTPUT); } diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIUpdatorImplTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIUpdatorImplTest.java index fd1e60fbdb..3c9353e293 100644 --- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIUpdatorImplTest.java +++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIUpdatorImplTest.java @@ -29,12 +29,12 @@ public class AAIUpdatorImplTest { protected AAIRestClientI client; @Test - public void getClientTest() throws Exception { + public void getClientTest() { test.getClient(); } @Test - public void setClientTest() throws Exception { + public void setClientTest() { test.setClient(client); } diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/AAIResultWrapperTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/AAIResultWrapperTest.java index 98431759de..f3a29f3a34 100644 --- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/AAIResultWrapperTest.java +++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/AAIResultWrapperTest.java @@ -39,7 +39,6 @@ import org.onap.aai.domain.yang.GenericVnf; import org.onap.aaiclient.client.aai.AAICommonObjectMapperProvider; import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types; import org.springframework.util.SerializationUtils; -import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; @@ -63,7 +62,7 @@ public class AAIResultWrapperTest { } @Test - public void testAAIResultWrapperIsSerializable() throws IOException { + public void testAAIResultWrapperIsSerializable() { AAIResultWrapper original = new AAIResultWrapper(""); byte[] serialized = SerializationUtils.serialize(original); AAIResultWrapper deserialized = (AAIResultWrapper) SerializationUtils.deserialize(serialized); @@ -77,7 +76,7 @@ public class AAIResultWrapperTest { } @Test - public void testAsMap() throws JsonParseException, JsonMappingException, IOException { + public void testAsMap() throws JsonMappingException, IOException { ObjectMapper mapper = new AAICommonObjectMapperProvider().getMapper(); Map expected = mapper.readValue(json, new TypeReference>() {}); diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AllottedResourceLookupUriTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AllottedResourceLookupUriTest.java index eb59173c9f..5998872289 100644 --- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AllottedResourceLookupUriTest.java +++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AllottedResourceLookupUriTest.java @@ -24,9 +24,7 @@ import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.spy; -import java.io.IOException; import java.net.URI; -import java.net.URISyntaxException; import javax.ws.rs.core.UriBuilder; import org.junit.Test; import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types; @@ -36,8 +34,7 @@ import org.onap.aaiclient.client.graphinventory.exceptions.GraphInventoryUriNotF public class AllottedResourceLookupUriTest { @Test - public void oneKey() - throws IOException, URISyntaxException, GraphInventoryUriNotFoundException, GraphInventoryPayloadException { + public void oneKey() throws GraphInventoryUriNotFoundException, GraphInventoryPayloadException { AllottedResourceLookupUri instance = new AllottedResourceLookupUri(Types.ALLOTTED_RESOURCE.getFragment("key1")); AllottedResourceLookupUri spy = spy(instance); diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/ServiceInstanceUriTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/ServiceInstanceUriTest.java index 6a1b459e6f..236010490a 100644 --- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/ServiceInstanceUriTest.java +++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/ServiceInstanceUriTest.java @@ -40,7 +40,6 @@ import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.net.URI; -import java.net.URISyntaxException; import java.nio.file.Files; import java.nio.file.Paths; import java.util.Optional; @@ -102,8 +101,7 @@ public class ServiceInstanceUriTest { } @Test - public void oneKey() - throws IOException, URISyntaxException, GraphInventoryUriNotFoundException, GraphInventoryPayloadException { + public void oneKey() throws GraphInventoryUriNotFoundException, GraphInventoryPayloadException { ServiceInstanceUri instance = new ServiceInstanceUri(Types.SERVICE_INSTANCE.getFragment("key1")); ServiceInstanceUri spy = spy(instance); @@ -120,8 +118,7 @@ public class ServiceInstanceUriTest { } @Test - public void oneKeyQueryParams() - throws IOException, URISyntaxException, GraphInventoryUriNotFoundException, GraphInventoryPayloadException { + public void oneKeyQueryParams() throws GraphInventoryUriNotFoundException, GraphInventoryPayloadException { ServiceInstanceUri instance = new ServiceInstanceUri(Types.SERVICE_INSTANCE.getFragment("key1")); ServiceInstanceUri spy = spy(instance); @@ -138,8 +135,7 @@ public class ServiceInstanceUriTest { } @Test - public void oneKeyEncoded() - throws IOException, URISyntaxException, GraphInventoryUriNotFoundException, GraphInventoryPayloadException { + public void oneKeyEncoded() throws GraphInventoryUriNotFoundException, GraphInventoryPayloadException { ServiceInstanceUri instance = new ServiceInstanceUri(Types.SERVICE_INSTANCE.getFragment("key1")); ServiceInstanceUri spy = spy(instance); @@ -156,8 +152,7 @@ public class ServiceInstanceUriTest { } @Test - public void oneKeyGetKeys() - throws IOException, URISyntaxException, GraphInventoryUriNotFoundException, GraphInventoryPayloadException { + public void oneKeyGetKeys() throws GraphInventoryUriNotFoundException, GraphInventoryPayloadException { ServiceInstanceUri instance = new ServiceInstanceUri(Types.SERVICE_INSTANCE.getFragment("key1")); ServiceInstanceUri spy = spy(instance); @@ -170,7 +165,7 @@ public class ServiceInstanceUriTest { } @Test - public void oneKeyClone() throws GraphInventoryUriNotFoundException, GraphInventoryPayloadException { + public void oneKeyClone() { ServiceInstanceUri instance = new ServiceInstanceUri(Types.SERVICE_INSTANCE.getFragment("key1")); ServiceInstanceUri spy = spy(instance); String uri = @@ -184,7 +179,7 @@ public class ServiceInstanceUriTest { } @Test - public void notfound() throws IOException, GraphInventoryUriNotFoundException, GraphInventoryPayloadException { + public void notfound() throws IOException { final String content = new String(Files.readAllBytes(Paths.get(AAI_JSON_FILE_LOCATION + "empty-query-result.json"))); @@ -202,7 +197,7 @@ public class ServiceInstanceUriTest { } @Test - public void noVertexFound() throws GraphInventoryUriNotFoundException, GraphInventoryPayloadException { + public void noVertexFound() { ServiceInstanceUri instance = new ServiceInstanceUri(Types.SERVICE_INSTANCE.getFragment("key3")); ServiceInstanceUri spy = spy(instance); AAIResourcesClient client = aaiClient; @@ -215,8 +210,7 @@ public class ServiceInstanceUriTest { } @Test - public void serializeTest() throws IOException, ClassNotFoundException, GraphInventoryUriNotFoundException, - GraphInventoryPayloadException { + public void serializeTest() throws IOException, ClassNotFoundException { ServiceInstanceUri instance = new ServiceInstanceUri(Types.SERVICE_INSTANCE.getFragment("key3")); final String content = new String( Files.readAllBytes(Paths.get(AAI_JSON_FILE_LOCATION + "service-instance-pathed-query.json"))); @@ -268,8 +262,7 @@ public class ServiceInstanceUriTest { } @Test - public void relatedToEqualityTestBeforeBuildTest() - throws GraphInventoryUriNotFoundException, GraphInventoryPayloadException { + public void relatedToEqualityTestBeforeBuildTest() { ServiceInstanceUri instance = new ServiceInstanceUri(Types.SERVICE_INSTANCE.getFragment("key1")); ServiceInstanceUri spy = spy(instance); diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/graphinventory/GraphInventoryPatchConverterTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/graphinventory/GraphInventoryPatchConverterTest.java index 6f096d2818..0ca56b0233 100644 --- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/graphinventory/GraphInventoryPatchConverterTest.java +++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/graphinventory/GraphInventoryPatchConverterTest.java @@ -25,14 +25,12 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import java.io.IOException; -import java.net.URISyntaxException; import java.util.HashMap; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.junit.MockitoJUnitRunner; import org.onap.aai.domain.yang.GenericVnf; import org.onap.aaiclient.client.aai.AAICommonObjectMapperProvider; -import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; @@ -43,8 +41,7 @@ public class GraphInventoryPatchConverterTest { private ObjectMapper mapper = new AAICommonObjectMapperProvider().getMapper(); @Test - public void convertObjectToPatchFormatTest() - throws URISyntaxException, JsonParseException, JsonMappingException, IOException { + public void convertObjectToPatchFormatTest() throws JsonMappingException, IOException { GraphInventoryPatchConverter validator = new GraphInventoryPatchConverter(); GenericVnf vnf = new GenericVnf(); vnf.setIpv4Loopback0Address(""); @@ -56,8 +53,7 @@ public class GraphInventoryPatchConverterTest { } @Test - public void convertStringToPatchFormatTest() - throws URISyntaxException, JsonParseException, JsonMappingException, IOException { + public void convertStringToPatchFormatTest() { GraphInventoryPatchConverter validator = new GraphInventoryPatchConverter(); String payload = "{\"ipv4-loopback0-address\":\"\"}"; String result = validator.marshallObjectToPatchFormat(payload); @@ -66,8 +62,7 @@ public class GraphInventoryPatchConverterTest { } @Test - public void convertStringToPatchFormatNull_Test() - throws URISyntaxException, JsonParseException, JsonMappingException, IOException { + public void convertStringToPatchFormatNull_Test() { GraphInventoryPatchConverter validator = new GraphInventoryPatchConverter(); String payload = "{\"ipv4-loopback0-address\": null}"; String result = validator.marshallObjectToPatchFormat(payload); @@ -76,8 +71,7 @@ public class GraphInventoryPatchConverterTest { } @Test - public void convertMapToPatchFormatTest() - throws URISyntaxException, JsonParseException, JsonMappingException, IOException { + public void convertMapToPatchFormatTest() { GraphInventoryPatchConverter validator = new GraphInventoryPatchConverter(); HashMap map = new HashMap<>(); map.put("ipv4-loopback0-address", ""); diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/graphinventory/exceptions/GraphInventoryPayloadExceptionTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/graphinventory/exceptions/GraphInventoryPayloadExceptionTest.java index 51375aac9b..f0f3ab8227 100644 --- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/graphinventory/exceptions/GraphInventoryPayloadExceptionTest.java +++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/graphinventory/exceptions/GraphInventoryPayloadExceptionTest.java @@ -27,7 +27,7 @@ public class GraphInventoryPayloadExceptionTest { Throwable t = new Throwable(); @Test - public void callConstructorTest() throws Exception { + public void callConstructorTest() { GraphInventoryPayloadException test1 = new GraphInventoryPayloadException("testing"); diff --git a/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/camundabeans/BpmnRequestTest.java b/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/camundabeans/BpmnRequestTest.java index 7291f87554..4f740c4e6d 100644 --- a/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/camundabeans/BpmnRequestTest.java +++ b/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/camundabeans/BpmnRequestTest.java @@ -26,152 +26,152 @@ public class BpmnRequestTest { BpmnRequest bpmnRequest = new BpmnRequest(); @Test - public void getHostTest() throws Exception { + public void getHostTest() { bpmnRequest.getHost(); } @Test - public void setHostTest() throws Exception { + public void setHostTest() { bpmnRequest.setHost(new CamundaInput()); } @Test - public void getRequestIdTest() throws Exception { + public void getRequestIdTest() { bpmnRequest.getRequestId(); } @Test - public void setRequestIdTest() throws Exception { + public void setRequestIdTest() { bpmnRequest.setRequestId(new CamundaInput()); } @Test - public void getIsBaseVfModuleTest() throws Exception { + public void getIsBaseVfModuleTest() { bpmnRequest.getIsBaseVfModule(); } @Test - public void setIsBaseVfModuleTest() throws Exception { + public void setIsBaseVfModuleTest() { bpmnRequest.setIsBaseVfModule(new CamundaBooleanInput()); } @Test - public void getRecipeTimeoutTest() throws Exception { + public void getRecipeTimeoutTest() { bpmnRequest.getRecipeTimeout(); } @Test - public void setRecipeTimeoutTest() throws Exception { + public void setRecipeTimeoutTest() { bpmnRequest.setRecipeTimeout(new CamundaIntegerInput()); } @Test - public void getRequestActionTest() throws Exception { + public void getRequestActionTest() { bpmnRequest.getRequestAction(); } @Test - public void setRequestActionTest() throws Exception { + public void setRequestActionTest() { bpmnRequest.setRequestAction(new CamundaInput()); } @Test - public void getServiceInstanceIdTest() throws Exception { + public void getServiceInstanceIdTest() { bpmnRequest.getServiceInstanceId(); } @Test - public void setServiceInstanceIdTest() throws Exception { + public void setServiceInstanceIdTest() { bpmnRequest.setServiceInstanceId(new CamundaInput()); } @Test - public void getVnfIdTest() throws Exception { + public void getVnfIdTest() { bpmnRequest.getVnfId(); } @Test - public void setVnfIdTest() throws Exception { + public void setVnfIdTest() { bpmnRequest.setVnfId(new CamundaInput()); } @Test - public void getVfModuleIdTest() throws Exception { + public void getVfModuleIdTest() { bpmnRequest.getVnfId(); } @Test - public void setVfModuleIdTest() throws Exception { + public void setVfModuleIdTest() { bpmnRequest.setVfModuleId(new CamundaInput()); } @Test - public void getVolumeGroupIdTest() throws Exception { + public void getVolumeGroupIdTest() { bpmnRequest.getVolumeGroupId(); } @Test - public void setVolumeGroupIdTest() throws Exception { + public void setVolumeGroupIdTest() { bpmnRequest.setVolumeGroupId(new CamundaInput()); } @Test - public void getNetworkIdTest() throws Exception { + public void getNetworkIdTest() { bpmnRequest.getNetworkId(); } @Test - public void setNetworkIdTest() throws Exception { + public void setNetworkIdTest() { bpmnRequest.setNetworkId(new CamundaInput()); } @Test - public void getServiceTypeTest() throws Exception { + public void getServiceTypeTest() { bpmnRequest.getServiceType(); } @Test - public void setServiceTypeTest() throws Exception { + public void setServiceTypeTest() { bpmnRequest.setServiceType(new CamundaInput()); } @Test - public void getVnfTypeTest() throws Exception { + public void getVnfTypeTest() { bpmnRequest.getVnfType(); } @Test - public void setVnfTypeTest() throws Exception { + public void setVnfTypeTest() { bpmnRequest.setVnfType(new CamundaInput()); } @Test - public void getVfModuleTypeTest() throws Exception { + public void getVfModuleTypeTest() { bpmnRequest.getVfModuleType(); } @Test - public void setVfModuleTypeTest() throws Exception { + public void setVfModuleTypeTest() { bpmnRequest.setVfModuleType(new CamundaInput()); } @Test - public void getNetworkTypeTest() throws Exception { + public void getNetworkTypeTest() { bpmnRequest.getNetworkType(); } @Test - public void setNetworkTypeTest() throws Exception { + public void setNetworkTypeTest() { bpmnRequest.setNetworkType(new CamundaInput()); } @Test - public void getRequestDetailsTest() throws Exception { + public void getRequestDetailsTest() { bpmnRequest.getRequestDetails(); } @Test - public void setRequestDetailsTest() throws Exception { + public void setRequestDetailsTest() { bpmnRequest.setRequestDetails(new CamundaInput()); } diff --git a/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/common/CamundaClientTest.java b/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/common/CamundaClientTest.java index e0f4fe3f7a..ced9c5ba33 100644 --- a/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/common/CamundaClientTest.java +++ b/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/common/CamundaClientTest.java @@ -107,7 +107,7 @@ public class CamundaClientTest { } @Test - public void createBPMNFailureExceptionTest() throws IOException { + public void createBPMNFailureExceptionTest() { String response = "Request failed"; HttpClientErrorException e = new HttpClientErrorException(HttpStatus.INTERNAL_SERVER_ERROR, null, response.getBytes(), null); diff --git a/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/common/ResponseHandlerTest.java b/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/common/ResponseHandlerTest.java index e6f7a3663a..30451d8934 100644 --- a/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/common/ResponseHandlerTest.java +++ b/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/common/ResponseHandlerTest.java @@ -23,7 +23,6 @@ package org.onap.so.apihandler.common; -import java.io.IOException; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; @@ -45,7 +44,7 @@ public class ResponseHandlerTest { public ExpectedException thrown = ExpectedException.none(); @Test - public void acceptedResponseTest() throws IOException, BPMNFailureException { + public void acceptedResponseTest() throws BPMNFailureException { ResponseEntity camundaResponse = ResponseEntity.noContent().build(); thrown.expect(BPMNFailureException.class); thrown.expectMessage("Request Failed due to BPEL error with HTTP Status = 204"); @@ -53,7 +52,7 @@ public class ResponseHandlerTest { } @Test - public void acceptedOrNoContentResponseTest() throws IOException, BPMNFailureException { + public void acceptedOrNoContentResponseTest() throws BPMNFailureException { ResponseEntity camundaResponse = ResponseEntity.badRequest().build(); thrown.expect(BPMNFailureException.class); thrown.expectMessage("Request Failed due to BPEL error with HTTP Status = 400"); diff --git a/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/filters/RequestIdFilterTest.java b/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/filters/RequestIdFilterTest.java index 2f082a7415..46e2d40bb7 100644 --- a/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/filters/RequestIdFilterTest.java +++ b/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/filters/RequestIdFilterTest.java @@ -68,7 +68,7 @@ public class RequestIdFilterTest { private static final String REQUEST_ID = "32807a28-1a14-4b88-b7b3-2950918aa769"; private ObjectMapper mapper = new ObjectMapper(); - private RequestError getRequestError() throws IOException { + private RequestError getRequestError() { RequestError requestError = new RequestError(); mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, false); ServiceException serviceException = new ServiceException(); diff --git a/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapperTest.java b/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapperTest.java index 2268abd885..1f18a9aaaf 100644 --- a/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapperTest.java +++ b/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapperTest.java @@ -22,7 +22,6 @@ package org.onap.so.apihandlerinfra.exceptions; import static org.junit.Assert.assertEquals; -import java.io.IOException; import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.Response; import javax.xml.bind.Marshaller; @@ -84,7 +83,7 @@ public class ApiExceptionMapperTest { } @Test - public void testDuplicateRequestResponse() throws IOException { + public void testDuplicateRequestResponse() { DuplicateRequestException duplicateRequestException = new DuplicateRequestException.Builder("Test1", "Test2", "Test3", "Test4", HttpStatus.SC_BAD_GATEWAY, ErrorNumbers.SVC_BAD_PARAMETER).build(); Response resp = mapper.toResponse((ApiException) duplicateRequestException); diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/MsoRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/MsoRequest.java index 7e5bb561b5..9f9687ac22 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/MsoRequest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/MsoRequest.java @@ -95,8 +95,6 @@ import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.core.JsonGenerationException; -import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; @Component @@ -590,8 +588,7 @@ public class MsoRequest { return (s == null || s.trim().isEmpty()); } - public String getRequestJSON(ServiceInstancesRequest sir) - throws JsonGenerationException, JsonMappingException, IOException { + public String getRequestJSON(ServiceInstancesRequest sir) throws IOException { logger.debug("building sir from object {}", sir); String requestJSON = nonNullMapper.writeValueAsString(sir); diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/NodeHealthcheckHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/NodeHealthcheckHandler.java index e56ee24baf..87d6176319 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/NodeHealthcheckHandler.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/NodeHealthcheckHandler.java @@ -42,7 +42,6 @@ import javax.ws.rs.Produces; import javax.ws.rs.container.ContainerRequestContext; import javax.ws.rs.core.Context; import javax.ws.rs.core.Response; -import java.net.UnknownHostException; @Path("/nodehealthcheck") @OpenAPIDefinition(info = @Info(title = "/nodehealthcheck", description = "API Handler Infra Node Health Check")) @@ -61,7 +60,7 @@ public class NodeHealthcheckHandler { @Operation(description = "Performing node health check", responses = @ApiResponse( content = @Content(array = @ArraySchema(schema = @Schema(implementation = Response.class))))) @Transactional - public Response nodeHealthcheck(@Context ContainerRequestContext requestContext) throws UnknownHostException { + public Response nodeHealthcheck(@Context ContainerRequestContext requestContext) { // Generated RequestId String requestId = requestContext.getProperty("requestId").toString(); logger.info(LoggingAnchor.TWO, MessageEnum.APIH_GENERATED_REQUEST_ID.toString(), requestId); diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/Onap3gppServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/Onap3gppServiceInstances.java index 43d17f59d0..00b099b6e1 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/Onap3gppServiceInstances.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/Onap3gppServiceInstances.java @@ -585,7 +585,7 @@ public class Onap3gppServiceInstances { } } - private Response getSubnetCapabilities(List subnetTypes, String version) throws ApiException { + private Response getSubnetCapabilities(List subnetTypes, String version) { String inputFileString = ""; Map subnetCapability = new HashMap<>(); BufferedReader br = null; diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationTasks.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationTasks.java index ba9b3ad107..5908df33c4 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationTasks.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationTasks.java @@ -32,7 +32,6 @@ import org.apache.http.HttpStatus; import org.json.JSONObject; import org.onap.so.apihandler.common.ErrorNumbers; import org.onap.so.apihandler.common.ResponseBuilder; -import org.onap.so.apihandlerinfra.exceptions.ApiException; import org.onap.so.db.request.beans.OrchestrationTask; import org.onap.so.db.request.client.RequestsDbClient; import org.onap.logging.filter.base.ErrorCode; @@ -100,8 +99,7 @@ public class OrchestrationTasks { content = @Content(array = @ArraySchema(schema = @Schema(implementation = Response.class))))) @Produces(MediaType.APPLICATION_JSON) @Transactional - public Response getOrchestrationTask(@PathParam("taskId") String taskId, @PathParam("version") String version) - throws ApiException { + public Response getOrchestrationTask(@PathParam("taskId") String taskId, @PathParam("version") String version) { try { OrchestrationTask orchestrationTask = requestsDbClient.getOrchestrationTask(taskId); return builder.buildResponse(HttpStatus.SC_OK, null, orchestrationTask, version); diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/AAIDataRetrieval.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/AAIDataRetrieval.java index ed51904f14..5c7266fa78 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/AAIDataRetrieval.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/AAIDataRetrieval.java @@ -28,7 +28,6 @@ import org.onap.aaiclient.client.graphinventory.entities.Node; import org.onap.aaiclient.client.graphinventory.entities.Start; import org.onap.aaiclient.client.graphinventory.entities.TraversalBuilder; import org.onap.aaiclient.client.graphinventory.entities.__; -import org.onap.so.apihandlerinfra.infra.rest.exception.AAIEntityNotFound; import org.onap.so.serviceinstancebeans.CloudConfiguration; import org.onap.aaiclient.client.aai.entities.uri.AAIClientUriFactory; import org.slf4j.Logger; @@ -77,7 +76,7 @@ public class AAIDataRetrieval { }); } - public VolumeGroup getVolumeGroup(String vnfId, String volumeGroupId) throws AAIEntityNotFound { + public VolumeGroup getVolumeGroup(String vnfId, String volumeGroupId) { AAIResultWrapper wrapper = this.getAaiResourcesClient() .get(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)) .relatedTo(Types.VOLUME_GROUP.getFragment(volumeGroupId))); diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/AbstractRestHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/AbstractRestHandler.java index fec512ac44..6e46c6b0a9 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/AbstractRestHandler.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/AbstractRestHandler.java @@ -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. diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandler/common/ResponseBuilderTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandler/common/ResponseBuilderTest.java index b8a2f22566..38b57ff47f 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandler/common/ResponseBuilderTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandler/common/ResponseBuilderTest.java @@ -26,7 +26,6 @@ import javax.ws.rs.core.Response; import org.apache.http.HttpStatus; import org.junit.Test; import org.onap.so.apihandlerinfra.BaseTest; -import org.onap.so.apihandlerinfra.exceptions.ApiException; import org.springframework.beans.factory.annotation.Autowired; public class ResponseBuilderTest extends BaseTest { @@ -35,7 +34,7 @@ public class ResponseBuilderTest extends BaseTest { private ResponseBuilder builder; @Test - public void testBuildResponseResponse() throws ApiException { + public void testBuildResponseResponse() { String requestId = null; String apiVersion = "1"; @@ -52,7 +51,7 @@ public class ResponseBuilderTest extends BaseTest { } @Test - public void testBuildResponseVersion() throws ApiException { + public void testBuildResponseVersion() { String requestId = "123456-67889"; String apiVersion = "v5"; diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/AAIDeserializeTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/AAIDeserializeTest.java index a279144eba..47e6075754 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/AAIDeserializeTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/AAIDeserializeTest.java @@ -36,7 +36,6 @@ import org.onap.so.serviceinstancebeans.ServiceInstancesRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpHeaders; -import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; @@ -62,7 +61,7 @@ public class AAIDeserializeTest extends BaseTest { } @Test - public void doNotFailOnUnknownPropertiesTest() throws JsonParseException, JsonMappingException, IOException { + public void doNotFailOnUnknownPropertiesTest() throws JsonMappingException, IOException { wireMockServer.stubFor(get(("/aai/" + AAIVersion.LATEST + "/cloud-infrastructure/cloud-regions/cloud-region/cloudOwner/mdt1/tenants/tenant/88a6ca3ee0394ade9403f075db23167e")) .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/CamundaRequestHandlerUnitTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/CamundaRequestHandlerUnitTest.java index 53b9207337..c93712d61e 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/CamundaRequestHandlerUnitTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/CamundaRequestHandlerUnitTest.java @@ -43,8 +43,6 @@ import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Spy; import org.mockito.junit.MockitoJUnitRunner; -import org.onap.so.apihandlerinfra.exceptions.ContactCamundaException; -import org.onap.so.apihandlerinfra.exceptions.RequestDbFailureException; import org.springframework.core.ParameterizedTypeReference; import org.springframework.core.env.Environment; import org.springframework.http.HttpEntity; @@ -135,7 +133,7 @@ public class CamundaRequestHandlerUnitTest { } @Test - public void getActivityNameTest() throws IOException { + public void getActivityNameTest() { String expectedActivityName = "Last task executed: BB to Execute"; String actualActivityName = camundaRequestHandler.getActivityName(activityInstanceList); @@ -143,7 +141,7 @@ public class CamundaRequestHandlerUnitTest { } @Test - public void getActivityNameNullActivityNameTest() throws IOException { + public void getActivityNameNullActivityNameTest() { String expectedActivityName = "Task name is null."; HistoricActivityInstanceEntity activityInstance = new HistoricActivityInstanceEntity(); List activityInstanceList = new ArrayList<>(); @@ -155,7 +153,7 @@ public class CamundaRequestHandlerUnitTest { } @Test - public void getActivityNameNullListTest() throws IOException { + public void getActivityNameNullListTest() { String expectedActivityName = "No results returned on activityInstance history lookup."; List activityInstanceList = null; String actualActivityName = camundaRequestHandler.getActivityName(activityInstanceList); @@ -164,7 +162,7 @@ public class CamundaRequestHandlerUnitTest { } @Test - public void getActivityNameEmptyListTest() throws IOException { + public void getActivityNameEmptyListTest() { String expectedActivityName = "No results returned on activityInstance history lookup."; List activityInstanceList = new ArrayList<>(); String actualActivityName = camundaRequestHandler.getActivityName(activityInstanceList); @@ -173,7 +171,7 @@ public class CamundaRequestHandlerUnitTest { } @Test - public void getCamundActivityHistoryNullTest() throws IOException, ContactCamundaException { + public void getCamundActivityHistoryNullTest() { HistoricProcessInstanceEntity processInstance = new HistoricProcessInstanceEntity(); processInstance.setId("c4c6b647-a26e-11e9-b144-0242ac14000b"); List processInstanceList = new ArrayList<>(); @@ -188,7 +186,7 @@ public class CamundaRequestHandlerUnitTest { } @Test - public void getCamundActivityHistoryErrorTest() throws IOException, ContactCamundaException { + public void getCamundActivityHistoryErrorTest() { HistoricProcessInstanceEntity processInstance = new HistoricProcessInstanceEntity(); processInstance.setId("c4c6b647-a26e-11e9-b144-0242ac14000b"); List processInstanceList = new ArrayList<>(); @@ -204,7 +202,7 @@ public class CamundaRequestHandlerUnitTest { } @Test - public void getTaskName() throws IOException, ContactCamundaException { + public void getTaskName() { doReturn(processInstanceResponse).when(camundaRequestHandler).getCamundaProcessInstanceHistory(REQUEST_ID, false, false, true); doReturn(activityInstanceResponse).when(camundaRequestHandler) @@ -218,7 +216,7 @@ public class CamundaRequestHandlerUnitTest { } @Test - public void getTaskNameNullProcessInstanceListTest() throws IOException, ContactCamundaException { + public void getTaskNameNullProcessInstanceListTest() { ResponseEntity> response = new ResponseEntity<>(null, HttpStatus.OK); String actual = camundaRequestHandler.getTaskInformation(response, REQUEST_ID); @@ -227,7 +225,7 @@ public class CamundaRequestHandlerUnitTest { } @Test - public void getTaskNameNullProcessInstanceIdTest() throws IOException, ContactCamundaException { + public void getTaskNameNullProcessInstanceIdTest() { HistoricProcessInstanceEntity processInstance = new HistoricProcessInstanceEntity(); List processInstanceList = new ArrayList<>(); processInstanceList.add(processInstance); @@ -240,7 +238,7 @@ public class CamundaRequestHandlerUnitTest { } @Test - public void getTaskNameEmptyProcessInstanceListTest() throws IOException, ContactCamundaException { + public void getTaskNameEmptyProcessInstanceListTest() { List processInstanceList = new ArrayList<>(); ResponseEntity> response = new ResponseEntity<>(processInstanceList, HttpStatus.OK); @@ -251,7 +249,7 @@ public class CamundaRequestHandlerUnitTest { } @Test - public void getTaskNameProcessInstanceLookupFailureTest() throws IOException, ContactCamundaException { + public void getTaskNameProcessInstanceLookupFailureTest() { doThrow(HttpClientErrorException.class).when(camundaRequestHandler).getCamundaProcessInstanceHistory(REQUEST_ID, false, false, true); @@ -260,7 +258,7 @@ public class CamundaRequestHandlerUnitTest { } @Test - public void getCamundaActivityHistoryTest() throws IOException, ContactCamundaException { + public void getCamundaActivityHistoryTest() { HttpHeaders headers = setHeaders(); HttpEntity requestEntity = new HttpEntity<>(headers); String targetUrl = @@ -291,7 +289,7 @@ public class CamundaRequestHandlerUnitTest { } @Test - public void getCamundaProccesInstanceHistoryTest() throws IOException, ContactCamundaException { + public void getCamundaProccesInstanceHistoryTest() { HttpHeaders headers = setHeaders(); HttpEntity requestEntity = new HttpEntity<>(headers); String targetUrl = "http://localhost:8089/sobpmnengine/history/process-instance?processInstanceBusinessKey=" @@ -340,7 +338,7 @@ public class CamundaRequestHandlerUnitTest { } @Test - public void getCamundaProccesInstanceHistoryFailThenSuccessTest() throws IOException, ContactCamundaException { + public void getCamundaProccesInstanceHistoryFailThenSuccessTest() { HttpHeaders headers = setHeaders(); HttpEntity requestEntity = new HttpEntity<>(headers); String targetUrl = "http://localhost:8089/sobpmnengine/history/process-instance?processInstanceBusinessKey=" @@ -359,7 +357,7 @@ public class CamundaRequestHandlerUnitTest { } @Test - public void setCamundaHeadersTest() throws ContactCamundaException, RequestDbFailureException { + public void setCamundaHeadersTest() { String encryptedAuth = "015E7ACF706C6BBF85F2079378BDD2896E226E09D13DC2784BA309E27D59AB9FAD3A5E039DF0BB8408"; // user:password String key = "07a7159d3bf51a0e53be7a8f89699be7"; diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/GlobalHealthcheckHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/GlobalHealthcheckHandlerTest.java index 0291cfd2ea..999f441178 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/GlobalHealthcheckHandlerTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/GlobalHealthcheckHandlerTest.java @@ -48,7 +48,6 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.util.ReflectionTestUtils; import org.springframework.web.client.RestTemplate; -import com.fasterxml.jackson.core.JsonProcessingException; @RunWith(SpringRunner.class) @@ -110,7 +109,7 @@ public class GlobalHealthcheckHandlerTest { } @Test - public void globalHealthcheckAllUPTest() throws JSONException, JsonProcessingException { + public void globalHealthcheckAllUPTest() throws JSONException { HealthCheckResponse expected = new HealthCheckResponse(); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/MsoRequestTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/MsoRequestTest.java index d1e5dc717e..d3af9559ba 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/MsoRequestTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/MsoRequestTest.java @@ -54,7 +54,6 @@ import org.springframework.test.context.junit4.rules.SpringClassRule; import org.springframework.test.context.junit4.rules.SpringMethodRule; import org.w3c.dom.Document; import org.xml.sax.InputSource; -import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; import junitparams.JUnitParamsRunner; @@ -127,7 +126,7 @@ public class MsoRequestTest extends BaseTest { } @Parameters - private Collection successParameters() throws JsonParseException, JsonMappingException, IOException { + private Collection successParameters() throws JsonMappingException, IOException { return Arrays.asList(new Object[][] { {mapper.readValue(inputStream("/CloudConfiguration/EmptyCloudConfiguration.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, "3"}, @@ -234,8 +233,7 @@ public class MsoRequestTest extends BaseTest { } @Parameters - private Collection customWorkflowSuccessParameters() - throws JsonParseException, JsonMappingException, IOException { + private Collection customWorkflowSuccessParameters() throws JsonMappingException, IOException { return Arrays.asList( new Object[][] {{mapper.readValue(inputStream("/SuccessfulValidation/v1ExecuteCustomWorkflow.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.inPlaceSoftwareUpdate, "1"} @@ -245,8 +243,7 @@ public class MsoRequestTest extends BaseTest { @Test @Parameters(method = "aLaCarteParameters") - public void aLaCarteFlagTest(boolean expected, ServiceInstancesRequest sir) - throws JsonParseException, IOException, ValidationException { + public void aLaCarteFlagTest(boolean expected, ServiceInstancesRequest sir) { this.expected = expected; this.sir = sir; this.msoRequest = new MsoRequest(); @@ -268,7 +265,7 @@ public class MsoRequestTest extends BaseTest { @Parameters(method = "validationParameters") public void validationFailureTest(String expectedException, ServiceInstancesRequest sir, HashMap instanceIdMapTest, Action action, int reqVersion) - throws JsonParseException, JsonMappingException, IOException, ValidationException { + throws IOException, ValidationException { this.expectedException = expectedException; this.sir = sir; this.instanceIdMapTest = instanceIdMapTest; @@ -880,8 +877,7 @@ public class MsoRequestTest extends BaseTest { } @Test - public void nullInstanceIdMapTest() - throws JsonParseException, JsonMappingException, IOException, ValidationException { + public void nullInstanceIdMapTest() throws JsonMappingException, IOException, ValidationException { this.sir = mapper.readValue(inputStream("/RequestParameters/RequestParametersNull.json"), ServiceInstancesRequest.class); this.instanceIdMapTest = null; @@ -893,8 +889,7 @@ public class MsoRequestTest extends BaseTest { } @Test - public void serviceInstanceIdHashMapFailureTest() - throws JsonParseException, JsonMappingException, IOException, ValidationException { + public void serviceInstanceIdHashMapFailureTest() throws JsonMappingException, IOException, ValidationException { this.sir = mapper.readValue(inputStream("/SuccessfulValidation/InstanceIdHashMap.json"), ServiceInstancesRequest.class); this.instanceIdMapTest.put("serviceInstanceId", "test"); @@ -908,8 +903,7 @@ public class MsoRequestTest extends BaseTest { } @Test - public void vnfInstanceIdHashMapFailureTest() - throws JsonParseException, JsonMappingException, IOException, ValidationException { + public void vnfInstanceIdHashMapFailureTest() throws JsonMappingException, IOException, ValidationException { this.sir = mapper.readValue(inputStream("/SuccessfulValidation/InstanceIdHashMap.json"), ServiceInstancesRequest.class); this.instanceIdMapTest.put("vnfInstanceId", "test"); @@ -923,8 +917,7 @@ public class MsoRequestTest extends BaseTest { } @Test - public void vfModuleInstanceIdHashMapFailureTest() - throws JsonParseException, JsonMappingException, IOException, ValidationException { + public void vfModuleInstanceIdHashMapFailureTest() throws JsonMappingException, IOException, ValidationException { this.sir = mapper.readValue(inputStream("/SuccessfulValidation/InstanceIdHashMap.json"), ServiceInstancesRequest.class); this.instanceIdMapTest.put("vfModuleInstanceId", "test"); @@ -939,7 +932,7 @@ public class MsoRequestTest extends BaseTest { @Test public void volumeGroupInstanceIdHashMapFailureTest() - throws JsonParseException, JsonMappingException, IOException, ValidationException { + throws JsonMappingException, IOException, ValidationException { this.sir = mapper.readValue(inputStream("/SuccessfulValidation/InstanceIdHashMap.json"), ServiceInstancesRequest.class); this.instanceIdMapTest.put("volumeGroupInstanceId", "test"); @@ -953,8 +946,7 @@ public class MsoRequestTest extends BaseTest { } @Test - public void networkInstanceIdHashMapFailureTest() - throws JsonParseException, JsonMappingException, IOException, ValidationException { + public void networkInstanceIdHashMapFailureTest() throws JsonMappingException, IOException, ValidationException { this.sir = mapper.readValue(inputStream("/SuccessfulValidation/InstanceIdHashMap.json"), ServiceInstancesRequest.class); this.instanceIdMapTest.put("networkInstanceId", "test"); @@ -969,7 +961,7 @@ public class MsoRequestTest extends BaseTest { @Test public void configurationInstanceIdHashMapFailureTest() - throws JsonParseException, JsonMappingException, IOException, ValidationException { + throws JsonMappingException, IOException, ValidationException { this.sir = mapper.readValue(inputStream("/SuccessfulValidation/InstanceIdHashMap.json"), ServiceInstancesRequest.class); this.instanceIdMapTest.put("configurationInstanceId", "test"); @@ -983,8 +975,7 @@ public class MsoRequestTest extends BaseTest { } @Test - public void instanceGroupIdHashMapFailureTest() - throws JsonParseException, JsonMappingException, IOException, ValidationException { + public void instanceGroupIdHashMapFailureTest() throws JsonMappingException, IOException, ValidationException { this.sir = mapper.readValue(inputStream("/SuccessfulValidation/InstanceIdHashMap.json"), ServiceInstancesRequest.class); this.instanceIdMapTest.put("instanceGroupInstanceId", "test"); @@ -998,8 +989,7 @@ public class MsoRequestTest extends BaseTest { } @Test - public void testVfModuleV4UsePreLoad() - throws JsonParseException, JsonMappingException, IOException, ValidationException { + public void testVfModuleV4UsePreLoad() throws JsonMappingException, IOException, ValidationException { this.requestJSON = inputStream("/SuccessfulValidation/v4CreateVfModule.json"); this.instanceIdMapTest.put("serviceInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc"); this.instanceIdMapTest.put("vnfInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc"); @@ -1020,8 +1010,7 @@ public class MsoRequestTest extends BaseTest { } @Test - public void buildServiceErrorResponseTest() - throws JsonParseException, JsonMappingException, IOException, ValidationException { + public void buildServiceErrorResponseTest() throws JsonMappingException, IOException, ValidationException { this.sir = mapper.readValue(inputStream("/SuccessfulValidation/InstanceIdHashMap.json"), ServiceInstancesRequest.class); this.instanceIdMapTest.put("serviceInstanceId", "test"); @@ -1043,7 +1032,7 @@ public class MsoRequestTest extends BaseTest { @Test public void buildServiceErrorPolicyExceptionResponseTest() - throws JsonParseException, JsonMappingException, IOException, ValidationException { + throws JsonMappingException, IOException, ValidationException { this.sir = mapper.readValue(inputStream("/SuccessfulValidation/InstanceIdHashMap.json"), ServiceInstancesRequest.class); this.instanceIdMapTest.put("serviceInstanceId", "test"); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsTest.java index 1505e23a28..1afa652e54 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsTest.java @@ -51,7 +51,6 @@ import org.onap.logging.ref.slf4j.ONAPLogConstants; import org.onap.so.apihandler.common.ErrorNumbers; import org.onap.so.db.request.beans.InfraActiveRequests; import org.onap.so.db.request.client.RequestsDbClient; -import org.onap.so.exceptions.ValidationException; import org.onap.so.serviceinstancebeans.CloudRequestData; import org.onap.so.serviceinstancebeans.GetOrchestrationListResponse; import org.onap.so.serviceinstancebeans.GetOrchestrationResponse; @@ -424,8 +423,7 @@ public class OrchestrationRequestsTest extends BaseTest { } @Test - public void testUnlockOrchestrationRequest_Valid_Status() - throws JsonParseException, JsonMappingException, IOException, ValidationException { + public void testUnlockOrchestrationRequest_Valid_Status() throws IOException { setupTestUnlockOrchestrationRequest_Valid_Status("5ffbabd6-b793-4377-a1ab-082670fbc7ac", "PENDING"); String requestJSON = new String(Files.readAllBytes(Paths.get("src/test/resources/OrchestrationRequest/Request.json"))); @@ -443,7 +441,7 @@ public class OrchestrationRequestsTest extends BaseTest { } @Test - public void mapRequestProcessingDataTest() throws JsonParseException, JsonMappingException, IOException { + public void mapRequestProcessingDataTest() throws IOException { RequestProcessingData entry = new RequestProcessingData(); RequestProcessingData secondEntry = new RequestProcessingData(); List> expectedList = new ArrayList<>(); @@ -474,7 +472,7 @@ public class OrchestrationRequestsTest extends BaseTest { } @Test - public void testThatActiveRequestsExceptionsAreMapped() throws Exception { + public void testThatActiveRequestsExceptionsAreMapped() { String testRequestId = UUID.randomUUID().toString(); wireMockServer.stubFor(any(urlPathEqualTo("/infraActiveRequests/" + testRequestId)) .willReturn(aResponse().withStatus(HttpStatus.SC_UNAUTHORIZED))); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsUnitTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsUnitTest.java index fdaca3566f..fcca3a6abb 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsUnitTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsUnitTest.java @@ -46,7 +46,6 @@ import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; import org.onap.so.apihandler.common.ResponseBuilder; import org.onap.so.apihandlerinfra.exceptions.ApiException; -import org.onap.so.apihandlerinfra.exceptions.ContactCamundaException; import org.onap.so.apihandlerinfra.exceptions.ValidateException; import org.onap.so.constants.OrchestrationRequestFormat; import org.onap.so.constants.Status; @@ -485,7 +484,7 @@ public class OrchestrationRequestsUnitTest { } @Test - public void mapRequestStatusToRequestForFormatDetailTest() throws ApiException { + public void mapRequestStatusToRequestForFormatDetailTest() { iar.setRequestStatus(Status.ABORTED.toString()); String result = orchestrationRequests.mapRequestStatusToRequest(iar, OrchestrationRequestFormat.DETAIL.toString()); @@ -494,7 +493,7 @@ public class OrchestrationRequestsUnitTest { } @Test - public void mapRequestStatusToRequestForFormatStatusDetailTest() throws ApiException { + public void mapRequestStatusToRequestForFormatStatusDetailTest() { iar.setRequestStatus(Status.ABORTED.toString()); String result = orchestrationRequests.mapRequestStatusToRequest(iar, "statusDetail"); @@ -503,7 +502,7 @@ public class OrchestrationRequestsUnitTest { @Test - public void mapRequestStatusToRequestForFormatEmptyStringTest() throws ApiException { + public void mapRequestStatusToRequestForFormatEmptyStringTest() { iar.setRequestStatus(Status.ABORTED.toString()); String result = orchestrationRequests.mapRequestStatusToRequest(iar, StringUtils.EMPTY); @@ -525,7 +524,7 @@ public class OrchestrationRequestsUnitTest { } @Test - public void taskNameLookup() throws ContactCamundaException { + public void taskNameLookup() { InfraActiveRequests req = new InfraActiveRequests(); req.setRequestId("70debc2a-d6bc-4795-87ba-38a94d9b0b99"); Instant startInstant = Instant.now().minus(1, ChronoUnit.DAYS); @@ -542,7 +541,7 @@ public class OrchestrationRequestsUnitTest { } @Test - public void noCamundaLookupAfterInterval() throws ContactCamundaException { + public void noCamundaLookupAfterInterval() { InfraActiveRequests req = new InfraActiveRequests(); req.setRequestId("70debc2a-d6bc-4795-87ba-38a94d9b0b99"); Instant startInstant = Instant.now().minus(36, ChronoUnit.DAYS); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestActionMapTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestActionMapTest.java index 57513088b4..5bb4ec7d6a 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestActionMapTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestActionMapTest.java @@ -28,7 +28,7 @@ public class RequestActionMapTest { RequestActionMap test = new RequestActionMap(); @Test - public void getMappedRequestActionTest() throws Exception { + public void getMappedRequestActionTest() { test.getMappedRequestAction("action"); } diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsTest.java index b062d4a2dd..e1601f671d 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsTest.java @@ -64,7 +64,6 @@ import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; import org.springframework.web.util.UriComponentsBuilder; import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JsonMappingException; @@ -254,7 +253,7 @@ public class RequestHandlerUtilsTest extends BaseTest { } @Test - public void setServiceTypeTestNetwork() throws JsonProcessingException { + public void setServiceTypeTestNetwork() { String requestScope = ModelType.network.toString(); Boolean aLaCarteFlag = null; ServiceInstancesRequest sir = new ServiceInstancesRequest(); @@ -272,7 +271,7 @@ public class RequestHandlerUtilsTest extends BaseTest { } @Test - public void setServiceInstanceIdInstanceGroupTest() throws JsonParseException, JsonMappingException, IOException { + public void setServiceInstanceIdInstanceGroupTest() throws JsonMappingException, IOException { String requestScope = "instanceGroup"; ServiceInstancesRequest sir = mapper.readValue(inputStream("/CreateInstanceGroup.json"), ServiceInstancesRequest.class); @@ -326,7 +325,7 @@ public class RequestHandlerUtilsTest extends BaseTest { } @Test - public void setCamundaHeadersTest() throws ContactCamundaException, RequestDbFailureException { + public void setCamundaHeadersTest() { String encryptedAuth = "015E7ACF706C6BBF85F2079378BDD2896E226E09D13DC2784BA309E27D59AB9FAD3A5E039DF0BB8408"; // user:password String key = "07a7159d3bf51a0e53be7a8f89699be7"; HttpHeaders headers = camundaRequestHandler.setCamundaHeaders(encryptedAuth, key); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsUnitTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsUnitTest.java index 557771d298..317d23a419 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsUnitTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsUnitTest.java @@ -130,7 +130,7 @@ public class RequestHandlerUtilsUnitTest { currentActiveRequest.setOriginalRequestId(RESUMED_REQUEST_ID); } - private void setCurrentActiveRequestNullInfraActive() throws IOException { + private void setCurrentActiveRequestNullInfraActive() { currentActiveRequestIARNull.setRequestId(CURRENT_REQUEST_ID); currentActiveRequestIARNull.setSource("VID"); currentActiveRequestIARNull.setStartTime(startTimeStamp); @@ -394,7 +394,7 @@ public class RequestHandlerUtilsUnitTest { } @Test - public void getModelTypeApplyUpdatedConfigTest() throws ApiException { + public void getModelTypeApplyUpdatedConfigTest() { ModelType modelTypeExpected = ModelType.vnf; ModelType modelTypeResult = requestHandler.getModelType(Action.applyUpdatedConfig, null); @@ -402,7 +402,7 @@ public class RequestHandlerUtilsUnitTest { } @Test - public void getModelTypeInPlaceSoftwareUpdateTest() throws ApiException { + public void getModelTypeInPlaceSoftwareUpdateTest() { ModelType modelTypeExpected = ModelType.vnf; ModelType modelTypeResult = requestHandler.getModelType(Action.inPlaceSoftwareUpdate, null); @@ -410,7 +410,7 @@ public class RequestHandlerUtilsUnitTest { } @Test - public void getModelTypeAddMembersTest() throws ApiException { + public void getModelTypeAddMembersTest() { ModelType modelTypeExpected = ModelType.instanceGroup; ModelType modelTypeResult = requestHandler.getModelType(Action.addMembers, null); @@ -418,7 +418,7 @@ public class RequestHandlerUtilsUnitTest { } @Test - public void getModelTypeRemoveMembersTest() throws ApiException { + public void getModelTypeRemoveMembersTest() { ModelType modelTypeExpected = ModelType.instanceGroup; ModelType modelTypeResult = requestHandler.getModelType(Action.removeMembers, null); @@ -426,7 +426,7 @@ public class RequestHandlerUtilsUnitTest { } @Test - public void getModelTypeTest() throws ApiException { + public void getModelTypeTest() { ModelType modelTypeExpected = ModelType.service; ModelInfo modelInfo = new ModelInfo(); modelInfo.setModelType(ModelType.service); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ResumeOrchestrationRequestTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ResumeOrchestrationRequestTest.java index 7191e297ec..43bdbafcee 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ResumeOrchestrationRequestTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ResumeOrchestrationRequestTest.java @@ -122,7 +122,7 @@ public class ResumeOrchestrationRequestTest { @Before - public void setup() throws ValidateException, IOException { + public void setup() throws IOException { // Setup general requestHandler mocks when(requestHandler.getRequestUri(any(), anyString())).thenReturn(requestUri); @@ -250,7 +250,7 @@ public class ResumeOrchestrationRequestTest { } @Test - public void resumeRequestTest() throws ApiException, IOException { + public void resumeRequestTest() throws ApiException { Response response = null; doReturn(instanceIdMap).when(resumeReq).setInstanceIdMap(infraActiveRequest, ModelType.service.toString()); doReturn(SERVICE_INSTANCE_NAME).when(resumeReq).getInstanceName(infraActiveRequest, @@ -302,7 +302,7 @@ public class ResumeOrchestrationRequestTest { } @Test - public void resumeRequestTestALaCarteNull() throws ApiException, IOException { + public void resumeRequestTestALaCarteNull() throws ApiException { Response response = null; doReturn(instanceIdMap).when(resumeReq).setInstanceIdMap(infraActiveRequest, ModelType.service.toString()); doReturn(SERVICE_INSTANCE_NAME).when(resumeReq).getInstanceName(infraActiveRequest, diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java index cb48d007b5..82e0e9d279 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java @@ -75,7 +75,6 @@ import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; import org.springframework.util.ResourceUtils; import org.springframework.web.util.UriComponentsBuilder; -import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JsonMappingException; @@ -2904,7 +2903,7 @@ public class ServiceInstancesTest extends BaseTest { } @Test - public void setServiceTypeTestNetwork() throws JsonProcessingException { + public void setServiceTypeTestNetwork() { String requestScope = ModelType.network.toString(); Boolean aLaCarteFlag = null; ServiceInstancesRequest sir = new ServiceInstancesRequest(); @@ -2922,7 +2921,7 @@ public class ServiceInstancesTest extends BaseTest { } @Test - public void setServiceInstanceIdInstanceGroupTest() throws JsonParseException, JsonMappingException, IOException { + public void setServiceInstanceIdInstanceGroupTest() throws JsonMappingException, IOException { String requestScope = "instanceGroup"; ServiceInstancesRequest sir = mapper.readValue(inputStream("/CreateInstanceGroup.json"), ServiceInstancesRequest.class); @@ -2976,7 +2975,7 @@ public class ServiceInstancesTest extends BaseTest { } @Test - public void handleReplaceInstance_Test() throws JsonParseException, JsonMappingException, IOException { + public void handleReplaceInstance_Test() throws JsonMappingException, IOException { String replaceVfModule = inputStream("/ReplaceVfModule.json"); ObjectMapper mapper = new ObjectMapper(); ServiceInstancesRequest sir = mapper.readValue(replaceVfModule, ServiceInstancesRequest.class); @@ -2985,8 +2984,7 @@ public class ServiceInstancesTest extends BaseTest { } @Test - public void handleReplaceInstance_retainAssignments_Test() - throws JsonParseException, JsonMappingException, IOException { + public void handleReplaceInstance_retainAssignments_Test() throws JsonMappingException, IOException { String replaceVfModule = inputStream("/ReplaceVfModuleRetainAssignments.json"); ObjectMapper mapper = new ObjectMapper(); ServiceInstancesRequest sir = mapper.readValue(replaceVfModule, ServiceInstancesRequest.class); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/TasksHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/TasksHandlerTest.java index 14d03f60bd..07c484744e 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/TasksHandlerTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/TasksHandlerTest.java @@ -28,7 +28,6 @@ import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; import java.io.IOException; -import java.text.ParseException; import java.util.ArrayList; import java.util.List; import javax.ws.rs.core.MediaType; @@ -44,7 +43,6 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; import org.springframework.web.util.UriComponentsBuilder; -import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; @@ -54,8 +52,7 @@ public class TasksHandlerTest extends BaseTest { private final String basePath = "/onap/so/infra/tasks/v1"; @Test - public void getTasksTestByOriginalRequestId() - throws ParseException, JSONException, JsonParseException, JsonMappingException, IOException { + public void getTasksTestByOriginalRequestId() throws JSONException, JsonMappingException, IOException { wireMockServer.stubFor(post(urlPathEqualTo("/sobpmnengine/task")) .willReturn(aResponse().withHeader("Content-Type", "application/json") .withBodyFile("Camunda/GetTaskResponse.json").withStatus(HttpStatus.SC_OK))); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandlerTest.java index 29b75ac96d..552d2046c0 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandlerTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandlerTest.java @@ -22,7 +22,6 @@ package org.onap.so.apihandlerinfra; -import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; @@ -46,7 +45,6 @@ import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; -import java.text.ParseException; import java.util.ArrayList; import java.util.List; import static com.github.tomakehurst.wiremock.client.WireMock.*; @@ -68,7 +66,7 @@ public class WorkflowSpecificationsHandlerTest extends BaseTest { @Test public void queryWorkflowSpecificationsByVnfModelUUID_Test_Success() - throws ParseException, JSONException, JsonParseException, JsonMappingException, IOException { + throws JSONException, JsonMappingException, IOException { final String urlPath = basePath + "/v1/workflows"; HttpHeaders headers = new HttpHeaders(); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/DelE2ESvcRespTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/DelE2ESvcRespTest.java index bc5869e416..004c61ae7b 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/DelE2ESvcRespTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/DelE2ESvcRespTest.java @@ -28,7 +28,7 @@ public class DelE2ESvcRespTest { DelE2ESvcResp test = new DelE2ESvcResp(); @Test - public void verifyDelE2ESvcResp() throws Exception { + public void verifyDelE2ESvcResp() { test.setOperationId("operationId"); assertEquals(test.getOperationId(), "operationId"); } diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/E2ERequestTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/E2ERequestTest.java index cbc835dfbb..84dbeb62b2 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/E2ERequestTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/E2ERequestTest.java @@ -28,7 +28,7 @@ public class E2ERequestTest { E2ERequest test = new E2ERequest(); @Test - public void verifyE2ERequest() throws Exception { + public void verifyE2ERequest() { test.setOperationId("operationId"); assertEquals(test.getOperationId(), "operationId"); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/E2EServiceInstanceDeleteRequestTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/E2EServiceInstanceDeleteRequestTest.java index 8dfe6dc006..e236bce12f 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/E2EServiceInstanceDeleteRequestTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/E2EServiceInstanceDeleteRequestTest.java @@ -29,7 +29,7 @@ public class E2EServiceInstanceDeleteRequestTest { E2EServiceInstanceDeleteRequest test = new E2EServiceInstanceDeleteRequest(); @Test - public void verifyE2ESerInstanceDelReq() throws Exception { + public void verifyE2ESerInstanceDelReq() { test.setGlobalSubscriberId("id"); assertEquals(test.getGlobalSubscriberId(), "id"); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/E2EUserParamTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/E2EUserParamTest.java index bb331904ca..26fd8c1763 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/E2EUserParamTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/E2EUserParamTest.java @@ -30,7 +30,7 @@ public class E2EUserParamTest { E2EUserParam test = new E2EUserParam(); @Test - public void verifyE2EParam() throws Exception { + public void verifyE2EParam() { test.setName("name"); assertEquals(test.getName(), "name"); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/NsParametersTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/NsParametersTest.java index 5b09cefc85..03bdc1ac63 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/NsParametersTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/NsParametersTest.java @@ -33,7 +33,7 @@ public class NsParametersTest { @Test - public void verifyNsParameters() throws Exception { + public void verifyNsParameters() { LocationConstraint obj = new LocationConstraint(); List locationConstraints = new ArrayList(); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/AAIDataRetrievalTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/AAIDataRetrievalTest.java index 61ac542810..576a9f5242 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/AAIDataRetrievalTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/AAIDataRetrievalTest.java @@ -74,7 +74,7 @@ public class AAIDataRetrievalTest { } @Test - public void getVolumeGroupsOfVnfTest() throws Exception { + public void getVolumeGroupsOfVnfTest() { VolumeGroups volumeGroups = getVolumeGroups(); AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("vnfId")) .relatedTo(Types.VOLUME_GROUPS.getFragment()); @@ -86,7 +86,7 @@ public class AAIDataRetrievalTest { } @Test - public void getVolumeGroupsOfVnfWhenNoneTest() throws Exception { + public void getVolumeGroupsOfVnfWhenNoneTest() { VolumeGroups volumeGroups = new VolumeGroups(); AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("vnfId")) .relatedTo(Types.VOLUME_GROUPS.getFragment()); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilderTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilderTest.java index 912c026203..16329d474f 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilderTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilderTest.java @@ -167,7 +167,7 @@ public class BpmnRequestBuilderTest { } @Test - public void test_mapCloudConfigurationVnf() throws Exception { + public void test_mapCloudConfigurationVnf() { String vnfId = "6fb01019-c3c4-41fe-b307-d1c56850b687"; Map filters = new HashMap<>(); filters.put("vnfId", new String[] {"EQ", vnfId}); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/NetworkRestHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/NetworkRestHandlerTest.java index 53d8ca4275..8c17237830 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/NetworkRestHandlerTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/NetworkRestHandlerTest.java @@ -24,7 +24,6 @@ import static com.shazam.shazamcrest.MatcherAssert.assertThat; import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.eq; -import java.net.MalformedURLException; import java.util.HashMap; import java.util.Map; import javax.ws.rs.container.ContainerRequestContext; @@ -40,7 +39,6 @@ import org.mockito.junit.MockitoJUnitRunner; import org.onap.so.apihandler.common.RequestClientParameter; import org.onap.so.apihandlerinfra.Action; import org.onap.so.apihandlerinfra.Constants; -import org.onap.so.apihandlerinfra.infra.rest.exception.NoRecipeException; import org.onap.so.constants.Status; import org.onap.so.db.catalog.client.CatalogDbClient; import org.onap.so.db.request.beans.InfraActiveRequests; @@ -72,7 +70,7 @@ public class NetworkRestHandlerTest { private ObjectMapper mapper = new ObjectMapper(); @Test - public void test_checkDuplicateRequest() throws MalformedURLException, NoRecipeException { + public void test_checkDuplicateRequest() { ArgumentCaptor instanceIdCaptor = ArgumentCaptor.forClass(HashMap.class); restHandler.checkDuplicateRequest("serviceInstanceId", "networkId", "instanceName", "requestId"); Mockito.verify(infraActiveRequestsClient, Mockito.times(1)).checkInstanceNameDuplicate( @@ -83,7 +81,7 @@ public class NetworkRestHandlerTest { } @Test - public void test_saveInstanceName() throws MalformedURLException, NoRecipeException { + public void test_saveInstanceName() { ServiceInstancesRequest request = createTestRequest(); InfraActiveRequests dbRequest = createDatabaseRecord(); restHandler.saveInstanceName(request, dbRequest); @@ -104,7 +102,7 @@ public class NetworkRestHandlerTest { } @Test - public void test_createInfraActiveRequestForDelete() throws Exception { + public void test_createInfraActiveRequestForDelete() { InfraActiveRequests expected = new InfraActiveRequests(); expected.setRequestAction(Action.deleteInstance.toString()); expected.setServiceInstanceId("serviceInstanceId"); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/ServiceInstanceRestHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/ServiceInstanceRestHandlerTest.java index 2cf6be9839..4a655e5f3f 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/ServiceInstanceRestHandlerTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/ServiceInstanceRestHandlerTest.java @@ -25,7 +25,6 @@ import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.doReturn; -import java.net.MalformedURLException; import java.util.HashMap; import java.util.Map; import javax.ws.rs.container.ContainerRequestContext; @@ -76,7 +75,7 @@ public class ServiceInstanceRestHandlerTest { private ObjectMapper mapper = new ObjectMapper(); @Test - public void test_find_service_recipe() throws MalformedURLException, NoRecipeException { + public void test_find_service_recipe() throws NoRecipeException { ServiceRecipe expected = new ServiceRecipe(); expected.setAction("createInstance"); doReturn(expected).when(catalogDbClient) @@ -88,7 +87,7 @@ public class ServiceInstanceRestHandlerTest { } @Test - public void test_find_service_recipe_default_recipe() throws MalformedURLException, NoRecipeException { + public void test_find_service_recipe_default_recipe() throws NoRecipeException { ServiceRecipe expected = new ServiceRecipe(); expected.setAction("createInstance"); doReturn(null).when(catalogDbClient) @@ -104,7 +103,7 @@ public class ServiceInstanceRestHandlerTest { } @Test - public void test_find_service_recipe_not_found() throws MalformedURLException, NoRecipeException { + public void test_find_service_recipe_not_found() throws NoRecipeException { ServiceRecipe expected = new ServiceRecipe(); expected.setAction("createInstance"); doReturn(null).when(catalogDbClient) @@ -118,8 +117,7 @@ public class ServiceInstanceRestHandlerTest { } @Test - public void test_checkDuplicateRequest() - throws MalformedURLException, NoRecipeException, RequestConflictedException { + public void test_checkDuplicateRequest() throws RequestConflictedException { ArgumentCaptor instanceIdCaptor = ArgumentCaptor.forClass(HashMap.class); restHandler.checkDuplicateRequest("serviceInstanceId", "instanceName", "requestId"); Mockito.verify(infraActiveRequestsClient, Mockito.times(1)).checkInstanceNameDuplicate( @@ -129,7 +127,7 @@ public class ServiceInstanceRestHandlerTest { } @Test - public void test_saveInstanceName() throws MalformedURLException, NoRecipeException { + public void test_saveInstanceName() { ServiceInstancesRequest request = createTestRequest(); InfraActiveRequests dbRequest = createDatabaseRecord(); restHandler.saveInstanceName(request, dbRequest); @@ -150,7 +148,7 @@ public class ServiceInstanceRestHandlerTest { } @Test - public void test_createInfraActiveRequestForDelete() throws Exception { + public void test_createInfraActiveRequestForDelete() { InfraActiveRequests expected = new InfraActiveRequests(); expected.setRequestAction(Action.deleteInstance.toString()); expected.setServiceInstanceId("serviceInstanceId"); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VfModuleRestHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VfModuleRestHandlerTest.java index 5b284d9aef..2071e18430 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VfModuleRestHandlerTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VfModuleRestHandlerTest.java @@ -25,7 +25,6 @@ import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.doReturn; -import java.net.MalformedURLException; import java.util.HashMap; import java.util.Map; import javax.ws.rs.container.ContainerRequestContext; @@ -75,7 +74,7 @@ public class VfModuleRestHandlerTest { private ObjectMapper mapper = new ObjectMapper(); @Test - public void test_find_vf_module_recipe() throws MalformedURLException, NoRecipeException { + public void test_find_vf_module_recipe() throws NoRecipeException { VnfComponentsRecipe expected = new VnfComponentsRecipe(); expected.setAction("createInstance"); doReturn(expected).when(catalogDbClient) @@ -90,7 +89,7 @@ public class VfModuleRestHandlerTest { } @Test - public void test_find_vf_module_recipe_default_recipe() throws MalformedURLException, NoRecipeException { + public void test_find_vf_module_recipe_default_recipe() throws NoRecipeException { VnfComponentsRecipe expected = new VnfComponentsRecipe(); expected.setAction("createInstance"); doReturn(null).when(catalogDbClient).getFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction( @@ -107,7 +106,7 @@ public class VfModuleRestHandlerTest { } @Test - public void test_find_vf_module_recipe_not_found() throws MalformedURLException, NoRecipeException { + public void test_find_vf_module_recipe_not_found() throws NoRecipeException { VnfComponentsRecipe expected = new VnfComponentsRecipe(); expected.setAction("createInstance"); exceptionRule.expect(NoRecipeException.class); @@ -117,7 +116,7 @@ public class VfModuleRestHandlerTest { } @Test - public void test_checkDuplicateRequest() throws MalformedURLException, NoRecipeException { + public void test_checkDuplicateRequest() { ArgumentCaptor instanceIdCaptor = ArgumentCaptor.forClass(HashMap.class); restHandler.checkDuplicateRequest("serviceInstanceId", "vnfId", "vfModuleId", "instanceName", "requestId"); Mockito.verify(infraActiveRequestsClient, Mockito.times(1)).checkInstanceNameDuplicate( @@ -129,7 +128,7 @@ public class VfModuleRestHandlerTest { } @Test - public void test_saveInstanceName() throws MalformedURLException, NoRecipeException { + public void test_saveInstanceName() { ServiceInstancesRequest request = createTestRequest(); InfraActiveRequests dbRequest = createDatabaseRecord(); restHandler.saveInstanceName(request, dbRequest); @@ -150,7 +149,7 @@ public class VfModuleRestHandlerTest { } @Test - public void test_createInfraActiveRequestForDelete() throws Exception { + public void test_createInfraActiveRequestForDelete() { InfraActiveRequests expected = new InfraActiveRequests(); expected.setRequestAction(Action.deleteInstance.toString()); expected.setServiceInstanceId("serviceInstanceId"); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VnfRestHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VnfRestHandlerTest.java index cf141c06cd..a60958ac28 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VnfRestHandlerTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VnfRestHandlerTest.java @@ -24,7 +24,6 @@ import static com.shazam.shazamcrest.MatcherAssert.assertThat; import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.eq; -import java.net.MalformedURLException; import java.util.HashMap; import java.util.Map; import javax.ws.rs.container.ContainerRequestContext; @@ -40,7 +39,6 @@ import org.mockito.junit.MockitoJUnitRunner; import org.onap.so.apihandler.common.RequestClientParameter; import org.onap.so.apihandlerinfra.Action; import org.onap.so.apihandlerinfra.Constants; -import org.onap.so.apihandlerinfra.infra.rest.exception.NoRecipeException; import org.onap.so.constants.Status; import org.onap.so.db.catalog.beans.Recipe; import org.onap.so.db.catalog.beans.ServiceRecipe; @@ -74,7 +72,7 @@ public class VnfRestHandlerTest { private ObjectMapper mapper = new ObjectMapper(); @Test - public void test_find_vnf_recipe() throws MalformedURLException, NoRecipeException { + public void test_find_vnf_recipe() { ServiceRecipe expected = new ServiceRecipe(); expected.setOrchestrationUri("/mso/async/services/WorkflowActionBB"); Recipe actual = restHandler.findVnfModuleRecipe("testModelId", ModelType.vnf.toString(), @@ -83,7 +81,7 @@ public class VnfRestHandlerTest { } @Test - public void test_checkDuplicateRequest() throws MalformedURLException, NoRecipeException { + public void test_checkDuplicateRequest() { ArgumentCaptor instanceIdCaptor = ArgumentCaptor.forClass(HashMap.class); restHandler.checkDuplicateRequest("serviceInstanceId", "vnfId", "instanceName", "requestId"); Mockito.verify(infraActiveRequestsClient, Mockito.times(1)).checkInstanceNameDuplicate( @@ -94,7 +92,7 @@ public class VnfRestHandlerTest { } @Test - public void test_saveInstanceName() throws MalformedURLException, NoRecipeException { + public void test_saveInstanceName() { ServiceInstancesRequest request = createTestRequest(); InfraActiveRequests dbRequest = createDatabaseRecord(); restHandler.saveInstanceName(request, dbRequest); @@ -115,7 +113,7 @@ public class VnfRestHandlerTest { } @Test - public void test_createInfraActiveRequestForDelete() throws Exception { + public void test_createInfraActiveRequestForDelete() { InfraActiveRequests expected = new InfraActiveRequests(); expected.setRequestAction(Action.deleteInstance.toString()); expected.setServiceInstanceId("serviceInstanceId"); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VolumeRestHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VolumeRestHandlerTest.java index 3adccc2070..bdef8fb9e6 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VolumeRestHandlerTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VolumeRestHandlerTest.java @@ -24,7 +24,6 @@ import static com.shazam.shazamcrest.MatcherAssert.assertThat; import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.eq; -import java.net.MalformedURLException; import java.util.HashMap; import java.util.Map; import javax.ws.rs.container.ContainerRequestContext; @@ -40,7 +39,6 @@ import org.mockito.junit.MockitoJUnitRunner; import org.onap.so.apihandler.common.RequestClientParameter; import org.onap.so.apihandlerinfra.Action; import org.onap.so.apihandlerinfra.Constants; -import org.onap.so.apihandlerinfra.infra.rest.exception.NoRecipeException; import org.onap.so.constants.Status; import org.onap.so.db.catalog.client.CatalogDbClient; import org.onap.so.db.request.beans.InfraActiveRequests; @@ -72,7 +70,7 @@ public class VolumeRestHandlerTest { private ObjectMapper mapper = new ObjectMapper(); @Test - public void test_checkDuplicateRequest() throws MalformedURLException, NoRecipeException { + public void test_checkDuplicateRequest() { ArgumentCaptor instanceIdCaptor = ArgumentCaptor.forClass(HashMap.class); restHandler.checkDuplicateRequest("serviceInstanceId", "vnfId", "volumeGroupId", "instanceName", "requestId"); Mockito.verify(infraActiveRequestsClient, Mockito.times(1)).checkInstanceNameDuplicate( @@ -84,7 +82,7 @@ public class VolumeRestHandlerTest { } @Test - public void test_saveInstanceName() throws MalformedURLException, NoRecipeException { + public void test_saveInstanceName() { ServiceInstancesRequest request = createTestRequest(); InfraActiveRequests dbRequest = createDatabaseRecord(); restHandler.saveInstanceName(request, dbRequest); @@ -105,7 +103,7 @@ public class VolumeRestHandlerTest { } @Test - public void test_createInfraActiveRequestForDelete() throws Exception { + public void test_createInfraActiveRequestForDelete() { InfraActiveRequests expected = new InfraActiveRequests(); expected.setRequestAction(Action.deleteInstance.toString()); expected.setServiceInstanceId("serviceInstanceId"); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudOrchestrationTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudOrchestrationTest.java index 71784fa286..586bb35899 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudOrchestrationTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudOrchestrationTest.java @@ -54,14 +54,14 @@ public class CloudOrchestrationTest extends BaseTest { private HttpHeaders headers = new HttpHeaders(); @Before - public void setupTestClass() throws Exception { + public void setupTestClass() { wireMockServer.stubFor(post(urlPathEqualTo(getTestUrl(""))).willReturn( aResponse().withHeader(javax.ws.rs.core.HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withStatus(HttpStatus.SC_CREATED))); } @Test - public void testCreateOpEnvObjectMapperError() throws IOException { + public void testCreateOpEnvObjectMapperError() { headers.set("Accept", MediaType.APPLICATION_JSON); headers.set("Content-Type", MediaType.APPLICATION_JSON); @@ -78,7 +78,7 @@ public class CloudOrchestrationTest extends BaseTest { } @Test - public void testCreateOpEnvError() throws IOException { + public void testCreateOpEnvError() { String request = "{\"requestDetails\":{\"requestInfo\":{\"resourceType\":\"operationalEnvironment\",\"instanceName\": \"myOpEnv\",\"source\": \"VID\",\"requestorId\": \"xxxxxx\"}," diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestrationTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestrationTest.java index db9f45e3ac..99da89f557 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestrationTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestrationTest.java @@ -26,7 +26,6 @@ import static com.github.tomakehurst.wiremock.client.WireMock.post; import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import java.text.ParseException; import javax.ws.rs.core.MediaType; import org.apache.http.HttpStatus; import org.junit.Before; @@ -50,7 +49,7 @@ public class CloudResourcesOrchestrationTest extends BaseTest { HttpHeaders headers = new HttpHeaders(); @Before - public void setupTestClass() throws Exception { + public void setupTestClass() { wireMockServer.stubFor(post(urlPathEqualTo(getTestUrl(""))).willReturn( aResponse().withHeader(javax.ws.rs.core.HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withStatus(HttpStatus.SC_CREATED))); @@ -142,7 +141,7 @@ public class CloudResourcesOrchestrationTest extends BaseTest { } @Test - public void testUnlock() throws ParseException { + public void testUnlock() { wireMockServer.stubFor(get(urlPathEqualTo(getTestUrl("requestIdtestUnlock"))).willReturn( aResponse().withHeader(javax.ws.rs.core.HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBody(String.format(getResponseTemplate, "requestIdtestUnlock", "IN_PROGRESS")) @@ -161,7 +160,7 @@ public class CloudResourcesOrchestrationTest extends BaseTest { } @Test - public void testUnlockComplete() throws ParseException { + public void testUnlockComplete() { wireMockServer.stubFor(get(urlPathEqualTo(getTestUrl("requestIdtestUnlockComplete"))).willReturn( aResponse().withHeader(javax.ws.rs.core.HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) .withBody(String.format(getResponseTemplate, "requestIdtestUnlockComplete", "COMPLETE")) @@ -204,7 +203,7 @@ public class CloudResourcesOrchestrationTest extends BaseTest { } @Test - public void testGetOperationalEnvSuccess() throws ParseException { + public void testGetOperationalEnvSuccess() { wireMockServer .stubFor(get(urlPathEqualTo(getTestUrl("90c56827-1c78-4827-bc4d-6afcdb37a51f"))).willReturn( aResponse().withHeader(javax.ws.rs.core.HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) @@ -232,7 +231,7 @@ public class CloudResourcesOrchestrationTest extends BaseTest { } @Test - public void testGetOperationalEnvFilterSuccess() throws ParseException { + public void testGetOperationalEnvFilterSuccess() { wireMockServer .stubFor(get(urlPathEqualTo(getTestUrl("requestIdtestGetOperationalEnvFilterSuccess"))).willReturn( aResponse().withHeader(javax.ws.rs.core.HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) @@ -269,7 +268,7 @@ public class CloudResourcesOrchestrationTest extends BaseTest { } @Test - public void testGetOperationalEnvFilterException1() throws ParseException { + public void testGetOperationalEnvFilterException1() { InfraActiveRequests iar = new InfraActiveRequests(); iar.setRequestId("requestId-getOpEnvFilterEx1"); iar.setRequestScope("requestScope"); @@ -293,7 +292,7 @@ public class CloudResourcesOrchestrationTest extends BaseTest { } @Test - public void testGetOperationalEnvFilterException2() throws ParseException { + public void testGetOperationalEnvFilterException2() { InfraActiveRequests iar = new InfraActiveRequests(); iar.setRequestId("requestIdFilterException2"); iar.setRequestScope("requestScope"); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/ModelDistributionRequestTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/ModelDistributionRequestTest.java index 7893b81d8e..67e8b66dbe 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/ModelDistributionRequestTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/ModelDistributionRequestTest.java @@ -113,7 +113,7 @@ public class ModelDistributionRequestTest extends BaseTest { } @Test - public void testSuccess_PATCH() throws ApiException, IOException { + public void testSuccess_PATCH() throws IOException { String path = "/onap/so/infra/modelDistributions/v1/distributions/ff3514e3-5a33-55df-13ab-12abad84e7fa"; ObjectMapper mapper = new ObjectMapper(); Distribution distRequest = mapper.readValue(requestJSON, Distribution.class); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/OperationalEnvironmentPublisherTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/OperationalEnvironmentPublisherTest.java index b4d0b8d498..d6653bd421 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/OperationalEnvironmentPublisherTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/OperationalEnvironmentPublisherTest.java @@ -21,8 +21,6 @@ package org.onap.so.apihandlerinfra.tenantisolation.dmaap; import static org.junit.Assert.assertEquals; -import java.io.FileNotFoundException; -import java.io.IOException; import org.junit.Test; import org.onap.so.apihandlerinfra.BaseTest; import org.springframework.beans.factory.annotation.Autowired; @@ -34,7 +32,7 @@ public class OperationalEnvironmentPublisherTest extends BaseTest { private OperationalEnvironmentPublisher publisher; @Test - public void getProperties() throws FileNotFoundException, IOException { + public void getProperties() { assertEquals( "B3705D6C2D521257CC2422ACCF03B001811ACC49F564DDB3A2CF2A1378B6D35A23CDCB696F2E1EDFBE6758DFE7C74B94F4A7DF84A0E2BB904935AC4D900D5597DF981ADE6CE1FF3AF993BED0", diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/SDCDmaapClientTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/SDCDmaapClientTest.java index 0455c943e4..fd1f3b3575 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/SDCDmaapClientTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/SDCDmaapClientTest.java @@ -22,7 +22,6 @@ package org.onap.so.apihandlerinfra.tenantisolation.dmaap; import static org.junit.Assert.assertEquals; import java.io.IOException; -import java.text.ParseException; import org.junit.Test; import org.onap.so.apihandlerinfra.BaseTest; import com.fasterxml.jackson.databind.ObjectMapper; @@ -41,7 +40,7 @@ public class SDCDmaapClientTest extends BaseTest { @Test - public void verifyasdcCreateoeRequest() throws IOException, ParseException { + public void verifyasdcCreateoeRequest() throws IOException { ObjectMapper mapper = new ObjectMapper(); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientHelperTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientHelperTest.java index 75d98180ac..2cd580196e 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientHelperTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientHelperTest.java @@ -52,7 +52,7 @@ public class AAIClientHelperTest extends BaseTest { private AAIClientHelper clientHelper; @Test - public void testGetAaiOperationalEnvironmentSuccess() throws Exception { + public void testGetAaiOperationalEnvironmentSuccess() { wireMockServer.stubFor( get(urlPathMatching("/aai/" + AAIVersion.LATEST + "/cloud-infrastructure/operational-environments/.*")) .willReturn(aResponse().withHeader("Content-Type", "application/json") diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientObjectBuilderTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientObjectBuilderTest.java index 4a602345d3..9dbf5d9714 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientObjectBuilderTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientObjectBuilderTest.java @@ -57,7 +57,7 @@ public class AAIClientObjectBuilderTest extends BaseTest { } @Test - public void testGetAaiClientObjectBuilder() throws Exception { + public void testGetAaiClientObjectBuilder() { AAIClientObjectBuilder builder = new AAIClientObjectBuilder(); org.onap.aai.domain.yang.OperationalEnvironment operEnv = builder.buildAAIOperationalEnvironment("Active", request); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/ActivateVnfDBHelperTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/ActivateVnfDBHelperTest.java index 22185e24b8..a3c4ec8de2 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/ActivateVnfDBHelperTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/ActivateVnfDBHelperTest.java @@ -79,7 +79,7 @@ public class ActivateVnfDBHelperTest extends BaseTest { } @Test - public void testOperationalEnvDistributionStatusDbMethods() throws Exception { + public void testOperationalEnvDistributionStatusDbMethods() { // test insert method OperationalEnvDistributionStatus distStatus1 = dbHelper.insertRecordToOperationalEnvDistributionStatus( @@ -99,7 +99,7 @@ public class ActivateVnfDBHelperTest extends BaseTest { } @Test - public void testOperationalEnvServiceModelStatusDbMethods() throws Exception { + public void testOperationalEnvServiceModelStatusDbMethods() { // test insert method OperationalEnvServiceModelStatus serviceModelStatus1 = dbHelper.insertRecordToOperationalEnvServiceModelStatus( diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/client/grm/GRMClientTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/client/grm/GRMClientTest.java index 2e9576cf7c..378142d20d 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/client/grm/GRMClientTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/client/grm/GRMClientTest.java @@ -57,7 +57,7 @@ public class GRMClientTest extends BaseTest { "(?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-5][0-9a-f]{3}-?[089ab][0-9a-f]{3}-?[0-9a-f]{12}$"; @BeforeClass - public static void setUp() throws Exception { + public static void setUp() { System.setProperty("mso.config.path", "src/test/resources"); } diff --git a/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/SiteStatusTest.java b/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/SiteStatusTest.java index 943a09055c..77b9593081 100644 --- a/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/SiteStatusTest.java +++ b/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/SiteStatusTest.java @@ -48,7 +48,7 @@ public class SiteStatusTest { @Test @Transactional - public void timeStampCreated() throws InterruptedException, NoEntityFoundException { + public void timeStampCreated() throws NoEntityFoundException { SiteStatus found = repository.findById("test name4").orElseThrow(() -> new NoEntityFoundException("Cannot Find Site")); diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/CloudIdentityTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/CloudIdentityTest.java index 3e98533369..18105a836c 100644 --- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/CloudIdentityTest.java +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/CloudIdentityTest.java @@ -23,7 +23,6 @@ package org.onap.so.db.catalog.beans; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import java.security.GeneralSecurityException; import org.junit.Test; import org.onap.so.utils.CryptoUtils; @@ -65,7 +64,7 @@ public class CloudIdentityTest { } @Test - public final void testEncryption() throws GeneralSecurityException { + public final void testEncryption() { String encrypted = CryptoUtils.encryptCloudConfigPassword("password"); assertTrue(encrypted != null); assertTrue(!encrypted.equals("password")); diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/ActivitySpecRepositoryTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/ActivitySpecRepositoryTest.java index 024940f68d..853fcf1043 100644 --- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/ActivitySpecRepositoryTest.java +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/ActivitySpecRepositoryTest.java @@ -28,7 +28,7 @@ public class ActivitySpecRepositoryTest extends BaseTest { private ActivitySpecRepository activitySpecRepository; @Test - public void findAllTest() throws Exception { + public void findAllTest() { List activitySpecList = activitySpecRepository.findAll(); Assert.assertFalse(CollectionUtils.isEmpty(activitySpecList)); } diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CloudSiteRepositoryTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CloudSiteRepositoryTest.java index a6f1059ba0..3d7169368a 100644 --- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CloudSiteRepositoryTest.java +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CloudSiteRepositoryTest.java @@ -35,7 +35,7 @@ public class CloudSiteRepositoryTest extends BaseTest { private CloudSiteRepository cloudSiteRepository; @Test - public void findByClliAndAicVersionTest() throws Exception { + public void findByClliAndAicVersionTest() { CloudSite cloudSite = cloudSiteRepository.findByClliAndCloudVersion("MDT13", "2.5"); Assert.assertNotNull(cloudSite); Assert.assertEquals("mtn13", cloudSite.getId()); @@ -51,7 +51,7 @@ public class CloudSiteRepositoryTest extends BaseTest { } @Test - public void findAllTest() throws Exception { + public void findAllTest() { List cloudSiteList = cloudSiteRepository.findAll(); Assert.assertFalse(CollectionUtils.isEmpty(cloudSiteList)); } diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CollectionNetworkResourceCustomizationRepositoryTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CollectionNetworkResourceCustomizationRepositoryTest.java index 3740fd2058..d600554ba0 100644 --- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CollectionNetworkResourceCustomizationRepositoryTest.java +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CollectionNetworkResourceCustomizationRepositoryTest.java @@ -33,13 +33,13 @@ public class CollectionNetworkResourceCustomizationRepositoryTest extends BaseTe private CollectionNetworkResourceCustomizationRepository cnrcRepo; @Test - public void findAllTest() throws Exception { + public void findAllTest() { List cnrcList = cnrcRepo.findAll(); Assert.assertFalse(CollectionUtils.isEmpty(cnrcList)); } @Test - public void findOneByUuidTest() throws Exception { + public void findOneByUuidTest() { CollectionNetworkResourceCustomization cnrc = cnrcRepo.findOneByModelCustomizationUUID("3bdbb104-ffff-483e-9f8b-c095b3d3068c"); Assert.assertTrue(cnrc != null); diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepositoryTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepositoryTest.java index a13deae159..c19d25ef71 100644 --- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepositoryTest.java +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepositoryTest.java @@ -43,14 +43,14 @@ public class CvnfcCustomizationRepositoryTest extends BaseTest { @Test - public void findAllTest() throws Exception { + public void findAllTest() { List cvnfcCustomizationList = cvnfcCustomizationRepository.findAll(); Assert.assertFalse(CollectionUtils.isEmpty(cvnfcCustomizationList)); } @Test @Transactional - public void createAndGetAllTest() throws Exception { + public void createAndGetAllTest() { CvnfcCustomization cvnfcCustomization = setUpCvnfcCustomization(); cvnfcCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459"); @@ -98,7 +98,7 @@ public class CvnfcCustomizationRepositoryTest extends BaseTest { @Test @Transactional - public void createAndGetCvnfcCustomizationListTest() throws Exception { + public void createAndGetCvnfcCustomizationListTest() { CvnfcCustomization cvnfcCustomization = setUpCvnfcCustomization(); cvnfcCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459"); @@ -149,7 +149,7 @@ public class CvnfcCustomizationRepositoryTest extends BaseTest { @Test @Transactional - public void createAndGetCvnfcCustomizationTest() throws Exception { + public void createAndGetCvnfcCustomizationTest() { CvnfcCustomization cvnfcCustomization = setUpCvnfcCustomization(); cvnfcCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459"); diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/ProcessingFlagsRepositoryTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/ProcessingFlagsRepositoryTest.java index e8a8263d95..555fbfb5d7 100644 --- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/ProcessingFlagsRepositoryTest.java +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/ProcessingFlagsRepositoryTest.java @@ -32,7 +32,7 @@ public class ProcessingFlagsRepositoryTest extends BaseTest { private ProcessingFlagsRepository processingFlagsRepository; @Test - public void findByFlagTest() throws Exception { + public void findByFlagTest() { ProcessingFlags processingFlags = processingFlagsRepository.findByFlag("TESTFLAG"); Assert.assertNotNull(processingFlags); Assert.assertEquals("TESTENDPOINT", processingFlags.getEndpoint()); diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/WorkflowRepositoryTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/WorkflowRepositoryTest.java index e47c61d8b4..457dd758b5 100644 --- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/WorkflowRepositoryTest.java +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/WorkflowRepositoryTest.java @@ -28,14 +28,14 @@ public class WorkflowRepositoryTest extends BaseTest { private WorkflowRepository workflowRepository; @Test - public void findByArtifactUuid_ValidUuid_ExpectedOutput() throws Exception { + public void findByArtifactUuid_ValidUuid_ExpectedOutput() { Workflow workflow = workflowRepository.findByArtifactUUID("5b0c4322-643d-4c9f-b184-4516049e99b1"); assertEquals("artifactName", "testingWorkflow.bpmn", workflow.getArtifactName()); } @Test - public void findByVnfResourceModelUUIDTest() throws Exception { + public void findByVnfResourceModelUUIDTest() { List workflows = workflowRepository.findWorkflowByVnfModelUUID("ff2ae348-214a-11e7-93ae-92361f002671"); @@ -46,7 +46,7 @@ public class WorkflowRepositoryTest extends BaseTest { } @Test - public void findBySourceTest() throws Exception { + public void findBySourceTest() { List workflows = workflowRepository.findBySource("sdc"); Assert.assertTrue(workflows != null); diff --git a/so-optimization-clients/src/test/java/org/onap/so/client/sniro/SniroClientTestIT.java b/so-optimization-clients/src/test/java/org/onap/so/client/sniro/SniroClientTestIT.java index 56c52388f8..cecd41b3a2 100644 --- a/so-optimization-clients/src/test/java/org/onap/so/client/sniro/SniroClientTestIT.java +++ b/so-optimization-clients/src/test/java/org/onap/so/client/sniro/SniroClientTestIT.java @@ -29,7 +29,6 @@ import org.onap.so.client.exception.BadResponseException; import org.onap.so.client.sniro.beans.SniroConductorRequest; import org.onap.so.client.sniro.beans.SniroManagerRequest; import org.springframework.beans.factory.annotation.Autowired; -import com.fasterxml.jackson.core.JsonProcessingException; public class SniroClientTestIT extends BaseIntegrationTest { @@ -39,7 +38,7 @@ public class SniroClientTestIT extends BaseIntegrationTest { @Test(expected = Test.None.class) - public void testPostDemands_success() throws BadResponseException, JsonProcessingException { + public void testPostDemands_success() throws BadResponseException { String mockResponse = "{\"transactionId\": \"123456789\", \"requestId\": \"1234\", \"statusMessage\": \"corys cool\", \"requestStatus\": \"accepted\"}"; @@ -51,7 +50,7 @@ public class SniroClientTestIT extends BaseIntegrationTest { } @Test(expected = BadResponseException.class) - public void testPostDemands_error_failed() throws JsonProcessingException, BadResponseException { + public void testPostDemands_error_failed() throws BadResponseException { String mockResponse = "{\"transactionId\": \"123456789\", \"requestId\": \"1234\", \"statusMessage\": \"missing data\", \"requestStatus\": \"failed\"}"; @@ -66,7 +65,7 @@ public class SniroClientTestIT extends BaseIntegrationTest { } @Test(expected = BadResponseException.class) - public void testPostDemands_error_noMessage() throws JsonProcessingException, BadResponseException { + public void testPostDemands_error_noMessage() throws BadResponseException { String mockResponse = "{\"transactionId\": \"123456789\", \"requestId\": \"1234\", \"statusMessage\": \"\", \"requestStatus\": \"failed\"}"; @@ -79,7 +78,7 @@ public class SniroClientTestIT extends BaseIntegrationTest { } @Test(expected = BadResponseException.class) - public void testPostDemands_error_noStatus() throws JsonProcessingException, BadResponseException { + public void testPostDemands_error_noStatus() throws BadResponseException { String mockResponse = "{\"transactionId\": \"123456789\", \"requestId\": \"1234\", \"statusMessage\": \"missing data\", \"requestStatus\": null}"; @@ -92,7 +91,7 @@ public class SniroClientTestIT extends BaseIntegrationTest { } @Test(expected = BadResponseException.class) - public void testPostDemands_error_empty() throws JsonProcessingException, BadResponseException { + public void testPostDemands_error_empty() throws BadResponseException { String mockResponse = "{ }"; wireMockServer.stubFor(post(urlEqualTo("/sniro/api/placement/v2")).willReturn( @@ -103,7 +102,7 @@ public class SniroClientTestIT extends BaseIntegrationTest { } @Test(expected = Test.None.class) - public void testPostRelease_success() throws BadResponseException, JsonProcessingException { + public void testPostRelease_success() throws BadResponseException { String mockResponse = "{\"status\": \"success\", \"message\": \"corys cool\"}"; wireMockServer.stubFor(post(urlEqualTo("/v1/release-orders")).willReturn( @@ -113,7 +112,7 @@ public class SniroClientTestIT extends BaseIntegrationTest { } @Test(expected = BadResponseException.class) - public void testPostRelease_error_failed() throws BadResponseException, JsonProcessingException { + public void testPostRelease_error_failed() throws BadResponseException { String mockResponse = "{\"status\": \"failure\", \"message\": \"corys cool\"}"; wireMockServer.stubFor(post(urlEqualTo("/v1/release-orders")).willReturn( @@ -123,7 +122,7 @@ public class SniroClientTestIT extends BaseIntegrationTest { } @Test(expected = BadResponseException.class) - public void testPostRelease_error_noStatus() throws BadResponseException, JsonProcessingException { + public void testPostRelease_error_noStatus() throws BadResponseException { String mockResponse = "{\"status\": \"\", \"message\": \"corys cool\"}"; wireMockServer.stubFor(post(urlEqualTo("/v1/release-orders")).willReturn( @@ -134,7 +133,7 @@ public class SniroClientTestIT extends BaseIntegrationTest { } @Test(expected = BadResponseException.class) - public void testPostRelease_error_noMessage() throws BadResponseException, JsonProcessingException { + public void testPostRelease_error_noMessage() throws BadResponseException { String mockResponse = "{\"status\": \"failure\", \"message\": null}"; wireMockServer.stubFor(post(urlEqualTo("/v1/release-orders")).willReturn( @@ -145,7 +144,7 @@ public class SniroClientTestIT extends BaseIntegrationTest { } @Test(expected = BadResponseException.class) - public void testPostRelease_error_empty() throws BadResponseException, JsonProcessingException { + public void testPostRelease_error_empty() throws BadResponseException { String mockResponse = "{ }"; wireMockServer.stubFor(post(urlEqualTo("/v1/release-orders")).willReturn( diff --git a/so-sdn-clients/src/test/java/org/onap/so/client/sdno/SDNOValidatorImplTest.java b/so-sdn-clients/src/test/java/org/onap/so/client/sdno/SDNOValidatorImplTest.java index c2278c26f9..fa6fd942c1 100644 --- a/so-sdn-clients/src/test/java/org/onap/so/client/sdno/SDNOValidatorImplTest.java +++ b/so-sdn-clients/src/test/java/org/onap/so/client/sdno/SDNOValidatorImplTest.java @@ -30,7 +30,7 @@ import org.onap.so.client.sdno.beans.SDNO; public class SDNOValidatorImplTest { @Test - public void buildRequestDiagnosticTest() throws Exception { + public void buildRequestDiagnosticTest() { SDNOValidatorImpl validator = new SDNOValidatorImpl(); UUID uuid = UUID.randomUUID(); GenericVnf vnf = new GenericVnf();