summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/catalogrest/QueryAllottedResourceCustomization.java69
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/catalogrest/QueryServiceMacroHolder.java56
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/catalogrest/QueryServiceNetworks.java78
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/catalogrest/QueryServiceVnfs.java79
-rw-r--r--adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryAllottedResourceCustomizationESTest.java97
-rw-r--r--adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryAllottedResourceCustomizationESTestscaffolding.java264
-rw-r--r--adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryServiceMacroHolderESTest.java109
-rw-r--r--adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryServiceMacroHolderESTestscaffolding.java221
-rw-r--r--adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryServiceNetworksESTest.java163
-rw-r--r--adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryServiceNetworksESTestscaffolding.java265
-rw-r--r--adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryServiceVnfsESTest.java188
-rw-r--r--adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryServiceVnfsESTestscaffolding.java264
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CommonExceptionUtil.groovy382
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/META-INF/processes.xml81
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/CommonExceptionUtilTest.groovy201
15 files changed, 0 insertions, 2517 deletions
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/catalogrest/QueryAllottedResourceCustomization.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/catalogrest/QueryAllottedResourceCustomization.java
deleted file mode 100644
index fc4cec9201..0000000000
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/catalogrest/QueryAllottedResourceCustomization.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.openecomp.mso.adapters.catalogrest;
-
-import org.openecomp.mso.db.catalog.beans.AllottedResourceCustomization;
-import org.openecomp.mso.logger.MsoLogger;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.jboss.resteasy.annotations.providers.NoJackson;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.ArrayList;
-import java.util.List;
-
-@XmlRootElement(name = "serviceAllottedResources")
-@NoJackson
-public class QueryAllottedResourceCustomization {
- private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
- private List<AllottedResourceCustomization> allottedResourceCustomization;
-
- public QueryAllottedResourceCustomization() { super(); allottedResourceCustomization = new ArrayList<AllottedResourceCustomization>(); }
- public QueryAllottedResourceCustomization(List<AllottedResourceCustomization> vlist) { allottedResourceCustomization = vlist; }
-
- public List<AllottedResourceCustomization> getServiceAllottedResources(){ return this.allottedResourceCustomization; }
- public void setServiceAllottedResources(List<AllottedResourceCustomization> v) { this.allottedResourceCustomization = v; }
-
- @Override
- public String toString () {
- StringBuffer buf = new StringBuffer();
-
- boolean first = true;
- int i = 1;
- for (AllottedResourceCustomization o : allottedResourceCustomization) {
- buf.append(i+"\t");
- if (!first) buf.append("\n"); first = false;
- buf.append(o);
- }
- return buf.toString();
- }
-
- public String toJsonString() {
- String jsonString = null;
- try {
- ObjectMapper mapper = new ObjectMapper();
- jsonString = mapper.writeValueAsString(this);
- LOGGER.debug ("AllottedResourceCustomization jsonString: "+jsonString);
- }
- catch (Exception e) {
- LOGGER.debug ("AllottedResourceCustomization jsonString exception:"+e.getMessage());
- }
- return jsonString;
- }
-} \ No newline at end of file
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/catalogrest/QueryServiceMacroHolder.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/catalogrest/QueryServiceMacroHolder.java
deleted file mode 100644
index 2cb756b856..0000000000
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/catalogrest/QueryServiceMacroHolder.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.openecomp.mso.adapters.catalogrest;
-
-import org.openecomp.mso.db.catalog.beans.ServiceMacroHolder;
-import org.openecomp.mso.logger.MsoLogger;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.jboss.resteasy.annotations.providers.NoJackson;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement(name = "serviceResources")
-@NoJackson
-public class QueryServiceMacroHolder {
- private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
- private ServiceMacroHolder serviceMacroHolder;
-
- public QueryServiceMacroHolder() { super(); serviceMacroHolder = new ServiceMacroHolder(); }
- public QueryServiceMacroHolder(ServiceMacroHolder vlist) { serviceMacroHolder = vlist; }
-
- public ServiceMacroHolder getServiceResources(){ return this.serviceMacroHolder; }
- public void setServiceResources(ServiceMacroHolder v) { this.serviceMacroHolder = v; }
-
- @Override
- public String toString () { return serviceMacroHolder.toString(); }
-
- public String toJsonString() {
- String jsonString = null;
- try {
- ObjectMapper mapper = new ObjectMapper();
- jsonString = mapper.writeValueAsString(this);
- LOGGER.debug ("QueryServiceMacroHolder jsonString: "+jsonString);
- }
- catch (Exception e) {
- LOGGER.debug ("QueryServiceMacroHolder jsonString exception:"+e.getMessage());
- }
- return jsonString;
- }
-} \ No newline at end of file
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/catalogrest/QueryServiceNetworks.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/catalogrest/QueryServiceNetworks.java
deleted file mode 100644
index dfc3683fad..0000000000
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/catalogrest/QueryServiceNetworks.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.openecomp.mso.adapters.catalogrest;
-
-import org.openecomp.mso.db.catalog.beans.NetworkResourceCustomization;
-import org.openecomp.mso.logger.MsoLogger;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.jboss.resteasy.annotations.providers.NoJackson;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.ArrayList;
-import java.util.List;
-
-@XmlRootElement(name = "serviceNetworks")
-@NoJackson
-public class QueryServiceNetworks {
- private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
- private List<NetworkResourceCustomization> serviceNetworks;
-
- public QueryServiceNetworks() { super(); serviceNetworks = new ArrayList<NetworkResourceCustomization>(); }
- public QueryServiceNetworks(List<NetworkResourceCustomization> vlist) {
- LOGGER.debug ("QueryServiceNetworks:");
- serviceNetworks = new ArrayList<NetworkResourceCustomization>();
- for (NetworkResourceCustomization o : vlist) {
- LOGGER.debug ("-- o is a serviceNetworks ----");
- LOGGER.debug (o.toString());
- serviceNetworks.add(o);
- LOGGER.debug ("-------------------");
- }
- }
-
- public List<NetworkResourceCustomization> getServiceNetworks(){ return this.serviceNetworks; }
- public void setServiceNetworks(List<NetworkResourceCustomization> v) { this.serviceNetworks = v; }
-
- @Override
- public String toString () {
- StringBuffer buf = new StringBuffer();
-
- boolean first = true;
- int i = 1;
- for (NetworkResourceCustomization o : serviceNetworks) {
- buf.append(i+"\t");
- if (!first) buf.append("\n"); first = false;
- buf.append(o);
- }
- return buf.toString();
- }
-
- public String toJsonString() {
- String jsonString = null;
- try {
- ObjectMapper mapper = new ObjectMapper();
- jsonString = mapper.writeValueAsString(this);
- LOGGER.debug ("QueryServiceNetworks jsonString: "+jsonString);
- }
- catch (Exception e) {
- LOGGER.debug ("QueryServiceNetworks jsonString exception:"+e.getMessage());
- }
- return jsonString;
- }
-} \ No newline at end of file
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/catalogrest/QueryServiceVnfs.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/catalogrest/QueryServiceVnfs.java
deleted file mode 100644
index 0ea054309b..0000000000
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/catalogrest/QueryServiceVnfs.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.openecomp.mso.adapters.catalogrest;
-/* should be called QueryVnfResource.java */
-
-import org.openecomp.mso.db.catalog.beans.VnfResource;
-import org.openecomp.mso.logger.MsoLogger;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.jboss.resteasy.annotations.providers.NoJackson;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.ArrayList;
-import java.util.List;
-
-@XmlRootElement(name = "serviceVnfs")
-@NoJackson
-public class QueryServiceVnfs {
- private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
- private List<VnfResource> serviceVnfs;
-
- public QueryServiceVnfs() { super(); serviceVnfs = new ArrayList<VnfResource>(); }
- public QueryServiceVnfs(List<VnfResource> vlist) {
- LOGGER.debug ("QueryServiceVnfs:");
- serviceVnfs = new ArrayList<VnfResource>();
- for (VnfResource o : vlist) {
- LOGGER.debug ("-- o is a serviceVnfs ----");
- LOGGER.debug (o.toString());
- serviceVnfs.add(o);
- LOGGER.debug ("-------------------");
- }
- }
-
- public List<VnfResource> getServiceVnfs(){ return this.serviceVnfs; }
- public void setServiceVnfs(List<VnfResource> v) { this.serviceVnfs = v; }
-
- @Override
- public String toString () {
- StringBuffer buf = new StringBuffer();
-
- boolean first = true;
- int i = 1;
- for (VnfResource o : serviceVnfs) {
- buf.append(i+"\t");
- if (!first) buf.append("\n"); first = false;
- buf.append(o);
- }
- return buf.toString();
- }
-
- public String toJsonString() {
- String jsonString = null;
- try {
- ObjectMapper mapper = new ObjectMapper();
- jsonString = mapper.writeValueAsString(this);
- LOGGER.debug ("QuerySrviceVnfs jsonString: "+jsonString);
- }
- catch (Exception e) {
- LOGGER.debug ("QuerySrviceVnfs jsonString exception:"+e.getMessage());
- }
- return jsonString;
- }
-} \ No newline at end of file
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryAllottedResourceCustomizationESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryAllottedResourceCustomizationESTest.java
deleted file mode 100644
index 5addb999ce..0000000000
--- a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryAllottedResourceCustomizationESTest.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Feb 20 14:08:31 GMT 2017
- */
-
-package org.openecomp.mso.adapters.catalogrest;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-import java.util.LinkedList;
-import java.util.List;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-import org.openecomp.mso.db.catalog.beans.AllottedResourceCustomization;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class QueryAllottedResourceCustomizationESTest extends QueryAllottedResourceCustomizationESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- QueryAllottedResourceCustomization queryAllottedResourceCustomization0 = new QueryAllottedResourceCustomization();
- queryAllottedResourceCustomization0.setServiceAllottedResources((List<AllottedResourceCustomization>) null);
- List<AllottedResourceCustomization> list0 = queryAllottedResourceCustomization0.getServiceAllottedResources();
- assertNull(list0);
- }
-
- @Test(timeout = 4000)
- public void test1() throws Throwable {
- LinkedList<AllottedResourceCustomization> linkedList0 = new LinkedList<AllottedResourceCustomization>();
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- linkedList0.add(allottedResourceCustomization0);
- QueryAllottedResourceCustomization queryAllottedResourceCustomization0 = new QueryAllottedResourceCustomization((List<AllottedResourceCustomization>) linkedList0);
- List<AllottedResourceCustomization> list0 = queryAllottedResourceCustomization0.getServiceAllottedResources();
- assertFalse(list0.isEmpty());
- }
-
- @Test(timeout = 4000)
- public void test2() throws Throwable {
- LinkedList<AllottedResourceCustomization> linkedList0 = new LinkedList<AllottedResourceCustomization>();
- AllottedResourceCustomization allottedResourceCustomization0 = new AllottedResourceCustomization();
- linkedList0.add(allottedResourceCustomization0);
- QueryAllottedResourceCustomization queryAllottedResourceCustomization0 = new QueryAllottedResourceCustomization((List<AllottedResourceCustomization>) linkedList0);
- linkedList0.add(allottedResourceCustomization0);
- String string0 = queryAllottedResourceCustomization0.toString();
- assertEquals("1\tmodelName=null,modelVersion=null,version=null,modelUuid=null,modelInvariantUuid=null,modelCustomizationUuid=null,modelInstanceName=null,description=null,modelInstanceName=null,created=null1\t\nmodelName=null,modelVersion=null,version=null,modelUuid=null,modelInvariantUuid=null,modelCustomizationUuid=null,modelInstanceName=null,description=null,modelInstanceName=null,created=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test3() throws Throwable {
- QueryAllottedResourceCustomization queryAllottedResourceCustomization0 = new QueryAllottedResourceCustomization();
- String string0 = queryAllottedResourceCustomization0.toString();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test4() throws Throwable {
- QueryAllottedResourceCustomization queryAllottedResourceCustomization0 = new QueryAllottedResourceCustomization();
- List<AllottedResourceCustomization> list0 = queryAllottedResourceCustomization0.getServiceAllottedResources();
- assertTrue(list0.isEmpty());
- }
-
- @Test(timeout = 4000)
- public void test5() throws Throwable {
- QueryAllottedResourceCustomization queryAllottedResourceCustomization0 = new QueryAllottedResourceCustomization();
- queryAllottedResourceCustomization0.setServiceAllottedResources((List<AllottedResourceCustomization>) null);
- // Undeclared exception!
- try {
- queryAllottedResourceCustomization0.toString();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.adapters.catalogrest.QueryAllottedResourceCustomization", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test6() throws Throwable {
- LinkedList<AllottedResourceCustomization> linkedList0 = new LinkedList<AllottedResourceCustomization>();
- QueryAllottedResourceCustomization queryAllottedResourceCustomization0 = new QueryAllottedResourceCustomization((List<AllottedResourceCustomization>) linkedList0);
- // Undeclared exception!
- try {
- queryAllottedResourceCustomization0.toJsonString();
- fail("Expecting exception: VerifyError");
-
- } catch(VerifyError e) {
- //
- // (class: org/codehaus/jackson/map/MapperConfig, method: <clinit> signature: ()V) Bad type in putfield/putstatic
- //
- verifyException("org.codehaus.jackson.map.ObjectMapper", e);
- }
- }
-}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryAllottedResourceCustomizationESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryAllottedResourceCustomizationESTestscaffolding.java
deleted file mode 100644
index 0ce23dc7c2..0000000000
--- a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryAllottedResourceCustomizationESTestscaffolding.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Feb 20 14:08:31 GMT 2017
- */
-
-package org.openecomp.mso.adapters.catalogrest;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class QueryAllottedResourceCustomizationESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.catalogrest.QueryAllottedResourceCustomization";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(QueryAllottedResourceCustomizationESTestscaffolding.class.getClassLoader() ,
- "org.codehaus.jackson.map.JsonSerializableWithType",
- "org.codehaus.jackson.map.HandlerInstantiator",
- "org.codehaus.jackson.map.deser.StdDeserializerProvider",
- "org.codehaus.jackson.map.SerializerFactory",
- "org.codehaus.jackson.map.SerializerProvider",
- "org.codehaus.jackson.map.type.TypeBindings",
- "org.codehaus.jackson.map.SerializationConfig",
- "org.codehaus.jackson.JsonProcessingException",
- "org.codehaus.jackson.map.introspect.AnnotationMap",
- "org.codehaus.jackson.map.introspect.Annotated",
- "org.codehaus.jackson.io.InputDecorator",
- "org.codehaus.jackson.map.Module",
- "org.codehaus.jackson.map.util.Annotations",
- "org.codehaus.jackson.map.type.TypeModifier",
- "org.codehaus.jackson.sym.NameN",
- "org.codehaus.jackson.JsonGenerator",
- "org.codehaus.jackson.map.introspect.AnnotatedClass",
- "org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector",
- "org.codehaus.jackson.annotate.JsonAutoDetect$1",
- "org.codehaus.jackson.map.JsonSerializable",
- "org.codehaus.jackson.annotate.JsonMethod",
- "com.att.eelf.i18n.EELFResolvableErrorEnum",
- "org.codehaus.jackson.node.BaseJsonNode",
- "org.openecomp.mso.logger.MsoLogger$StatusCode",
- "org.codehaus.jackson.map.ObjectReader",
- "org.codehaus.jackson.map.DeserializerProvider",
- "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
- "org.codehaus.jackson.node.ValueNode",
- "org.codehaus.jackson.map.ser.BeanSerializerFactory",
- "org.codehaus.jackson.map.JsonSerializer",
- "org.codehaus.jackson.map.introspect.AnnotatedWithParams",
- "com.att.eelf.i18n.EELFMsgs",
- "org.codehaus.jackson.map.AnnotationIntrospector",
- "org.codehaus.jackson.map.MappingJsonFactory",
- "com.att.eelf.configuration.EELFLogger$Level",
- "org.codehaus.jackson.map.MapperConfig$Impl",
- "org.codehaus.jackson.sym.Name1",
- "org.codehaus.jackson.sym.Name2",
- "org.codehaus.jackson.sym.Name3",
- "org.codehaus.jackson.map.introspect.MethodFilter",
- "org.codehaus.jackson.map.ser.StdSerializerProvider",
- "org.codehaus.jackson.map.deser.StdDeserializationContext",
- "org.codehaus.jackson.type.TypeReference",
- "org.codehaus.jackson.map.ClassIntrospector",
- "org.codehaus.jackson.map.AnnotationIntrospector$Pair",
- "org.codehaus.jackson.map.PropertyNamingStrategy$LowerCaseWithUnderscoresStrategy",
- "org.codehaus.jackson.map.MapperConfig$ConfigFeature",
- "org.codehaus.jackson.map.SerializationConfig$Feature",
- "org.codehaus.jackson.Versioned",
- "org.codehaus.jackson.io.IOContext",
- "org.openecomp.mso.adapters.catalogrest.QueryAllottedResourceCustomization",
- "org.codehaus.jackson.map.type.TypeBase",
- "org.codehaus.jackson.map.ser.BasicSerializerFactory",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "org.codehaus.jackson.map.PropertyNamingStrategy",
- "org.codehaus.jackson.node.ContainerNode",
- "org.codehaus.jackson.map.ser.FilterProvider",
- "org.codehaus.jackson.map.jsontype.NamedType",
- "org.codehaus.jackson.map.introspect.NopAnnotationIntrospector",
- "com.att.eelf.configuration.EELFLogger",
- "org.codehaus.jackson.map.DeserializationConfig",
- "org.codehaus.jackson.map.introspect.AnnotatedConstructor",
- "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
- "org.codehaus.jackson.map.type.TypeFactory",
- "org.codehaus.jackson.impl.ReaderBasedParser",
- "org.codehaus.jackson.sym.BytesToNameCanonicalizer$TableInfo",
- "org.codehaus.jackson.JsonEncoding",
- "org.codehaus.jackson.map.type.MapLikeType",
- "org.codehaus.jackson.map.JsonDeserializer",
- "org.codehaus.jackson.map.PropertyNamingStrategy$PropertyNamingStrategyBase",
- "org.codehaus.jackson.node.ObjectNode",
- "org.openecomp.mso.logger.MsoLogger$ErrorCode",
- "org.codehaus.jackson.map.ser.std.SerializerBase",
- "org.codehaus.jackson.map.introspect.BasicClassIntrospector$MinimalMethodFilter",
- "org.codehaus.jackson.map.type.CollectionLikeType",
- "org.openecomp.mso.logger.MessageEnum",
- "org.codehaus.jackson.map.DeserializationConfig$Feature",
- "org.codehaus.jackson.sym.CharsToNameCanonicalizer$Bucket",
- "org.codehaus.jackson.map.introspect.AnnotatedMethodMap",
- "org.codehaus.jackson.impl.JsonParserMinimalBase",
- "org.codehaus.jackson.map.type.TypeParser",
- "org.codehaus.jackson.map.introspect.POJOPropertiesCollector",
- "org.codehaus.jackson.JsonParseException",
- "org.codehaus.jackson.map.introspect.BasicClassIntrospector$SetterMethodFilter",
- "org.codehaus.jackson.map.introspect.VisibilityChecker",
- "org.codehaus.jackson.map.introspect.AnnotatedField",
- "org.codehaus.jackson.impl.JsonGeneratorBase",
- "org.codehaus.jackson.map.ObjectMapper",
- "org.codehaus.jackson.util.ByteArrayBuilder",
- "org.codehaus.jackson.map.ser.impl.FailingSerializer",
- "org.codehaus.jackson.PrettyPrinter",
- "org.codehaus.jackson.JsonToken",
- "org.codehaus.jackson.map.jsontype.SubtypeResolver",
- "org.codehaus.jackson.map.type.SimpleType",
- "org.codehaus.jackson.map.util.StdDateFormat",
- "org.codehaus.jackson.impl.Utf8Generator",
- "org.codehaus.jackson.node.NumericNode",
- "org.jboss.resteasy.annotations.providers.NoJackson",
- "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
- "org.codehaus.jackson.map.introspect.BasicClassIntrospector$SetterAndGetterMethodFilter",
- "org.codehaus.jackson.JsonNode",
- "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
- "org.codehaus.jackson.annotate.JacksonAnnotation",
- "org.codehaus.jackson.map.ObjectWriter",
- "org.codehaus.jackson.schema.SchemaAware",
- "org.codehaus.jackson.io.OutputDecorator",
- "com.att.eelf.configuration.SLF4jWrapper",
- "org.codehaus.jackson.FormatSchema",
- "org.codehaus.jackson.format.MatchStrength",
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.codehaus.jackson.ObjectCodec",
- "org.codehaus.jackson.map.introspect.AnnotatedMethod",
- "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
- "org.codehaus.jackson.JsonGenerationException",
- "org.openecomp.mso.entity.MsoRequest",
- "org.codehaus.jackson.format.InputAccessor",
- "org.codehaus.jackson.JsonFactory",
- "org.codehaus.jackson.node.ArrayNode",
- "org.codehaus.jackson.util.BufferRecycler",
- "org.codehaus.jackson.io.SegmentedStringWriter",
- "org.openecomp.mso.logger.MsoLogger$ResponseCode",
- "org.codehaus.jackson.map.jsontype.TypeResolverBuilder",
- "org.codehaus.jackson.map.type.HierarchicType",
- "org.codehaus.jackson.map.introspect.BasicClassIntrospector$GetterMethodFilter",
- "org.codehaus.jackson.JsonParser$Feature",
- "org.codehaus.jackson.map.BeanDescription",
- "org.codehaus.jackson.JsonParser$1",
- "org.codehaus.jackson.impl.WriterBasedGenerator",
- "org.codehaus.jackson.JsonGenerator$Feature",
- "org.codehaus.jackson.sym.Name",
- "org.codehaus.jackson.Version",
- "org.codehaus.jackson.io.CharacterEscapes",
- "org.codehaus.jackson.map.introspect.BasicBeanDescription",
- "org.codehaus.jackson.schema.JsonSchema",
- "org.codehaus.jackson.util.TokenBuffer",
- "org.codehaus.jackson.map.MappingIterator",
- "org.codehaus.jackson.map.annotate.JsonSerialize$Inclusion",
- "org.codehaus.jackson.map.DeserializationContext",
- "org.codehaus.jackson.impl.JsonParserBase",
- "org.codehaus.jackson.map.ObjectMapper$DefaultTyping",
- "org.codehaus.jackson.map.JsonMappingException",
- "org.codehaus.jackson.map.introspect.AnnotatedMember",
- "org.codehaus.jackson.node.JsonNodeFactory",
- "org.codehaus.jackson.type.JavaType",
- "com.att.eelf.i18n.EELFResourceManager",
- "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
- "org.codehaus.jackson.annotate.JsonTypeInfo$As",
- "org.codehaus.jackson.JsonParser",
- "org.codehaus.jackson.node.NullNode",
- "org.codehaus.jackson.map.InjectableValues",
- "org.codehaus.jackson.map.jsontype.impl.StdSubtypeResolver",
- "org.codehaus.jackson.node.TreeTraversingParser",
- "org.codehaus.jackson.map.type.CollectionType",
- "com.att.eelf.configuration.EELFManager",
- "org.codehaus.jackson.map.MapperConfig",
- "org.openecomp.mso.db.catalog.beans.AllottedResourceCustomization",
- "org.codehaus.jackson.map.Module$SetupContext",
- "org.codehaus.jackson.io.UTF8Writer",
- "org.codehaus.jackson.map.introspect.VisibilityChecker$1",
- "org.codehaus.jackson.map.type.MapType",
- "org.codehaus.jackson.annotate.JsonAutoDetect",
- "org.codehaus.jackson.map.type.ArrayType",
- "org.openecomp.mso.logger.MsoLogger",
- "org.codehaus.jackson.map.ClassIntrospector$MixInResolver"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(QueryAllottedResourceCustomizationESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.openecomp.mso.logger.MsoLogger",
- "com.att.eelf.i18n.EELFResourceManager",
- "com.att.eelf.i18n.EELFMsgs",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "com.att.eelf.configuration.EELFLogger$Level",
- "com.att.eelf.configuration.EELFManager",
- "org.openecomp.mso.logger.MessageEnum",
- "org.openecomp.mso.adapters.catalogrest.QueryAllottedResourceCustomization",
- "org.codehaus.jackson.map.introspect.AnnotatedClass",
- "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
- "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
- "org.codehaus.jackson.annotate.JsonMethod",
- "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
- "org.codehaus.jackson.map.ObjectMapper",
- "org.codehaus.jackson.JsonParser$Feature",
- "org.codehaus.jackson.JsonGenerator$Feature",
- "org.codehaus.jackson.JsonFactory",
- "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
- "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
- "org.codehaus.jackson.map.type.TypeFactory"
- );
- }
-}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryServiceMacroHolderESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryServiceMacroHolderESTest.java
deleted file mode 100644
index 6f3fa5aec5..0000000000
--- a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryServiceMacroHolderESTest.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Feb 20 14:12:21 GMT 2017
- */
-
-package org.openecomp.mso.adapters.catalogrest;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.shaded.org.mockito.Mockito.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.ViolatedAssumptionAnswer;
-import org.junit.runner.RunWith;
-import org.openecomp.mso.db.catalog.beans.ServiceMacroHolder;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class QueryServiceMacroHolderESTest extends QueryServiceMacroHolderESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- ServiceMacroHolder serviceMacroHolder0 = mock(ServiceMacroHolder.class, new ViolatedAssumptionAnswer());
- doReturn((String) null).when(serviceMacroHolder0).toString();
- QueryServiceMacroHolder queryServiceMacroHolder0 = new QueryServiceMacroHolder(serviceMacroHolder0);
- String string0 = queryServiceMacroHolder0.toString();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test1() throws Throwable {
- ServiceMacroHolder serviceMacroHolder0 = mock(ServiceMacroHolder.class, new ViolatedAssumptionAnswer());
- doReturn("com.att.eelf.policy").when(serviceMacroHolder0).toString();
- QueryServiceMacroHolder queryServiceMacroHolder0 = new QueryServiceMacroHolder(serviceMacroHolder0);
- String string0 = queryServiceMacroHolder0.toString();
- assertEquals("com.att.eelf.policy", string0);
- }
-
- @Test(timeout = 4000)
- public void test2() throws Throwable {
- ServiceMacroHolder serviceMacroHolder0 = mock(ServiceMacroHolder.class, new ViolatedAssumptionAnswer());
- doReturn("com.att.eelf.policy").when(serviceMacroHolder0).toString();
- QueryServiceMacroHolder queryServiceMacroHolder0 = new QueryServiceMacroHolder(serviceMacroHolder0);
- ServiceMacroHolder serviceMacroHolder1 = queryServiceMacroHolder0.getServiceResources();
- assertSame(serviceMacroHolder1, serviceMacroHolder0);
- }
-
- @Test(timeout = 4000)
- public void test3() throws Throwable {
- QueryServiceMacroHolder queryServiceMacroHolder0 = new QueryServiceMacroHolder((ServiceMacroHolder) null);
- // Undeclared exception!
- try {
- queryServiceMacroHolder0.toString();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.adapters.catalogrest.QueryServiceMacroHolder", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test4() throws Throwable {
- ServiceMacroHolder serviceMacroHolder0 = mock(ServiceMacroHolder.class, new ViolatedAssumptionAnswer());
- doReturn("").when(serviceMacroHolder0).toString();
- QueryServiceMacroHolder queryServiceMacroHolder0 = new QueryServiceMacroHolder(serviceMacroHolder0);
- String string0 = queryServiceMacroHolder0.toString();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test5() throws Throwable {
- QueryServiceMacroHolder queryServiceMacroHolder0 = new QueryServiceMacroHolder();
- }
-
- @Test(timeout = 4000)
- public void test6() throws Throwable {
- ServiceMacroHolder serviceMacroHolder0 = mock(ServiceMacroHolder.class, new ViolatedAssumptionAnswer());
- QueryServiceMacroHolder queryServiceMacroHolder0 = new QueryServiceMacroHolder(serviceMacroHolder0);
- // Undeclared exception!
- try {
- queryServiceMacroHolder0.toJsonString();
- fail("Expecting exception: VerifyError");
-
- } catch(VerifyError e) {
- //
- // (class: org/codehaus/jackson/map/MapperConfig, method: <clinit> signature: ()V) Bad type in putfield/putstatic
- //
- verifyException("org.codehaus.jackson.map.ObjectMapper", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test7() throws Throwable {
- QueryServiceMacroHolder queryServiceMacroHolder0 = new QueryServiceMacroHolder((ServiceMacroHolder) null);
- ServiceMacroHolder serviceMacroHolder0 = queryServiceMacroHolder0.getServiceResources();
- assertNull(serviceMacroHolder0);
- }
-
- @Test(timeout = 4000)
- public void test8() throws Throwable {
- ServiceMacroHolder serviceMacroHolder0 = mock(ServiceMacroHolder.class, new ViolatedAssumptionAnswer());
- QueryServiceMacroHolder queryServiceMacroHolder0 = new QueryServiceMacroHolder(serviceMacroHolder0);
- ServiceMacroHolder serviceMacroHolder1 = mock(ServiceMacroHolder.class, new ViolatedAssumptionAnswer());
- queryServiceMacroHolder0.setServiceResources(serviceMacroHolder1);
- }
-}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryServiceMacroHolderESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryServiceMacroHolderESTestscaffolding.java
deleted file mode 100644
index 4a5898649b..0000000000
--- a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryServiceMacroHolderESTestscaffolding.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Feb 20 14:12:21 GMT 2017
- */
-
-package org.openecomp.mso.adapters.catalogrest;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class QueryServiceMacroHolderESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.catalogrest.QueryServiceMacroHolder";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(QueryServiceMacroHolderESTestscaffolding.class.getClassLoader() ,
- "org.codehaus.jackson.map.JsonSerializableWithType",
- "org.codehaus.jackson.map.deser.StdDeserializerProvider",
- "org.codehaus.jackson.map.SerializerFactory",
- "org.codehaus.jackson.map.SerializerProvider",
- "org.codehaus.jackson.map.SerializationConfig",
- "org.codehaus.jackson.JsonProcessingException",
- "org.codehaus.jackson.map.introspect.AnnotationMap",
- "org.codehaus.jackson.map.introspect.Annotated",
- "org.codehaus.jackson.map.util.Annotations",
- "org.codehaus.jackson.sym.NameN",
- "org.codehaus.jackson.JsonGenerator",
- "org.codehaus.jackson.map.introspect.AnnotatedClass",
- "org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector",
- "org.codehaus.jackson.map.JsonSerializable",
- "org.codehaus.jackson.annotate.JsonMethod",
- "com.att.eelf.i18n.EELFResolvableErrorEnum",
- "org.codehaus.jackson.node.BaseJsonNode",
- "org.openecomp.mso.logger.MsoLogger$StatusCode",
- "org.codehaus.jackson.map.DeserializerProvider",
- "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
- "org.codehaus.jackson.node.ValueNode",
- "org.codehaus.jackson.map.ser.BeanSerializerFactory",
- "org.codehaus.jackson.map.introspect.AnnotatedWithParams",
- "com.att.eelf.i18n.EELFMsgs",
- "org.codehaus.jackson.map.AnnotationIntrospector",
- "org.codehaus.jackson.map.MappingJsonFactory",
- "com.att.eelf.configuration.EELFLogger$Level",
- "org.codehaus.jackson.map.MapperConfig$Impl",
- "org.codehaus.jackson.sym.Name1",
- "org.codehaus.jackson.sym.Name2",
- "org.codehaus.jackson.sym.Name3",
- "org.codehaus.jackson.map.introspect.MethodFilter",
- "org.codehaus.jackson.map.ser.StdSerializerProvider",
- "org.codehaus.jackson.map.deser.StdDeserializationContext",
- "org.codehaus.jackson.map.ClassIntrospector",
- "org.codehaus.jackson.map.AnnotationIntrospector$Pair",
- "org.codehaus.jackson.Versioned",
- "org.openecomp.mso.db.catalog.beans.NetworkResourceCustomization",
- "org.codehaus.jackson.map.type.TypeBase",
- "org.codehaus.jackson.map.ser.BasicSerializerFactory",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "org.codehaus.jackson.node.ContainerNode",
- "org.codehaus.jackson.map.introspect.NopAnnotationIntrospector",
- "com.att.eelf.configuration.EELFLogger",
- "org.codehaus.jackson.map.DeserializationConfig",
- "org.codehaus.jackson.map.introspect.AnnotatedConstructor",
- "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
- "org.codehaus.jackson.map.type.TypeFactory",
- "org.codehaus.jackson.impl.ReaderBasedParser",
- "org.codehaus.jackson.sym.BytesToNameCanonicalizer$TableInfo",
- "org.codehaus.jackson.map.type.MapLikeType",
- "org.openecomp.mso.db.catalog.beans.VnfResource",
- "org.openecomp.mso.logger.MsoLogger$ErrorCode",
- "org.codehaus.jackson.node.ObjectNode",
- "org.codehaus.jackson.map.introspect.BasicClassIntrospector$MinimalMethodFilter",
- "org.codehaus.jackson.map.type.CollectionLikeType",
- "org.openecomp.mso.logger.MessageEnum",
- "org.codehaus.jackson.sym.CharsToNameCanonicalizer$Bucket",
- "org.codehaus.jackson.impl.JsonParserMinimalBase",
- "org.openecomp.mso.db.catalog.beans.ServiceMacroHolder",
- "org.codehaus.jackson.map.type.TypeParser",
- "org.codehaus.jackson.map.introspect.BasicClassIntrospector$SetterMethodFilter",
- "org.codehaus.jackson.map.introspect.VisibilityChecker",
- "org.codehaus.jackson.map.introspect.AnnotatedField",
- "org.codehaus.jackson.impl.JsonGeneratorBase",
- "org.codehaus.jackson.map.ObjectMapper",
- "org.codehaus.jackson.util.ByteArrayBuilder",
- "org.codehaus.jackson.PrettyPrinter",
- "org.codehaus.jackson.map.jsontype.SubtypeResolver",
- "org.codehaus.jackson.map.type.SimpleType",
- "org.codehaus.jackson.map.util.StdDateFormat",
- "org.codehaus.jackson.impl.Utf8Generator",
- "org.jboss.resteasy.annotations.providers.NoJackson",
- "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
- "org.codehaus.jackson.map.introspect.BasicClassIntrospector$SetterAndGetterMethodFilter",
- "org.codehaus.jackson.JsonNode",
- "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
- "org.codehaus.jackson.annotate.JacksonAnnotation",
- "com.att.eelf.configuration.SLF4jWrapper",
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.codehaus.jackson.ObjectCodec",
- "org.codehaus.jackson.map.introspect.AnnotatedMethod",
- "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
- "org.openecomp.mso.entity.MsoRequest",
- "org.codehaus.jackson.JsonFactory",
- "org.codehaus.jackson.node.ArrayNode",
- "org.codehaus.jackson.io.SegmentedStringWriter",
- "org.openecomp.mso.logger.MsoLogger$ResponseCode",
- "org.codehaus.jackson.map.jsontype.TypeResolverBuilder",
- "org.openecomp.mso.adapters.catalogrest.QueryServiceMacroHolder",
- "org.codehaus.jackson.map.introspect.BasicClassIntrospector$GetterMethodFilter",
- "org.codehaus.jackson.JsonParser$Feature",
- "org.codehaus.jackson.map.BeanDescription",
- "org.codehaus.jackson.impl.WriterBasedGenerator",
- "org.codehaus.jackson.JsonGenerator$Feature",
- "org.codehaus.jackson.sym.Name",
- "org.openecomp.mso.db.catalog.beans.Service",
- "org.codehaus.jackson.map.introspect.BasicBeanDescription",
- "org.codehaus.jackson.util.TokenBuffer",
- "org.codehaus.jackson.map.DeserializationContext",
- "org.codehaus.jackson.impl.JsonParserBase",
- "org.codehaus.jackson.map.JsonMappingException",
- "org.codehaus.jackson.map.introspect.AnnotatedMember",
- "org.codehaus.jackson.type.JavaType",
- "com.att.eelf.i18n.EELFResourceManager",
- "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
- "org.codehaus.jackson.JsonParser",
- "org.codehaus.jackson.node.NullNode",
- "org.codehaus.jackson.map.jsontype.impl.StdSubtypeResolver",
- "org.codehaus.jackson.node.TreeTraversingParser",
- "org.codehaus.jackson.map.type.CollectionType",
- "com.att.eelf.configuration.EELFManager",
- "org.codehaus.jackson.map.MapperConfig",
- "org.openecomp.mso.db.catalog.beans.AllottedResourceCustomization",
- "org.codehaus.jackson.map.Module$SetupContext",
- "org.codehaus.jackson.io.UTF8Writer",
- "org.codehaus.jackson.map.type.MapType",
- "org.codehaus.jackson.annotate.JsonAutoDetect",
- "org.codehaus.jackson.map.type.ArrayType",
- "org.openecomp.mso.logger.MsoLogger",
- "org.codehaus.jackson.map.ClassIntrospector$MixInResolver"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(QueryServiceMacroHolderESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.openecomp.mso.logger.MsoLogger",
- "com.att.eelf.i18n.EELFResourceManager",
- "com.att.eelf.i18n.EELFMsgs",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "com.att.eelf.configuration.EELFLogger$Level",
- "com.att.eelf.configuration.EELFManager",
- "org.openecomp.mso.logger.MessageEnum",
- "org.openecomp.mso.adapters.catalogrest.QueryServiceMacroHolder",
- "org.codehaus.jackson.map.introspect.AnnotatedClass",
- "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
- "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
- "org.codehaus.jackson.annotate.JsonMethod",
- "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
- "org.codehaus.jackson.map.ObjectMapper",
- "org.codehaus.jackson.JsonParser$Feature",
- "org.codehaus.jackson.JsonGenerator$Feature",
- "org.codehaus.jackson.JsonFactory",
- "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
- "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
- "org.codehaus.jackson.map.type.TypeFactory"
- );
- }
-}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryServiceNetworksESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryServiceNetworksESTest.java
deleted file mode 100644
index 0219fb52fa..0000000000
--- a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryServiceNetworksESTest.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Feb 20 14:04:40 GMT 2017
- */
-
-package org.openecomp.mso.adapters.catalogrest;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.shaded.org.mockito.Mockito.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-import java.util.Collection;
-import java.util.LinkedList;
-import java.util.List;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.ViolatedAssumptionAnswer;
-import org.junit.runner.RunWith;
-import org.openecomp.mso.db.catalog.beans.NetworkResourceCustomization;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class QueryServiceNetworksESTest extends QueryServiceNetworksESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- LinkedList<NetworkResourceCustomization> linkedList0 = new LinkedList<NetworkResourceCustomization>();
- QueryServiceNetworks queryServiceNetworks0 = new QueryServiceNetworks((List<NetworkResourceCustomization>) linkedList0);
- queryServiceNetworks0.setServiceNetworks((List<NetworkResourceCustomization>) null);
- List<NetworkResourceCustomization> list0 = queryServiceNetworks0.getServiceNetworks();
- assertNull(list0);
- }
-
- @Test(timeout = 4000)
- public void test1() throws Throwable {
- LinkedList<NetworkResourceCustomization> linkedList0 = new LinkedList<NetworkResourceCustomization>();
- QueryServiceNetworks queryServiceNetworks0 = new QueryServiceNetworks();
- Object[] objectArray0 = new Object[3];
- objectArray0[0] = (Object) queryServiceNetworks0;
- Collection<NetworkResourceCustomization> collection0 = (Collection<NetworkResourceCustomization>) mock(Collection.class, new ViolatedAssumptionAnswer());
- doReturn(objectArray0).when(collection0).toArray();
- linkedList0.addAll(collection0);
- queryServiceNetworks0.setServiceNetworks(linkedList0);
- // Undeclared exception!
- try {
- queryServiceNetworks0.toString();
- fail("Expecting exception: ClassCastException");
-
- } catch(ClassCastException e) {
- //
- // org.openecomp.mso.adapters.catalogrest.QueryServiceNetworks cannot be cast to org.openecomp.mso.db.catalog.beans.NetworkResourceCustomization
- //
- verifyException("org.openecomp.mso.adapters.catalogrest.QueryServiceNetworks", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test2() throws Throwable {
- QueryServiceNetworks queryServiceNetworks0 = null;
- try {
- queryServiceNetworks0 = new QueryServiceNetworks((List<NetworkResourceCustomization>) null);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.adapters.catalogrest.QueryServiceNetworks", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test3() throws Throwable {
- LinkedList<NetworkResourceCustomization> linkedList0 = new LinkedList<NetworkResourceCustomization>();
- NetworkResourceCustomization networkResourceCustomization0 = new NetworkResourceCustomization();
- linkedList0.add(networkResourceCustomization0);
- Object[] objectArray0 = new Object[4];
- objectArray0[0] = (Object) linkedList0;
- Collection<NetworkResourceCustomization> collection0 = (Collection<NetworkResourceCustomization>) mock(Collection.class, new ViolatedAssumptionAnswer());
- doReturn(objectArray0).when(collection0).toArray();
- linkedList0.addAll(1, collection0);
- QueryServiceNetworks queryServiceNetworks0 = null;
- try {
- queryServiceNetworks0 = new QueryServiceNetworks((List<NetworkResourceCustomization>) linkedList0);
- fail("Expecting exception: ClassCastException");
-
- } catch(ClassCastException e) {
- //
- // java.util.LinkedList cannot be cast to org.openecomp.mso.db.catalog.beans.NetworkResourceCustomization
- //
- verifyException("org.openecomp.mso.adapters.catalogrest.QueryServiceNetworks", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test4() throws Throwable {
- LinkedList<NetworkResourceCustomization> linkedList0 = new LinkedList<NetworkResourceCustomization>();
- QueryServiceNetworks queryServiceNetworks0 = new QueryServiceNetworks();
- queryServiceNetworks0.setServiceNetworks(linkedList0);
- NetworkResourceCustomization networkResourceCustomization0 = new NetworkResourceCustomization();
- linkedList0.add(networkResourceCustomization0);
- linkedList0.add(networkResourceCustomization0);
- String string0 = queryServiceNetworks0.toString();
- assertEquals("1\tmodelName=nullmodelUuid=nullmodelUuid=nullmodelInvariantUuid=nullmodelVersion=nullmodelCustomizationUuid=nullmodelInstanceName=nullnetworkResourceId=0networkType=null1\t\nmodelName=nullmodelUuid=nullmodelUuid=nullmodelInvariantUuid=nullmodelVersion=nullmodelCustomizationUuid=nullmodelInstanceName=nullnetworkResourceId=0networkType=null", string0);
- }
-
- @Test(timeout = 4000)
- public void test5() throws Throwable {
- QueryServiceNetworks queryServiceNetworks0 = new QueryServiceNetworks();
- String string0 = queryServiceNetworks0.toString();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test6() throws Throwable {
- LinkedList<NetworkResourceCustomization> linkedList0 = new LinkedList<NetworkResourceCustomization>();
- NetworkResourceCustomization networkResourceCustomization0 = new NetworkResourceCustomization();
- linkedList0.add(networkResourceCustomization0);
- QueryServiceNetworks queryServiceNetworks0 = new QueryServiceNetworks((List<NetworkResourceCustomization>) linkedList0);
- List<NetworkResourceCustomization> list0 = queryServiceNetworks0.getServiceNetworks();
- assertEquals(1, list0.size());
- }
-
- @Test(timeout = 4000)
- public void test7() throws Throwable {
- LinkedList<NetworkResourceCustomization> linkedList0 = new LinkedList<NetworkResourceCustomization>();
- QueryServiceNetworks queryServiceNetworks0 = new QueryServiceNetworks((List<NetworkResourceCustomization>) linkedList0);
- queryServiceNetworks0.setServiceNetworks((List<NetworkResourceCustomization>) null);
- // Undeclared exception!
- try {
- queryServiceNetworks0.toString();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.adapters.catalogrest.QueryServiceNetworks", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test8() throws Throwable {
- QueryServiceNetworks queryServiceNetworks0 = new QueryServiceNetworks();
- List<NetworkResourceCustomization> list0 = queryServiceNetworks0.getServiceNetworks();
- assertTrue(list0.isEmpty());
- }
-
- @Test(timeout = 4000)
- public void test9() throws Throwable {
- QueryServiceNetworks queryServiceNetworks0 = new QueryServiceNetworks();
- // Undeclared exception!
- try {
- queryServiceNetworks0.toJsonString();
- fail("Expecting exception: VerifyError");
-
- } catch(VerifyError e) {
- //
- // (class: org/codehaus/jackson/map/MapperConfig, method: <clinit> signature: ()V) Bad type in putfield/putstatic
- //
- verifyException("org.codehaus.jackson.map.ObjectMapper", e);
- }
- }
-}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryServiceNetworksESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryServiceNetworksESTestscaffolding.java
deleted file mode 100644
index e47d9b2a5b..0000000000
--- a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryServiceNetworksESTestscaffolding.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Feb 20 14:04:40 GMT 2017
- */
-
-package org.openecomp.mso.adapters.catalogrest;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class QueryServiceNetworksESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.catalogrest.QueryServiceNetworks";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(QueryServiceNetworksESTestscaffolding.class.getClassLoader() ,
- "org.codehaus.jackson.map.JsonSerializableWithType",
- "org.codehaus.jackson.map.HandlerInstantiator",
- "org.codehaus.jackson.map.deser.StdDeserializerProvider",
- "org.codehaus.jackson.map.SerializerFactory",
- "org.codehaus.jackson.map.SerializerProvider",
- "org.codehaus.jackson.map.type.TypeBindings",
- "org.codehaus.jackson.map.SerializationConfig",
- "org.codehaus.jackson.JsonProcessingException",
- "org.codehaus.jackson.map.introspect.AnnotationMap",
- "org.codehaus.jackson.map.introspect.Annotated",
- "org.codehaus.jackson.io.InputDecorator",
- "org.codehaus.jackson.map.Module",
- "org.codehaus.jackson.map.util.Annotations",
- "org.codehaus.jackson.map.type.TypeModifier",
- "org.codehaus.jackson.sym.NameN",
- "org.codehaus.jackson.JsonGenerator",
- "org.codehaus.jackson.map.introspect.AnnotatedClass",
- "org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector",
- "org.codehaus.jackson.annotate.JsonAutoDetect$1",
- "org.codehaus.jackson.map.JsonSerializable",
- "org.codehaus.jackson.annotate.JsonMethod",
- "com.att.eelf.i18n.EELFResolvableErrorEnum",
- "org.codehaus.jackson.node.BaseJsonNode",
- "org.openecomp.mso.logger.MsoLogger$StatusCode",
- "org.codehaus.jackson.map.ObjectReader",
- "org.codehaus.jackson.map.DeserializerProvider",
- "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
- "org.codehaus.jackson.node.ValueNode",
- "org.codehaus.jackson.map.ser.BeanSerializerFactory",
- "org.codehaus.jackson.map.JsonSerializer",
- "org.codehaus.jackson.map.introspect.AnnotatedWithParams",
- "com.att.eelf.i18n.EELFMsgs",
- "org.codehaus.jackson.map.AnnotationIntrospector",
- "org.codehaus.jackson.map.MappingJsonFactory",
- "com.att.eelf.configuration.EELFLogger$Level",
- "org.codehaus.jackson.map.MapperConfig$Impl",
- "org.codehaus.jackson.sym.Name1",
- "org.codehaus.jackson.sym.Name2",
- "org.codehaus.jackson.sym.Name3",
- "org.codehaus.jackson.map.introspect.MethodFilter",
- "org.codehaus.jackson.map.ser.StdSerializerProvider",
- "org.codehaus.jackson.map.deser.StdDeserializationContext",
- "org.codehaus.jackson.type.TypeReference",
- "org.codehaus.jackson.map.ClassIntrospector",
- "org.codehaus.jackson.map.AnnotationIntrospector$Pair",
- "org.codehaus.jackson.map.PropertyNamingStrategy$LowerCaseWithUnderscoresStrategy",
- "org.codehaus.jackson.map.MapperConfig$ConfigFeature",
- "org.codehaus.jackson.map.SerializationConfig$Feature",
- "org.codehaus.jackson.Versioned",
- "org.codehaus.jackson.io.IOContext",
- "org.openecomp.mso.db.catalog.beans.NetworkResourceCustomization",
- "org.codehaus.jackson.map.type.TypeBase",
- "org.codehaus.jackson.map.ser.BasicSerializerFactory",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "org.codehaus.jackson.map.PropertyNamingStrategy",
- "org.codehaus.jackson.node.ContainerNode",
- "org.codehaus.jackson.map.jsontype.NamedType",
- "org.codehaus.jackson.map.ser.FilterProvider",
- "org.codehaus.jackson.map.introspect.NopAnnotationIntrospector",
- "com.att.eelf.configuration.EELFLogger",
- "org.codehaus.jackson.map.DeserializationConfig",
- "org.codehaus.jackson.map.introspect.AnnotatedConstructor",
- "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
- "org.codehaus.jackson.map.type.TypeFactory",
- "org.codehaus.jackson.impl.ReaderBasedParser",
- "org.codehaus.jackson.sym.BytesToNameCanonicalizer$TableInfo",
- "org.codehaus.jackson.JsonEncoding",
- "org.codehaus.jackson.map.type.MapLikeType",
- "org.codehaus.jackson.map.JsonDeserializer",
- "org.codehaus.jackson.map.PropertyNamingStrategy$PropertyNamingStrategyBase",
- "org.codehaus.jackson.node.ObjectNode",
- "org.openecomp.mso.logger.MsoLogger$ErrorCode",
- "org.codehaus.jackson.map.ser.std.SerializerBase",
- "org.codehaus.jackson.map.introspect.BasicClassIntrospector$MinimalMethodFilter",
- "org.codehaus.jackson.map.type.CollectionLikeType",
- "org.openecomp.mso.logger.MessageEnum",
- "org.codehaus.jackson.map.DeserializationConfig$Feature",
- "org.codehaus.jackson.sym.CharsToNameCanonicalizer$Bucket",
- "org.codehaus.jackson.map.introspect.AnnotatedMethodMap",
- "org.codehaus.jackson.impl.JsonParserMinimalBase",
- "org.codehaus.jackson.map.type.TypeParser",
- "org.codehaus.jackson.map.introspect.POJOPropertiesCollector",
- "org.codehaus.jackson.JsonParseException",
- "org.codehaus.jackson.map.introspect.BasicClassIntrospector$SetterMethodFilter",
- "org.codehaus.jackson.map.introspect.VisibilityChecker",
- "org.codehaus.jackson.map.introspect.AnnotatedField",
- "org.codehaus.jackson.impl.JsonGeneratorBase",
- "org.codehaus.jackson.map.ObjectMapper",
- "org.codehaus.jackson.util.ByteArrayBuilder",
- "org.codehaus.jackson.map.ser.impl.FailingSerializer",
- "org.codehaus.jackson.PrettyPrinter",
- "org.codehaus.jackson.JsonToken",
- "org.codehaus.jackson.map.jsontype.SubtypeResolver",
- "org.codehaus.jackson.map.type.SimpleType",
- "org.codehaus.jackson.map.util.StdDateFormat",
- "org.codehaus.jackson.impl.Utf8Generator",
- "org.codehaus.jackson.node.NumericNode",
- "org.jboss.resteasy.annotations.providers.NoJackson",
- "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
- "org.codehaus.jackson.map.introspect.BasicClassIntrospector$SetterAndGetterMethodFilter",
- "org.codehaus.jackson.JsonNode",
- "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
- "org.codehaus.jackson.annotate.JacksonAnnotation",
- "org.codehaus.jackson.map.ObjectWriter",
- "org.codehaus.jackson.schema.SchemaAware",
- "org.codehaus.jackson.io.OutputDecorator",
- "com.att.eelf.configuration.SLF4jWrapper",
- "org.codehaus.jackson.FormatSchema",
- "org.codehaus.jackson.format.MatchStrength",
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.codehaus.jackson.ObjectCodec",
- "org.codehaus.jackson.map.introspect.AnnotatedMethod",
- "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
- "org.codehaus.jackson.JsonGenerationException",
- "org.openecomp.mso.entity.MsoRequest",
- "org.codehaus.jackson.format.InputAccessor",
- "org.codehaus.jackson.JsonFactory",
- "org.codehaus.jackson.node.ArrayNode",
- "org.codehaus.jackson.util.BufferRecycler",
- "org.codehaus.jackson.io.SegmentedStringWriter",
- "org.openecomp.mso.logger.MsoLogger$ResponseCode",
- "org.codehaus.jackson.map.jsontype.TypeResolverBuilder",
- "org.codehaus.jackson.map.type.HierarchicType",
- "org.codehaus.jackson.map.introspect.BasicClassIntrospector$GetterMethodFilter",
- "org.codehaus.jackson.JsonParser$Feature",
- "org.codehaus.jackson.map.BeanDescription",
- "org.codehaus.jackson.JsonParser$1",
- "org.codehaus.jackson.impl.WriterBasedGenerator",
- "org.codehaus.jackson.JsonGenerator$Feature",
- "org.codehaus.jackson.sym.Name",
- "org.codehaus.jackson.Version",
- "org.codehaus.jackson.io.CharacterEscapes",
- "org.codehaus.jackson.map.introspect.BasicBeanDescription",
- "org.codehaus.jackson.schema.JsonSchema",
- "org.codehaus.jackson.util.TokenBuffer",
- "org.codehaus.jackson.map.MappingIterator",
- "org.codehaus.jackson.map.annotate.JsonSerialize$Inclusion",
- "org.codehaus.jackson.map.DeserializationContext",
- "org.codehaus.jackson.impl.JsonParserBase",
- "org.codehaus.jackson.map.ObjectMapper$DefaultTyping",
- "org.codehaus.jackson.map.JsonMappingException",
- "org.codehaus.jackson.map.introspect.AnnotatedMember",
- "org.codehaus.jackson.node.JsonNodeFactory",
- "org.codehaus.jackson.type.JavaType",
- "com.att.eelf.i18n.EELFResourceManager",
- "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
- "org.codehaus.jackson.annotate.JsonTypeInfo$As",
- "org.codehaus.jackson.JsonParser",
- "org.codehaus.jackson.node.NullNode",
- "org.codehaus.jackson.map.InjectableValues",
- "org.codehaus.jackson.map.jsontype.impl.StdSubtypeResolver",
- "org.codehaus.jackson.node.TreeTraversingParser",
- "org.codehaus.jackson.map.type.CollectionType",
- "com.att.eelf.configuration.EELFManager",
- "org.codehaus.jackson.map.MapperConfig",
- "org.codehaus.jackson.map.Module$SetupContext",
- "org.openecomp.mso.adapters.catalogrest.QueryServiceNetworks",
- "org.codehaus.jackson.io.UTF8Writer",
- "org.openecomp.mso.db.catalog.beans.NetworkResource",
- "org.codehaus.jackson.map.introspect.VisibilityChecker$1",
- "org.codehaus.jackson.map.type.MapType",
- "org.codehaus.jackson.annotate.JsonAutoDetect",
- "org.codehaus.jackson.map.type.ArrayType",
- "org.openecomp.mso.logger.MsoLogger",
- "org.codehaus.jackson.map.ClassIntrospector$MixInResolver"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(QueryServiceNetworksESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.openecomp.mso.logger.MsoLogger",
- "com.att.eelf.i18n.EELFResourceManager",
- "com.att.eelf.i18n.EELFMsgs",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "com.att.eelf.configuration.EELFLogger$Level",
- "com.att.eelf.configuration.EELFManager",
- "org.openecomp.mso.logger.MessageEnum",
- "org.openecomp.mso.adapters.catalogrest.QueryServiceNetworks",
- "org.codehaus.jackson.map.introspect.AnnotatedClass",
- "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
- "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
- "org.codehaus.jackson.annotate.JsonMethod",
- "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
- "org.codehaus.jackson.map.ObjectMapper",
- "org.codehaus.jackson.JsonParser$Feature",
- "org.codehaus.jackson.JsonGenerator$Feature",
- "org.codehaus.jackson.JsonFactory",
- "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
- "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
- "org.codehaus.jackson.map.type.TypeFactory"
- );
- }
-}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryServiceVnfsESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryServiceVnfsESTest.java
deleted file mode 100644
index 4f963032d0..0000000000
--- a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryServiceVnfsESTest.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Wed Feb 22 12:31:50 GMT 2017
- */
-
-package org.openecomp.mso.adapters.catalogrest;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.shaded.org.mockito.Mockito.*;
-import static org.evosuite.runtime.MockitoExtension.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-import java.util.Collection;
-import java.util.ConcurrentModificationException;
-import java.util.LinkedList;
-import java.util.List;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.ViolatedAssumptionAnswer;
-import org.junit.runner.RunWith;
-import org.openecomp.mso.adapters.catalogrest.QueryServiceVnfs;
-import org.openecomp.mso.db.catalog.beans.VnfResource;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class QueryServiceVnfsESTest extends QueryServiceVnfsESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- QueryServiceVnfs queryServiceVnfs0 = new QueryServiceVnfs();
- queryServiceVnfs0.setServiceVnfs((List<VnfResource>) null);
- List<VnfResource> list0 = queryServiceVnfs0.getServiceVnfs();
- assertNull(list0);
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- LinkedList<VnfResource> linkedList0 = new LinkedList<VnfResource>();
- VnfResource vnfResource0 = new VnfResource();
- linkedList0.add(vnfResource0);
- List<VnfResource> list0 = linkedList0.subList(1, 1);
- linkedList0.add(vnfResource0);
- QueryServiceVnfs queryServiceVnfs0 = new QueryServiceVnfs();
- queryServiceVnfs0.setServiceVnfs(list0);
- // Undeclared exception!
- try {
- queryServiceVnfs0.toString();
- fail("Expecting exception: ConcurrentModificationException");
-
- } catch(ConcurrentModificationException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("java.util.SubList", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- QueryServiceVnfs queryServiceVnfs0 = new QueryServiceVnfs();
- queryServiceVnfs0.setServiceVnfs((List<VnfResource>) null);
- // Undeclared exception!
- try {
- queryServiceVnfs0.toString();
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.adapters.catalogrest.QueryServiceVnfs", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- LinkedList<VnfResource> linkedList0 = new LinkedList<VnfResource>();
- QueryServiceVnfs queryServiceVnfs0 = new QueryServiceVnfs();
- Object[] objectArray0 = new Object[3];
- objectArray0[1] = (Object) queryServiceVnfs0;
- queryServiceVnfs0.setServiceVnfs(linkedList0);
- Collection<VnfResource> collection0 = (Collection<VnfResource>) mock(Collection.class, new ViolatedAssumptionAnswer());
- doReturn(objectArray0).when(collection0).toArray();
- linkedList0.addAll(collection0);
- // Undeclared exception!
- try {
- queryServiceVnfs0.toString();
- fail("Expecting exception: ClassCastException");
-
- } catch(ClassCastException e) {
- //
- // org.openecomp.mso.adapters.catalogrest.QueryServiceVnfs cannot be cast to org.openecomp.mso.db.catalog.beans.VnfResource
- //
- verifyException("org.openecomp.mso.adapters.catalogrest.QueryServiceVnfs", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- LinkedList<VnfResource> linkedList0 = new LinkedList<VnfResource>();
- linkedList0.add((VnfResource) null);
- QueryServiceVnfs queryServiceVnfs0 = null;
- try {
- queryServiceVnfs0 = new QueryServiceVnfs((List<VnfResource>) linkedList0);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.adapters.catalogrest.QueryServiceVnfs", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- LinkedList<VnfResource> linkedList0 = new LinkedList<VnfResource>();
- QueryServiceVnfs queryServiceVnfs0 = new QueryServiceVnfs();
- Object[] objectArray0 = new Object[8];
- objectArray0[0] = (Object) queryServiceVnfs0;
- Collection<VnfResource> collection0 = (Collection<VnfResource>) mock(Collection.class, new ViolatedAssumptionAnswer());
- doReturn(objectArray0).when(collection0).toArray();
- linkedList0.addAll(0, collection0);
- QueryServiceVnfs queryServiceVnfs1 = null;
- try {
- queryServiceVnfs1 = new QueryServiceVnfs((List<VnfResource>) linkedList0);
- fail("Expecting exception: ClassCastException");
-
- } catch(ClassCastException e) {
- //
- // org.openecomp.mso.adapters.catalogrest.QueryServiceVnfs cannot be cast to org.openecomp.mso.db.catalog.beans.VnfResource
- //
- verifyException("org.openecomp.mso.adapters.catalogrest.QueryServiceVnfs", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- LinkedList<VnfResource> linkedList0 = new LinkedList<VnfResource>();
- VnfResource vnfResource0 = new VnfResource();
- linkedList0.add(vnfResource0);
- QueryServiceVnfs queryServiceVnfs0 = new QueryServiceVnfs();
- queryServiceVnfs0.setServiceVnfs(linkedList0);
- linkedList0.add(vnfResource0);
- String string0 = queryServiceVnfs0.toString();
- assertEquals("1\tVNF=null,version=null,mode=null,template=null,envtId=null,asdcUuid=null,aicVersionMin=null,aicVersionMax=null,modelInvariantUuid=null,modelVersion=null,modelCustomizationName=null,modelName=null,serviceModelInvariantUUID=null,modelCustomizationUuid=nullVfModules: NONE1\t\nVNF=null,version=null,mode=null,template=null,envtId=null,asdcUuid=null,aicVersionMin=null,aicVersionMax=null,modelInvariantUuid=null,modelVersion=null,modelCustomizationName=null,modelName=null,serviceModelInvariantUUID=null,modelCustomizationUuid=nullVfModules: NONE", string0);
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- QueryServiceVnfs queryServiceVnfs0 = new QueryServiceVnfs();
- String string0 = queryServiceVnfs0.toString();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- LinkedList<VnfResource> linkedList0 = new LinkedList<VnfResource>();
- VnfResource vnfResource0 = new VnfResource();
- linkedList0.add(vnfResource0);
- QueryServiceVnfs queryServiceVnfs0 = new QueryServiceVnfs((List<VnfResource>) linkedList0);
- List<VnfResource> list0 = queryServiceVnfs0.getServiceVnfs();
- assertEquals(1, list0.size());
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- QueryServiceVnfs queryServiceVnfs0 = new QueryServiceVnfs();
- List<VnfResource> list0 = queryServiceVnfs0.getServiceVnfs();
- queryServiceVnfs0.setServiceVnfs(list0);
- assertTrue(list0.isEmpty());
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- QueryServiceVnfs queryServiceVnfs0 = new QueryServiceVnfs();
- // Undeclared exception!
- try {
- queryServiceVnfs0.toJsonString();
- fail("Expecting exception: VerifyError");
-
- } catch(VerifyError e) {
- //
- // (class: org/codehaus/jackson/map/MapperConfig, method: <clinit> signature: ()V) Bad type in putfield/putstatic
- //
- verifyException("org.codehaus.jackson.map.ObjectMapper", e);
- }
- }
-}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryServiceVnfsESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryServiceVnfsESTestscaffolding.java
deleted file mode 100644
index aa9a411de2..0000000000
--- a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/catalogrest/QueryServiceVnfsESTestscaffolding.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Feb 20 14:04:40 GMT 2017
- */
-
-package org.openecomp.mso.adapters.catalogrest;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class QueryServiceVnfsESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.catalogrest.QueryServiceVnfs";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(QueryServiceVnfsESTestscaffolding.class.getClassLoader() ,
- "org.codehaus.jackson.map.JsonSerializableWithType",
- "org.codehaus.jackson.map.HandlerInstantiator",
- "org.codehaus.jackson.map.deser.StdDeserializerProvider",
- "org.codehaus.jackson.map.SerializerFactory",
- "org.codehaus.jackson.map.SerializerProvider",
- "org.codehaus.jackson.map.type.TypeBindings",
- "org.codehaus.jackson.map.SerializationConfig",
- "org.codehaus.jackson.JsonProcessingException",
- "org.codehaus.jackson.map.introspect.AnnotationMap",
- "org.codehaus.jackson.map.introspect.Annotated",
- "org.codehaus.jackson.io.InputDecorator",
- "org.codehaus.jackson.map.Module",
- "org.codehaus.jackson.map.util.Annotations",
- "org.codehaus.jackson.map.type.TypeModifier",
- "org.codehaus.jackson.sym.NameN",
- "org.codehaus.jackson.JsonGenerator",
- "org.codehaus.jackson.map.introspect.AnnotatedClass",
- "org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector",
- "org.codehaus.jackson.annotate.JsonAutoDetect$1",
- "org.codehaus.jackson.map.JsonSerializable",
- "org.codehaus.jackson.annotate.JsonMethod",
- "com.att.eelf.i18n.EELFResolvableErrorEnum",
- "org.codehaus.jackson.node.BaseJsonNode",
- "org.openecomp.mso.logger.MsoLogger$StatusCode",
- "org.codehaus.jackson.map.ObjectReader",
- "org.codehaus.jackson.map.DeserializerProvider",
- "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
- "org.codehaus.jackson.node.ValueNode",
- "org.codehaus.jackson.map.ser.BeanSerializerFactory",
- "org.codehaus.jackson.map.JsonSerializer",
- "org.codehaus.jackson.map.introspect.AnnotatedWithParams",
- "com.att.eelf.i18n.EELFMsgs",
- "org.codehaus.jackson.map.AnnotationIntrospector",
- "org.codehaus.jackson.map.MappingJsonFactory",
- "com.att.eelf.configuration.EELFLogger$Level",
- "org.codehaus.jackson.map.MapperConfig$Impl",
- "org.codehaus.jackson.sym.Name1",
- "org.codehaus.jackson.sym.Name2",
- "org.codehaus.jackson.sym.Name3",
- "org.codehaus.jackson.map.introspect.MethodFilter",
- "org.codehaus.jackson.map.ser.StdSerializerProvider",
- "org.codehaus.jackson.map.deser.StdDeserializationContext",
- "org.codehaus.jackson.type.TypeReference",
- "org.codehaus.jackson.map.ClassIntrospector",
- "org.codehaus.jackson.map.AnnotationIntrospector$Pair",
- "org.codehaus.jackson.map.PropertyNamingStrategy$LowerCaseWithUnderscoresStrategy",
- "org.codehaus.jackson.map.MapperConfig$ConfigFeature",
- "org.codehaus.jackson.map.SerializationConfig$Feature",
- "org.codehaus.jackson.Versioned",
- "org.codehaus.jackson.io.IOContext",
- "org.codehaus.jackson.map.type.TypeBase",
- "org.codehaus.jackson.map.ser.BasicSerializerFactory",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "org.codehaus.jackson.map.PropertyNamingStrategy",
- "org.codehaus.jackson.node.ContainerNode",
- "org.codehaus.jackson.map.jsontype.NamedType",
- "org.codehaus.jackson.map.ser.FilterProvider",
- "org.codehaus.jackson.map.introspect.NopAnnotationIntrospector",
- "com.att.eelf.configuration.EELFLogger",
- "org.codehaus.jackson.map.DeserializationConfig",
- "org.codehaus.jackson.map.introspect.AnnotatedConstructor",
- "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
- "org.codehaus.jackson.map.type.TypeFactory",
- "org.codehaus.jackson.impl.ReaderBasedParser",
- "org.codehaus.jackson.sym.BytesToNameCanonicalizer$TableInfo",
- "org.codehaus.jackson.JsonEncoding",
- "org.codehaus.jackson.map.type.MapLikeType",
- "org.codehaus.jackson.map.JsonDeserializer",
- "org.openecomp.mso.db.catalog.beans.VnfResource",
- "org.codehaus.jackson.map.PropertyNamingStrategy$PropertyNamingStrategyBase",
- "org.codehaus.jackson.node.ObjectNode",
- "org.openecomp.mso.logger.MsoLogger$ErrorCode",
- "org.codehaus.jackson.map.ser.std.SerializerBase",
- "org.codehaus.jackson.map.introspect.BasicClassIntrospector$MinimalMethodFilter",
- "org.codehaus.jackson.map.type.CollectionLikeType",
- "org.openecomp.mso.logger.MessageEnum",
- "org.codehaus.jackson.map.DeserializationConfig$Feature",
- "org.codehaus.jackson.sym.CharsToNameCanonicalizer$Bucket",
- "org.codehaus.jackson.map.introspect.AnnotatedMethodMap",
- "org.codehaus.jackson.impl.JsonParserMinimalBase",
- "org.codehaus.jackson.map.type.TypeParser",
- "org.codehaus.jackson.map.introspect.POJOPropertiesCollector",
- "org.codehaus.jackson.JsonParseException",
- "org.codehaus.jackson.map.introspect.BasicClassIntrospector$SetterMethodFilter",
- "org.codehaus.jackson.map.introspect.VisibilityChecker",
- "org.codehaus.jackson.map.introspect.AnnotatedField",
- "org.codehaus.jackson.impl.JsonGeneratorBase",
- "org.codehaus.jackson.map.ObjectMapper",
- "org.codehaus.jackson.util.ByteArrayBuilder",
- "org.codehaus.jackson.map.ser.impl.FailingSerializer",
- "org.codehaus.jackson.PrettyPrinter",
- "org.codehaus.jackson.JsonToken",
- "org.codehaus.jackson.map.jsontype.SubtypeResolver",
- "org.codehaus.jackson.map.type.SimpleType",
- "org.codehaus.jackson.map.util.StdDateFormat",
- "org.codehaus.jackson.impl.Utf8Generator",
- "org.codehaus.jackson.node.NumericNode",
- "org.jboss.resteasy.annotations.providers.NoJackson",
- "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
- "org.codehaus.jackson.map.introspect.BasicClassIntrospector$SetterAndGetterMethodFilter",
- "org.codehaus.jackson.JsonNode",
- "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
- "org.codehaus.jackson.annotate.JacksonAnnotation",
- "org.codehaus.jackson.map.ObjectWriter",
- "org.codehaus.jackson.schema.SchemaAware",
- "org.codehaus.jackson.io.OutputDecorator",
- "com.att.eelf.configuration.SLF4jWrapper",
- "org.codehaus.jackson.FormatSchema",
- "org.codehaus.jackson.format.MatchStrength",
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.codehaus.jackson.ObjectCodec",
- "org.codehaus.jackson.map.introspect.AnnotatedMethod",
- "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
- "org.codehaus.jackson.JsonGenerationException",
- "org.openecomp.mso.entity.MsoRequest",
- "org.codehaus.jackson.format.InputAccessor",
- "org.codehaus.jackson.JsonFactory",
- "org.codehaus.jackson.node.ArrayNode",
- "org.codehaus.jackson.util.BufferRecycler",
- "org.codehaus.jackson.io.SegmentedStringWriter",
- "org.openecomp.mso.logger.MsoLogger$ResponseCode",
- "org.codehaus.jackson.map.jsontype.TypeResolverBuilder",
- "org.codehaus.jackson.map.type.HierarchicType",
- "org.codehaus.jackson.map.introspect.BasicClassIntrospector$GetterMethodFilter",
- "org.codehaus.jackson.JsonParser$Feature",
- "org.codehaus.jackson.map.BeanDescription",
- "org.codehaus.jackson.JsonParser$1",
- "org.codehaus.jackson.impl.WriterBasedGenerator",
- "org.codehaus.jackson.JsonGenerator$Feature",
- "org.codehaus.jackson.sym.Name",
- "org.codehaus.jackson.Version",
- "org.codehaus.jackson.io.CharacterEscapes",
- "org.codehaus.jackson.map.introspect.BasicBeanDescription",
- "org.codehaus.jackson.schema.JsonSchema",
- "org.codehaus.jackson.util.TokenBuffer",
- "org.codehaus.jackson.map.annotate.JsonSerialize$Inclusion",
- "org.codehaus.jackson.map.MappingIterator",
- "org.codehaus.jackson.map.DeserializationContext",
- "org.codehaus.jackson.impl.JsonParserBase",
- "org.codehaus.jackson.map.ObjectMapper$DefaultTyping",
- "org.codehaus.jackson.map.JsonMappingException",
- "org.codehaus.jackson.map.introspect.AnnotatedMember",
- "org.codehaus.jackson.node.JsonNodeFactory",
- "org.codehaus.jackson.type.JavaType",
- "com.att.eelf.i18n.EELFResourceManager",
- "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
- "org.codehaus.jackson.annotate.JsonTypeInfo$As",
- "org.codehaus.jackson.JsonParser",
- "org.codehaus.jackson.node.NullNode",
- "org.codehaus.jackson.map.InjectableValues",
- "org.codehaus.jackson.map.jsontype.impl.StdSubtypeResolver",
- "org.codehaus.jackson.node.TreeTraversingParser",
- "org.codehaus.jackson.map.type.CollectionType",
- "com.att.eelf.configuration.EELFManager",
- "org.codehaus.jackson.map.MapperConfig",
- "org.codehaus.jackson.map.Module$SetupContext",
- "org.codehaus.jackson.io.UTF8Writer",
- "org.codehaus.jackson.map.introspect.VisibilityChecker$1",
- "org.codehaus.jackson.map.type.MapType",
- "org.codehaus.jackson.annotate.JsonAutoDetect",
- "org.openecomp.mso.adapters.catalogrest.QueryServiceVnfs",
- "org.codehaus.jackson.map.type.ArrayType",
- "org.openecomp.mso.logger.MsoLogger",
- "org.codehaus.jackson.map.ClassIntrospector$MixInResolver"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(QueryServiceVnfsESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.openecomp.mso.logger.MsoLogger",
- "com.att.eelf.i18n.EELFResourceManager",
- "com.att.eelf.i18n.EELFMsgs",
- "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
- "com.att.eelf.configuration.EELFLogger$Level",
- "com.att.eelf.configuration.EELFManager",
- "org.openecomp.mso.logger.MessageEnum",
- "org.openecomp.mso.adapters.catalogrest.QueryServiceVnfs",
- "org.codehaus.jackson.map.introspect.AnnotatedClass",
- "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
- "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
- "org.codehaus.jackson.annotate.JsonMethod",
- "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
- "org.codehaus.jackson.map.ObjectMapper",
- "org.codehaus.jackson.JsonParser$Feature",
- "org.codehaus.jackson.JsonGenerator$Feature",
- "org.codehaus.jackson.JsonFactory",
- "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
- "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
- "org.codehaus.jackson.map.type.TypeFactory"
- );
- }
-}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CommonExceptionUtil.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CommonExceptionUtil.groovy
deleted file mode 100644
index cce05feca8..0000000000
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CommonExceptionUtil.groovy
+++ /dev/null
@@ -1,382 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.bpmn.common.scripts
-
-import org.camunda.bpm.engine.runtime.Execution
-import org.apache.commons.lang3.*
-
-class CommonExceptionUtil {
-
-
-
- public static enum Error {
- SVC_GENERAL_SERVICE_ERROR("SVC0001","Internal Error"),
- SVC_BAD_PARAMETER("SVC0002", "Invalid input value for message part %1"),
- SVC_NO_SERVER_RESOURCES("SVC1000", "No server resources available to process the request"),
- SVC_DETAILED_SERVICE_ERROR("SVC2000", "The following service error occurred: %1. Error code is %2."),
- POL_GENERAL_POLICY_ERROR("POL0001", "A policy error occurred."),
- POL_USER_NOT_PROVISIONED("POL1009", "User has not been provisioned for service"),
- POL_USER_SUSPENDED("POL1010", "User has been suspended from service"),
- POL_DETAILED_POLICY_ERROR("POL2000", "The following policy error occurred: %1. Error code is %2."),
- POL_MSG_SIZE_EXCEEDS_LIMIT("POL9003", "Message content size exceeds the allowable limit")
-
-
- private final String msgId
- private final String msgTxt
-
- private Error(String msgId, String msgTxt) {
- this.msgId = msgId
- this.msgTxt = msgTxt
- }
-
- public String getMsgId() {
- return msgId
- }
-
- public String getMsgTxt() {
- return msgTxt
- }
-
- }
-
-
-
-
- String mapAdapterExecptionToCommonException(String response, Execution execution)
- {
- def utils=new MsoUtils()
- def method = getClass().getSimpleName() + '.mapAdapterExecptionToCommonException(' +
- 'execution=' + execution.getId() +
- ')'
-
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- utils.log("DEBUG",'Entered ' + method, isDebugLogEnabled)
-
-
- def errorCode
-
-
- try {
- errorCode = MapCategoryToErrorCode(utils.getNodeText(response, "category"))
- execution.setVariable(prefix+"err",errorCode)
- String message = buildException(response, execution)
- utils.log("DEBUG","=========== End MapAdapterExecptionToWorkflowException ===========",isDebugLogEnabled)
- return message
- }catch (Exception ex) {
- //Ignore the exception - cases include non xml payload
- utils.log("DEBUG","error mapping error, ignoring: " + ex,isDebugLogEnabled)
- utils.log("DEBUG","=========== End MapAdapterExecptionToWorkflowException ===========",isDebugLogEnabled)
- return buildException(response, execution)
- }
- }
-
- /**
- * @param response
- * @param execution
- * @return mapped exception
- */
- String mapAOTSExecptionToCommonException(String response, Execution execution)
- {
- def utils=new MsoUtils()
-
- def prefix=execution.getVariable("prefix")
- def method = getClass().getSimpleName() + '.mapAOTSExecptionToCommonException(' +
- 'execution=' + execution.getId() +
- ')'
-
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- utils.log("DEBUG",'Entered ' + method, isDebugLogEnabled)
-
-
- try {
- def errorCode = utils.getNodeText(response,"code")
- def descr = utils.getNodeText(response, "description")
- def mappedErr = mapErrorCodetoError(errorCode, descr)
- if(mappedErr == Error.SVC_DETAILED_SERVICE_ERROR || mappedError == Error.POL_DETAILED_POLICY_ERROR){
- ArrayList myVars = new ArrayList()
- myVars.add(descr)
- myVars.add(errorCode)
- execution.setVariable(prefix+"errVariables", myVars)
- }
- execution.setVariable(prefix+"err",mappedErr)
- def message = buildException("Received error from AOTS: " + descr, execution)
- utils.log("DEBUG","=========== End MapAOTSExecptionToCommonException ===========",isDebugLogEnabled)
- return message
- }catch (Exception ex) {
- //Ignore the exception - cases include non xml payload
- utils.log("DEBUG","error mapping error, ignoring: " + ex,isDebugLogEnabled)
- utils.log("DEBUG","=========== End MapAOTSExecptionToCommonException ===========",isDebugLogEnabled)
- return buildException(response, execution)
- }
- }
-
- String mapSDNCAdapterExceptionToErrorResponse(String sdncAdapterCallbackRequest, Execution execution) {
- def utils=new MsoUtils()
- def prefix=execution.getVariable("prefix")
- def method = getClass().getSimpleName() + '.mapSDNCAdapterExceptionToErrorResponse(' +
- 'execution=' + execution.getId() +
- ')'
-
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- utils.log("DEBUG",'Entered ' + method, isDebugLogEnabled)
-
- def sdncResponseCode
- String responseCode = execution.getVariable(prefix+"ResponseCode")
- utils.log("DEBUG",'responseCode to map: ' + responseCode, isDebugLogEnabled)
- def errorMessage
-
- try {
-
- if(utils.nodeExists(sdncAdapterCallbackRequest, "RequestData")) {
- def reqDataXml = StringEscapeUtils.unescapeXml(utils.getNodeXml(sdncAdapterCallbackRequest, "RequestData"))
- errorMessage = utils.getNodeText(reqDataXml, "response-message")
- sdncResponseCode = utils.getNodeText(reqDataXml, "response-code")
- }else{
- errorMessage = utils.getNodeText(sdncAdapterCallbackRequest, "ResponseMessage")
- sdncResponseCode = responseCode
- }
- def mappedErr = mapErrorCodetoError(responseCode, errorMessage)
- errorMessage = errorMessage.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
- def modifiedErrorMessage = "Received error from SDN-C: " + errorMessage
- if(mappedErr == Error.SVC_DETAILED_SERVICE_ERROR || mappedErr == Error.POL_DETAILED_POLICY_ERROR){
- ArrayList myVars = new ArrayList()
- myVars.add(errorMessage)
- myVars.add(sdncResponseCode)
- execution.setVariable(prefix+"errVariables", myVars)
- }
- execution.setVariable(prefix+"err",mappedErr)
- def message = buildException(modifiedErrorMessage, execution)
-
-
- utils.log("DEBUG","=========== End MapSDNCAdapterException ===========",isDebugLogEnabled)
- return message
- }catch (Exception ex) {
- //Ignore the exception - cases include non xml payload
- utils.log("DEBUG","error mapping sdnc error, ignoring: " + ex,isDebugLogEnabled)
- utils.log("DEBUG","=========== End MapSDNCAdapterException ===========",isDebugLogEnabled)
- return null
- }
-
- }
-
- /**
- * @param response message from called component (ex: AAI)
- * @param execution
- * @return an error response conforming to the common
- */
- String mapAAIExceptionTCommonException(String response, Execution execution)
- {
- def utils=new MsoUtils()
- def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
- def prefix=execution.getVariable("prefix")
- def method = getClass().getSimpleName() + '.mapAAIExceptionTCommonException(' +
- 'execution=' + execution.getId() +
- ')'
-
- utils.log("DEBUG",'Entered ' + method, isDebugLogEnabled)
- def variables
- def message
- String errorCode = 'SVC0001'
- utils.log("DEBUG","response: " + response, isDebugLogEnabled)
- //they use the same format we do, pass their error along
- //TODO add Received error from A&AI at beg of text
- try {
- message = utils.getNodeXml(response, "requestError")
- message = utils.removeXmlNamespaces(message)
- } catch (Exception ex) {
- //Ignore the exception - cases include non xml payload
- message = buildException("Received error from A&AI, unable to parse",execution)
- utils.log("DEBUG","error mapping error, ignoring: " + ex,isDebugLogEnabled)
- }
-
- if(message != null) {
- execution.setVariable(prefix+"ErrorResponse",message)
- utils.log("ERROR","Fault:"+ execution.getVariable(prefix+"ErrorResponse"))
- return message
- } else {
-
- return null
-
- }
- }
-
- /**
- * @param execution
- * @return an error response conforming to the common API with default text msg
- */
- String buildException(execution){
- return buildException(null, execution)
- }
-
- /**
- * @param response message from called component (ex: AAI)
- * @param execution
- * @return an error response conforming to the common
- */
- String buildException(response, execution){
- def utils=new MsoUtils()
- def method = getClass().getSimpleName() + '.buildException(' +
- 'execution=' + execution.getId() +
- ')'
-
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- utils.log("DEBUG",'Entered ' + method, isDebugLogEnabled)
- def prefix=execution.getVariable("prefix")
- def responseCode = String.valueOf(execution.getVariable(prefix+"ResponseCode"))
- def variables
- utils.log("DEBUG","response: " + response, isDebugLogEnabled)
-
- try {
- utils.log("DEBUG","formatting error message" ,isDebugLogEnabled)
- def msgVars = execution.getVariable(prefix+"errVariables")
- def myErr = execution.getVariable(prefix+"err")
- def messageTxt = execution.getVariable(prefix+"errTxt")
- def messageId = null
-
- if(myErr == null){
- utils.log("DEBUG","mapping response code: " + responseCode, isDebugLogEnabled)
- myErr = mapErrorCodetoError(responseCode, response)
- if(myErr == null){
- //not a service or policy error, just return error code
- return ""
- }
- }
- messageId = myErr.getMsgId()
-
- if(messageTxt == null){
- if(myErr!=null){
- messageTxt = myErr.getMsgTxt()
- }else{
- messageTxt = response
- }
- }
-
- if(msgVars==null && (myErr == Error.SVC_DETAILED_SERVICE_ERROR || myErr == Error.POL_DETAILED_POLICY_ERROR)){
- msgVars = new ArrayList()
- msgVars.add(response)
- msgVars.add(responseCode)
- }
-
- def msgVarsXML=""
- StringBuffer msgVarsBuff = new StringBuffer()
- if(msgVars!=null){
- for(String msgVar : msgVars){
- msgVarsBuff.append(
- """
- <tns:variables>${msgVar}</tns:variables>""")
- }
-
- }
- def message = ""
- if(messageId.startsWith("SVC")){
- message = """<tns:requestError xmlns:tns="http://org.openecomp/mso/request/types/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://org.openecomp/mso/request/types/v1 MsoServiceInstanceTypesV1.xsd">
- <tns:serviceException>
- <tns:messageId>${messageId}</tns:messageId>
- <tns:text>${messageTxt}</tns:text>${msgVarsBuff}
- </tns:serviceException>
-</tns:requestError>"""
- }else{
- message ="""<tns:requestError xmlns:tns="http://org.openecomp/mso/request/types/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://org.openecomp/mso/request/types/v1 MsoServiceInstanceTypesV1.xsd">
- <tns:policyException>
- <tns:messageId>${messageId}</tns:messageId>
- <tns:text>${messageTxt}</tns:text>${msgVarsBuff}
- </tns:policyException>
-</tns:requestError>"""
- }
- utils.log("DEBUG", "message " + message, isDebugLogEnabled)
- execution.setVariable(prefix+"ErrorResponse",message)
- execution.setVariable(prefix+"err", myErr)
- execution.setVariable(prefix+"errTxt", messageTxt)
- execution.setVariable(prefix+"errVariables", msgVars)
- utils.log("ERROR","Fault:"+ execution.getVariable(prefix+"ErrorResponse"))
- return message
- }catch(Exception ex) {
- utils.log("DEBUG","error mapping error, return null: " + ex,isDebugLogEnabled)
- return null
- }
-
- }
-
- String parseError(Execution execution){
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- def utils=new MsoUtils()
- def prefix=execution.getVariable("prefix")
- def text = execution.getVariable(prefix+"errTxt")
- def msgVars = execution.getVariable(prefix+"errVariables")
- utils.log("DEBUG",'parsing message: ' + text, isDebugLogEnabled)
- if(text == null){
- return 'failed'
- }
- if(msgVars!=null && !msgVars.isEmpty()){
- for(int i=0; i<msgVars.size(); i++){
- text = text.replaceFirst("%"+(i+1), msgVars[i])
- }
- }
- utils.log("DEBUG",'parsed message is: ' + text, isDebugLogEnabled)
- return text
- }
-
-
-
- Error mapErrorCodetoError(responseCode, descr)
- {
-
- if(responseCode==null || responseCode=='0' || responseCode=='500' || responseCode =='408'){
- return Error.SVC_NO_SERVER_RESOURCES
- }else if(responseCode == '401' || responseCode == '405' || responseCode == '409' || responseCode == '503'){
- return null
- }else if(responseCode == '400'){
- if(descr==null){
- return Error.SVC_GENERAL_SERVICE_ERROR
- }else{
- return Error.SVC_DETAILED_SERVICE_ERROR
- }
- }else if(responseCode == '401'){
- if(descr==null){
- return Error.POL_GENERAL_POLICY_ERROR
- }else{
- return Error.POL_DETAILED_POLICY_ERROR
- }
- }else{
- return Error.SVC_NO_SERVER_RESOURCES
- }
- }
-
- String mapCategoryToErrorCode(String errorCategory)
- {
- if(errorCategory.equals('OPENSTACK'))
- return Error.SVC_NO_SERVER_RESOURCES
- else if (errorCategory.equals('IO'))
- return Error.SVC_NO_SERVER_RESOURCES
- else if (errorCategory.equals('INTERNAL'))
- return Error.SVC_NO_SERVER_RESOURCES
- else if (errorCategory.equals('USERDATA'))
- return Error.SVC_GENERAL_SERVICE_ERROR
- else
- return Error.SVC_GENERAL_SERVICE_ERROR
- }
-
-
-
-
-
-
-}
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/META-INF/processes.xml b/bpmn/MSOCommonBPMN/src/main/resources/META-INF/processes.xml
deleted file mode 100644
index 1745af6558..0000000000
--- a/bpmn/MSOCommonBPMN/src/main/resources/META-INF/processes.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- ============LICENSE_START=======================================================
- ECOMP MSO
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ============LICENSE_END=========================================================
- -->
-
-
-<process-application
- xmlns="http://www.camunda.org/schema/1.0/ProcessApplication"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <process-engine name="common">
- <configuration>org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration</configuration>
- <datasource>java:jboss/datasources/ProcessEngine</datasource>
- <properties>
- <property name="history">full</property>
- <property name="databaseSchemaUpdate">true</property>
- <property name="authorizationEnabled">true</property>
- <property name="jobExecutorDeploymentAware">true</property>
- <property name="jobExecutorActivate">true</property>
- </properties>
- <plugins>
-
- <!-- plugin enabling Process Application event listener support -->
- <plugin>
- <class>org.camunda.bpm.application.impl.event.ProcessApplicationEventListenerPlugin</class>
- </plugin>
-
- <!-- plugin enabling integration of camunda Spin -->
- <plugin>
- <class>org.camunda.spin.plugin.impl.SpinProcessEnginePlugin</class>
- </plugin>
-
- <!-- plugin enabling connect support -->
- <plugin>
- <class>org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin</class>
- </plugin>
-
- <plugin>
- <class>org.openecomp.mso.bpmn.core.plugins.LoggingAndURNMappingPlugin</class>
- </plugin>
-
- <!-- Needed until all subflows generate MSOWorkflowException events -->
- <plugin>
- <class>org.openecomp.mso.bpmn.core.plugins.WorkflowExceptionPlugin</class>
- </plugin>
-
- <!-- Optional Plugin for Camunda BPM Workbench -->
- <!-- <plugin>
- <class>org.camunda.bpm.debugger.server.EmbeddableDebugWebsocketBootstrap</class>
- <properties>
- <property name="httpPort">8088</property>
- </properties>
- </plugin> -->
- </plugins>
- </process-engine>
-
-
- <process-archive name="MSOCommonBPMN">
- <process-engine>common</process-engine>
- <properties>
- <property name="isDeleteUponUndeploy">false</property>
- <property name="isScanForProcessDefinitions">true</property>
- </properties>
- </process-archive>
-
-</process-application>
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/CommonExceptionUtilTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/CommonExceptionUtilTest.groovy
deleted file mode 100644
index abb369725e..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/CommonExceptionUtilTest.groovy
+++ /dev/null
@@ -1,201 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.bpmn.common.scripts
-
-import org.junit.Assert
-import org.junit.Ignore
-import org.junit.runner.RunWith;
-import org.mockito.runners.MockitoJUnitRunner;
-
-
-
-import static org.mockito.Mockito.*
-
-import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
-import org.junit.Before
-import org.junit.runner.RunWith
-import org.mockito.MockitoAnnotations
-import org.mockito.internal.debugging.MockitoDebuggerImpl
-import org.mockito.runners.MockitoJUnitRunner
-import org.openecomp.mso.bpmn.common.scripts.CommonExceptionUtil;
-@RunWith(MockitoJUnitRunner.class)
-import org.junit.Test
-
-class CommonExceptionUtilTest {
-
- def aotsFault ="""<n1:Fault xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:n1="http://csi.cingular.com/CSI/Namespaces/ATTOneTicketingSystem/InfrastructureCommon/Types/Public/SoapFault.xsd" xmlns:cer="http://csi.cingular.com/CSI/Namespaces/ATTOneTicketingSystem/InfrastructureCommon/Types/Public/ErrorResponse.xsd" xsi:schemaLocation="http://csi.cingular.com/CSI/Namespaces/ATTOneTicketingSystem/InfrastructureCommon/Types/Public/SoapFault.xsd SoapFault-CDM.xsd">
- <n1:faultcode>xml:space</n1:faultcode>
- <n1:faultstring>String</n1:faultstring>
- <n1:faultactor>http://csi.att.com</n1:faultactor>
- <n1:detail>
- <n1:CSIApplicationException>
- <cer:Response>
- <cer:code>400</cer:code>
- <cer:description>bad stuff</cer:description>
- </cer:Response>
- <cer:ServiceProviderEntity>
- <cer:reportingServiceEntity>String</cer:reportingServiceEntity>
- <cer:faultDate>*** ERROR ***</cer:faultDate>
- <cer:faultSequenceNumber>String</cer:faultSequenceNumber>
- <cer:faultLevel>String</cer:faultLevel>
- <cer:faultCode>String</cer:faultCode>
- <cer:faultDescription>String</cer:faultDescription>
- <cer:ServiceProviderRawError>
- <cer:code>String</cer:code>
- <cer:description>String</cer:description>
- <cer:BISError>
- <cer:code>String</cer:code>
- <cer:description>String</cer:description>
- <cer:origination>String</cer:origination>
- <cer:severity>String</cer:severity>
- </cer:BISError>
- </cer:ServiceProviderRawError>
- </cer:ServiceProviderEntity>
- </n1:CSIApplicationException>
- <n1:CSIInternalException>
- <cer:reportingServiceEntity>String</cer:reportingServiceEntity>
- <cer:faultDate>*** ERROR ***</cer:faultDate>
- <cer:faultSequenceNumber>String</cer:faultSequenceNumber>
- <cer:faultLevel>String</cer:faultLevel>
- <cer:faultCode>String</cer:faultCode>
- <cer:faultDescription>String</cer:faultDescription>
- <cer:cingularErrorCode>String</cer:cingularErrorCode>
- <cer:cingularErrorDescription>String</cer:cingularErrorDescription>
- <cer:cingularErrorCategory>String</cer:cingularErrorCategory>
- </n1:CSIInternalException>
- </n1:detail>
-</n1:Fault>"""
-
-
- @Before
- public void init()
- {
- MockitoAnnotations.initMocks(this)
- }
-
- @Test
- @Ignore
- public void testMapAAIExceptionTCommonException() {
-
-
-
- String restFault = """
- <Fault>
-<requestError>
-<serviceException>
-<messageId>SVC3002</messageId>
-<text>Error writing output performing %1 on %2 (msg=%3) (ec=%4)</text>
-<variables>
-<variable>PUTcustomer</variable>
-<variable>SubName01</variable>
-<variable>Unexpected error reading/updating database:Adding this property for key [service-instance-id] and value [USSTU2CFCNC0101UJZZ01] violates a uniqueness constraint [service-instance-id]</variable>
-<variable>ERR.5.4.5105</variable>
-</variables>
-</serviceException>
-</requestError>
-</Fault>
- """
- def errorString = """<requestError>
-<serviceException>
-<messageId>SVC3002</messageId>
-<text>Error writing output performing %1 on %2 (msg=%3) (ec=%4)</text>
-<variables>
-<variable>PUTcustomer</variable>
-<variable>SubName01</variable>
-<variable>Unexpected error reading/updating database:Adding this property for key [service-instance-id] and value [USSTU2CFCNC0101UJZZ01] violates a uniqueness constraint [service-instance-id]</variable>
-<variable>ERR.5.4.5105</variable>
-</variables>
-</serviceException>
-</requestError>""" as String
-
-
-
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
-
- CommonExceptionUtil util = new CommonExceptionUtil()
- Assert.assertEquals(errorString, util.mapAAIExceptionTCommonException(restFault, mockExecution))
- }
-
-
-
-
- @Test
- public void testBuildException() {
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- when(mockExecution.getVariable("prefix")).thenReturn("test_")
- when(mockExecution.getVariable("test_ResponseCode")).thenReturn("400")
- ArrayList msgVars = new ArrayList()
- msgVars.add("var1")
- msgVars.add("var2")
- when(mockExecution.getVariable("test_errVariables")).thenReturn(msgVars)
-
-
- CommonExceptionUtil util = new CommonExceptionUtil()
- String msg = "Bad request"
- String errorString = """<tns:requestError xmlns:tns="http://org.openecomp/mso/request/types/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://org.openecomp/mso/request/types/v1 MsoServiceInstanceTypesV1.xsd">
- <tns:serviceException>
- <tns:messageId>SVC2000</tns:messageId>
- <tns:text>The following service error occurred: %1. Error code is %2.</tns:text>
- <tns:variables>var1</tns:variables>
- <tns:variables>var2</tns:variables>
- </tns:serviceException>
-</tns:requestError>"""
- Assert.assertEquals(errorString, util.buildException(msg, mockExecution))
- }
-
- @Test
- public void testMapAOTSExecptionToCommonException() {
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- when(mockExecution.getVariable("prefix")).thenReturn("test_")
- when(mockExecution.getVariable("test_ResponseCode")).thenReturn("400")
-
- CommonExceptionUtil util = new CommonExceptionUtil()
- String errorString = """<tns:requestError xmlns:tns="http://org.openecomp/mso/request/types/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://org.openecomp/mso/request/types/v1 MsoServiceInstanceTypesV1.xsd">
- <tns:serviceException>
- <tns:messageId>SVC2000</tns:messageId>
- <tns:text>The following service error occurred: %1. Error code is %2.</tns:text>
- <tns:variables>Received error from AOTS: bad stuff</tns:variables>
- <tns:variables>400</tns:variables>
- </tns:serviceException>
-</tns:requestError>"""
- Assert.assertEquals(errorString, util.mapAOTSExecptionToCommonException(aotsFault, mockExecution))
- }
-
-
- @Test
- public void testParseError() {
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- String errorString = "The following service error occurred: %1. Error code is %2."
- ArrayList msgVars = new ArrayList()
- msgVars.add("var1")
- msgVars.add("var2")
- when(mockExecution.getVariable("prefix")).thenReturn("test_")
- when(mockExecution.getVariable("test_errTxt")).thenReturn(errorString)
- when(mockExecution.getVariable("test_errVariables")).thenReturn(msgVars)
-
- CommonExceptionUtil util = new CommonExceptionUtil()
-
- Assert.assertEquals("The following service error occurred: var1. Error code is var2.", util.parseError(mockExecution))
-}
-
-
-
-}