diff --git a/adapters/mso-network-adapter-async-client/README.md b/adapters/mso-network-adapter-async-client/README.md
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/README.md
diff --git a/adapters/mso-network-adapter-async-client/WebContent/META-INF/MANIFEST.MF b/adapters/mso-network-adapter-async-client/WebContent/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..254272e
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/WebContent/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+
diff --git a/adapters/mso-network-adapter-async-client/pom.xml b/adapters/mso-network-adapter-async-client/pom.xml
new file mode 100644
index 0000000..3b2cd42
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/pom.xml
@@ -0,0 +1,90 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.openecomp.mso</groupId>
+		<artifactId>adapters</artifactId>
+		<version>0.0.4-SNAPSHOT</version>
+	</parent>
+	<groupId>org.openecomp.mso.adapters</groupId>
+	<artifactId>mso-network-adapter-async-client</artifactId>
+	<packaging>jar</packaging>
+	<name>mso-network-adapter-async-client</name>
+	<description>MSO Network Adapter Async Client</description>
+
+	<build>
+		<finalName>${project.artifactId}-${project.version}</finalName>
+		<plugins>
+			<plugin>
+				<artifactId>maven-jar-plugin</artifactId>
+				<version>2.6</version>
+				<configuration>
+					<classesDirectory>target/classes</classesDirectory>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.jvnet.jax-ws-commons</groupId>
+				<artifactId>jaxws-maven-plugin</artifactId>
+				<version>2.3</version>
+				<executions>
+					<execution>
+						<id>generate-stubs</id>
+						<phase>process-classes</phase>
+						<goals>
+							<goal>wsimport</goal>
+						</goals>
+						<configuration>
+                            <vmArgs>
+                                <vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
+                            </vmArgs>
+							<wsdlDirectory>src/main/resources</wsdlDirectory>
+							<wsdlFiles>
+								<wsdlFile>NetworkAdapterNotify.wsdl</wsdlFile>
+							</wsdlFiles>
+							<wsdlLocation>/NetworkAdapterNotify.wsdl</wsdlLocation>
+							<packageName>org.openecomp.mso.adapters.network.async.client</packageName>
+							<xnocompile>false</xnocompile>
+							<keep>true</keep>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+		<pluginManagement>
+			<plugins>
+				<!--This plugin's configuration is used to store Eclipse m2e settings 
+					only. It has no influence on the Maven build itself. -->
+				<plugin>
+					<groupId>org.eclipse.m2e</groupId>
+					<artifactId>lifecycle-mapping</artifactId>
+					<version>1.0.0</version>
+					<configuration>
+						<lifecycleMappingMetadata>
+							<pluginExecutions>
+								<pluginExecution>
+									<pluginExecutionFilter>
+										<groupId>
+											org.jvnet.jax-ws-commons
+										</groupId>
+										<artifactId>
+											jaxws-maven-plugin
+										</artifactId>
+										<versionRange>
+											[2.3,)
+										</versionRange>
+										<goals>
+											<goal>wsimport</goal>
+										</goals>
+									</pluginExecutionFilter>
+									<action>
+										<ignore></ignore>
+									</action>
+								</pluginExecution>
+							</pluginExecutions>
+						</lifecycleMappingMetadata>
+					</configuration>
+				</plugin>
+			</plugins>
+		</pluginManagement>
+	</build>
+</project>
diff --git a/adapters/mso-network-adapter-async-client/src/main/resources/NetworkAdapterNotify.wsdl b/adapters/mso-network-adapter-async-client/src/main/resources/NetworkAdapterNotify.wsdl
new file mode 100644
index 0000000..fe5346d
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/main/resources/NetworkAdapterNotify.wsdl
@@ -0,0 +1,295 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.7-b01  svn-revision#13316. -->
+<definitions targetNamespace="http://com.att.mso/networkNotify" name="networkAdapterNotify" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:tns="http://com.att.mso/networkNotify" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
+  <types>
+    <xs:schema version="1.0" targetNamespace="http://com.att.mso/networkNotify" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+      <xs:element name="createNetworkNotification" type="tns:createNetworkNotification"/>
+
+      <xs:element name="createNetworkNotificationResponse" type="tns:createNetworkNotificationResponse"/>
+
+      <xs:element name="deleteNetworkNotification" type="tns:deleteNetworkNotification"/>
+
+      <xs:element name="deleteNetworkNotificationResponse" type="tns:deleteNetworkNotificationResponse"/>
+
+      <xs:element name="queryNetworkNotification" type="tns:queryNetworkNotification"/>
+
+      <xs:element name="queryNetworkNotificationResponse" type="tns:queryNetworkNotificationResponse"/>
+
+      <xs:element name="rollbackNetworkNotification" type="tns:rollbackNetworkNotification"/>
+
+      <xs:element name="rollbackNetworkNotificationResponse" type="tns:rollbackNetworkNotificationResponse"/>
+      
+       <xs:element name="updateNetworkNotification" type="tns:updateNetworkNotification"/>
+
+      <xs:element name="updateNetworkNotificationResponse" type="tns:updateNetworkNotificationResponse"/>
+      
+      <xs:complexType name="queryNetworkNotification">
+        <xs:sequence>
+          <xs:element name="messageId" type="xs:string"/>
+          <xs:element name="completed" type="xs:boolean"/>
+          <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/>
+          <xs:element name="errorMessage" type="xs:string" minOccurs="0"/>
+          <xs:element name="networkExists" type="xs:boolean" minOccurs="0"/>
+          <xs:element name="networkId" type="xs:string" minOccurs="0"/>
+          <xs:element name="neutronNetworkId" type="xs:string" minOccurs="0"/>
+          <xs:element name="status" type="tns:networkStatus" minOccurs="0"/>
+          <xs:element name="vlans" type="xs:int" minOccurs="0" maxOccurs="unbounded"/>
+           <xs:element name="subnetIdMap"  minOccurs="0">
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
+                  <xs:complexType>
+                    <xs:sequence>
+                      <xs:element name="key" minOccurs="0" type="xs:string"/>
+                      <xs:element name="value" minOccurs="0" type="xs:string"/>
+                    </xs:sequence>
+                  </xs:complexType>
+                </xs:element>
+              </xs:sequence>
+            </xs:complexType>
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+
+      <xs:complexType name="queryNetworkNotificationResponse">
+        <xs:sequence/>
+      </xs:complexType>
+
+      <xs:complexType name="deleteNetworkNotification">
+        <xs:sequence>
+          <xs:element name="messageId" type="xs:string"/>
+          <xs:element name="completed" type="xs:boolean"/>
+          <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/>
+          <xs:element name="errorMessage" type="xs:string" minOccurs="0"/>
+          <xs:element name="networkDeleted" type="xs:boolean" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+
+      <xs:complexType name="deleteNetworkNotificationResponse">
+        <xs:sequence/>
+      </xs:complexType>
+
+      <xs:complexType name="rollbackNetworkNotification">
+        <xs:sequence>
+          <xs:element name="messageId" type="xs:string"/>
+          <xs:element name="completed" type="xs:boolean"/>
+          <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/>
+          <xs:element name="errorMessage" type="xs:string" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+
+      <xs:complexType name="rollbackNetworkNotificationResponse">
+        <xs:sequence/>
+      </xs:complexType>
+
+      <xs:complexType name="createNetworkNotification">
+        <xs:sequence>
+          <xs:element name="messageId" type="xs:string"/>
+          <xs:element name="completed" type="xs:boolean"/>
+          <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/>
+          <xs:element name="errorMessage" type="xs:string" minOccurs="0"/>
+          <xs:element name="networkId" type="xs:string" minOccurs="0"/>
+          <xs:element name="neutronNetworkId" type="xs:string" minOccurs="0"/>
+          <xs:element name="subnetIdMap"  minOccurs="0">
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
+                  <xs:complexType>
+                    <xs:sequence>
+                      <xs:element name="key" minOccurs="0" type="xs:string"/>
+                      <xs:element name="value" minOccurs="0" type="xs:string"/>
+                    </xs:sequence>
+                  </xs:complexType>
+                </xs:element>
+              </xs:sequence>
+            </xs:complexType>
+          </xs:element>
+          <xs:element name="rollback" type="tns:networkRollback" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      
+       <xs:complexType name="createNetworkNotificationResponse">
+        <xs:sequence/>
+      </xs:complexType>
+      
+       <xs:complexType name="updateNetworkNotification">
+        <xs:sequence>
+          <xs:element name="messageId" type="xs:string"/>
+          <xs:element name="completed" type="xs:boolean"/>
+          <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/>
+          <xs:element name="errorMessage" type="xs:string" minOccurs="0"/>
+          <xs:element name="subnetIdMap"  minOccurs="0">
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
+                  <xs:complexType>
+                    <xs:sequence>
+                      <xs:element name="key" minOccurs="0" type="xs:string"/>
+                      <xs:element name="value" minOccurs="0" type="xs:string"/>
+                    </xs:sequence>
+                  </xs:complexType>
+                </xs:element>
+              </xs:sequence>
+            </xs:complexType>
+          </xs:element>
+          <xs:element name="rollback" type="tns:networkRollback" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+
+      <xs:complexType name="updateNetworkNotificationResponse">
+        <xs:sequence/>
+      </xs:complexType>
+
+      <xs:complexType name="networkRollback">
+        <xs:sequence>
+          <xs:element name="cloudId" type="xs:string" minOccurs="0"/>
+          <xs:element name="msoRequest" type="tns:msoRequest" minOccurs="0"/>
+          <xs:element name="networkCreated" type="xs:boolean"/>
+          <xs:element name="networkId" type="xs:string" minOccurs="0"/>
+          <xs:element name="networkStackId" type="xs:string" minOccurs="0"/>
+           <xs:element name="networkName" type="xs:string" minOccurs="0"/>
+          <xs:element name="networkType" type="xs:string" minOccurs="0"/>
+          <xs:element name="networkUpdated" type="xs:boolean"/>
+          <xs:element name="neutronNetworkId" type="xs:string" minOccurs="0"/>
+          <xs:element name="physicalNetwork" type="xs:string" minOccurs="0"/>
+          <xs:element name="tenantId" type="xs:string" minOccurs="0"/>
+          <xs:element name="vlans" type="xs:int" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+      </xs:complexType>
+
+      <xs:complexType name="msoRequest">
+        <xs:sequence>
+          <xs:element name="requestId" type="xs:string" minOccurs="0"/>
+          <xs:element name="serviceInstanceId" type="xs:string" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+
+      <xs:simpleType name="msoExceptionCategory">
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="OPENSTACK"/>
+          <xs:enumeration value="IO"/>
+          <xs:enumeration value="INTERNAL"/>
+          <xs:enumeration value="USERDATA"/>
+        </xs:restriction>
+      </xs:simpleType>
+
+      <xs:simpleType name="networkStatus">
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="NOTFOUND"/>
+          <xs:enumeration value="ACTIVE"/>
+          <xs:enumeration value="DOWN"/>
+          <xs:enumeration value="BUILD"/>
+          <xs:enumeration value="ERROR"/>
+          <xs:enumeration value="UNKNOWN"/>
+        </xs:restriction>
+      </xs:simpleType>
+</xs:schema>
+  </types>
+  <message name="rollbackNetworkNotification">
+    <part name="parameters" element="tns:rollbackNetworkNotification"/>
+  </message>
+  <message name="rollbackNetworkNotificationResponse">
+    <part name="parameters" element="tns:rollbackNetworkNotificationResponse"/>
+  </message>
+  <message name="queryNetworkNotification">
+    <part name="parameters" element="tns:queryNetworkNotification"/>
+  </message>
+  <message name="queryNetworkNotificationResponse">
+    <part name="parameters" element="tns:queryNetworkNotificationResponse"/>
+  </message>
+  <message name="createNetworkNotification">
+    <part name="parameters" element="tns:createNetworkNotification"/>
+  </message>
+  <message name="createNetworkNotificationResponse">
+    <part name="parameters" element="tns:createNetworkNotificationResponse"/>
+  </message>
+  <message name="deleteNetworkNotification">
+    <part name="parameters" element="tns:deleteNetworkNotification"/>
+  </message>
+  <message name="deleteNetworkNotificationResponse">
+    <part name="parameters" element="tns:deleteNetworkNotificationResponse"/>
+  </message>
+   <message name="updateNetworkNotification">
+    <part name="parameters" element="tns:updateNetworkNotification"/>
+  </message>
+  <message name="updateNetworkNotificationResponse">
+    <part name="parameters" element="tns:updateNetworkNotificationResponse"/>
+  </message>
+  <portType name="networkAdapterNotify">
+    <operation name="rollbackNetworkNotification">
+      <input wsam:Action="http://com.att.mso/notify/adapterNotify/rollbackNetworkNotificationRequest" message="tns:rollbackNetworkNotification"/>
+      <output wsam:Action="http://com.att.mso/notify/adapterNotify/rollbackNetworkNotificationResponse" message="tns:rollbackNetworkNotificationResponse"/>
+    </operation>
+    <operation name="queryNetworkNotification">
+      <input wsam:Action="http://com.att.mso/notify/adapterNotify/queryNetworkNotificationRequest" message="tns:queryNetworkNotification"/>
+      <output wsam:Action="http://com.att.mso/notify/adapterNotify/queryNetworkNotificationResponse" message="tns:queryNetworkNotificationResponse"/>
+    </operation>
+    <operation name="createNetworkNotification">
+      <input wsam:Action="http://com.att.mso/notify/adapterNotify/createNetworkNotificationRequest" message="tns:createNetworkNotification"/>
+      <output wsam:Action="http://com.att.mso/notify/adapterNotify/createNetworkNotificationResponse" message="tns:createNetworkNotificationResponse"/>
+    </operation>
+    <operation name="deleteNetworkNotification">
+      <input wsam:Action="http://com.att.mso/notify/adapterNotify/deleteNetworkNotificationRequest" message="tns:deleteNetworkNotification"/>
+      <output wsam:Action="http://com.att.mso/notify/adapterNotify/deleteNetworkNotificationResponse" message="tns:deleteNetworkNotificationResponse"/>
+    </operation>
+     <operation name="updateNetworkNotification">
+      <input wsam:Action="http://com.att.mso/notify/adapterNotify/updateNetworkNotificationRequest" message="tns:updateNetworkNotification"/>
+      <output wsam:Action="http://com.att.mso/notify/adapterNotify/updateNetworkNotificationResponse" message="tns:updateNetworkNotificationResponse"/>
+    </operation>
+  </portType>
+  <binding name="MsoNetworkAdapterAsyncImplPortBinding" type="tns:networkAdapterNotify">
+    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+    <operation name="rollbackNetworkNotification">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+    </operation>
+    <operation name="queryNetworkNotification">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+    </operation>
+    <operation name="createNetworkNotification">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+    </operation>
+    <operation name="deleteNetworkNotification">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+    </operation>
+    <operation name="updateNetworkNotification">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+    </operation>
+  </binding>
+  <service name="networkAdapterNotify">
+    <port name="MsoNetworkAdapterAsyncImplPort" binding="tns:MsoNetworkAdapterAsyncImplPortBinding">
+      <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+    </port>
+  </service>
+</definitions>
+
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/CreateNetworkNotificationESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/CreateNetworkNotificationESTest.java
new file mode 100644
index 0000000..ce129e4
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/CreateNetworkNotificationESTest.java
@@ -0,0 +1,213 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:38:53 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import java.util.List;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class CreateNetworkNotificationESTest extends CreateNetworkNotificationESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      CreateNetworkNotification.SubnetIdMap createNetworkNotification_SubnetIdMap0 = new CreateNetworkNotification.SubnetIdMap();
+      createNetworkNotification0.setSubnetIdMap(createNetworkNotification_SubnetIdMap0);
+      CreateNetworkNotification.SubnetIdMap createNetworkNotification_SubnetIdMap1 = createNetworkNotification0.getSubnetIdMap();
+      assertSame(createNetworkNotification_SubnetIdMap1, createNetworkNotification_SubnetIdMap0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      createNetworkNotification0.neutronNetworkId = "org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory";
+      String string0 = createNetworkNotification0.getNeutronNetworkId();
+      assertEquals("org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      createNetworkNotification0.neutronNetworkId = "";
+      String string0 = createNetworkNotification0.getNeutronNetworkId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      createNetworkNotification0.setNetworkId("IO");
+      String string0 = createNetworkNotification0.getNetworkId();
+      assertEquals("IO", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      createNetworkNotification0.setMessageId(",x!0'6/o1Bj\"nxg JH");
+      String string0 = createNetworkNotification0.getMessageId();
+      assertEquals(",x!0'6/o1Bj\"nxg JH", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      createNetworkNotification0.messageId = "";
+      String string0 = createNetworkNotification0.getMessageId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      createNetworkNotification0.errorMessage = "";
+      String string0 = createNetworkNotification0.getErrorMessage();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      String string0 = createNetworkNotification0.getNetworkId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      NetworkRollback networkRollback0 = createNetworkNotification0.getRollback();
+      assertNull(networkRollback0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      boolean boolean0 = createNetworkNotification0.isCompleted();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      createNetworkNotification0.getException();
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      createNetworkNotification0.setErrorMessage("org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory");
+      String string0 = createNetworkNotification0.getErrorMessage();
+      assertEquals("org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      String string0 = createNetworkNotification0.getNeutronNetworkId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      createNetworkNotification0.setNeutronNetworkId("");
+      assertNull(createNetworkNotification0.getErrorMessage());
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.OPENSTACK;
+      createNetworkNotification0.setException(msoExceptionCategory0);
+      MsoExceptionCategory msoExceptionCategory1 = createNetworkNotification0.getException();
+      assertEquals(MsoExceptionCategory.OPENSTACK, msoExceptionCategory1);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      createNetworkNotification0.setRollback((NetworkRollback) null);
+      assertNull(createNetworkNotification0.getMessageId());
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      createNetworkNotification0.setCompleted(true);
+      boolean boolean0 = createNetworkNotification0.isCompleted();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      createNetworkNotification0.setNetworkId("");
+      String string0 = createNetworkNotification0.getNetworkId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      CreateNetworkNotification.SubnetIdMap createNetworkNotification_SubnetIdMap0 = createNetworkNotification0.getSubnetIdMap();
+      assertNull(createNetworkNotification_SubnetIdMap0);
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      String string0 = createNetworkNotification0.getErrorMessage();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      String string0 = createNetworkNotification0.getMessageId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      CreateNetworkNotification.SubnetIdMap.Entry createNetworkNotification_SubnetIdMap_Entry0 = new CreateNetworkNotification.SubnetIdMap.Entry();
+      createNetworkNotification_SubnetIdMap_Entry0.setKey("");
+      assertEquals("", createNetworkNotification_SubnetIdMap_Entry0.getKey());
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      CreateNetworkNotification.SubnetIdMap.Entry createNetworkNotification_SubnetIdMap_Entry0 = new CreateNetworkNotification.SubnetIdMap.Entry();
+      String string0 = createNetworkNotification_SubnetIdMap_Entry0.getValue();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      CreateNetworkNotification.SubnetIdMap.Entry createNetworkNotification_SubnetIdMap_Entry0 = new CreateNetworkNotification.SubnetIdMap.Entry();
+      createNetworkNotification_SubnetIdMap_Entry0.setValue("'G^M#'lcLg6Gw}");
+      assertNull(createNetworkNotification_SubnetIdMap_Entry0.getKey());
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      CreateNetworkNotification.SubnetIdMap.Entry createNetworkNotification_SubnetIdMap_Entry0 = new CreateNetworkNotification.SubnetIdMap.Entry();
+      String string0 = createNetworkNotification_SubnetIdMap_Entry0.getKey();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      CreateNetworkNotification.SubnetIdMap createNetworkNotification_SubnetIdMap0 = new CreateNetworkNotification.SubnetIdMap();
+      createNetworkNotification_SubnetIdMap0.getEntry();
+      List<CreateNetworkNotification.SubnetIdMap.Entry> list0 = createNetworkNotification_SubnetIdMap0.getEntry();
+      assertTrue(list0.isEmpty());
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/CreateNetworkNotificationESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/CreateNetworkNotificationESTestscaffolding.java
new file mode 100644
index 0000000..358324c
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/CreateNetworkNotificationESTestscaffolding.java
@@ -0,0 +1,83 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:38:53 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+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 CreateNetworkNotificationESTestscaffolding {
+
+  @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.network.async.client.CreateNetworkNotification"; 
+    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(CreateNetworkNotificationESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.CreateNetworkNotification$SubnetIdMap",
+      "org.openecomp.mso.adapters.network.async.client.MsoRequest",
+      "org.openecomp.mso.adapters.network.async.client.NetworkRollback",
+      "org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory",
+      "org.openecomp.mso.adapters.network.async.client.CreateNetworkNotification$SubnetIdMap$Entry",
+      "org.openecomp.mso.adapters.network.async.client.CreateNetworkNotification"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/CreateNetworkNotificationResponseESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/CreateNetworkNotificationResponseESTest.java
new file mode 100644
index 0000000..411bb0e
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/CreateNetworkNotificationResponseESTest.java
@@ -0,0 +1,20 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:37:26 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class CreateNetworkNotificationResponseESTest extends CreateNetworkNotificationResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      CreateNetworkNotificationResponse createNetworkNotificationResponse0 = new CreateNetworkNotificationResponse();
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/CreateNetworkNotificationResponseESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/CreateNetworkNotificationResponseESTestscaffolding.java
new file mode 100644
index 0000000..63ec1f4
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/CreateNetworkNotificationResponseESTestscaffolding.java
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:37:26 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+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 CreateNetworkNotificationResponseESTestscaffolding {
+
+  @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.network.async.client.CreateNetworkNotificationResponse"; 
+    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(CreateNetworkNotificationResponseESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.CreateNetworkNotificationResponse"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/DeleteNetworkNotificationESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/DeleteNetworkNotificationESTest.java
new file mode 100644
index 0000000..2023b62
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/DeleteNetworkNotificationESTest.java
@@ -0,0 +1,114 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:34:29 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class DeleteNetworkNotificationESTest extends DeleteNetworkNotificationESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      DeleteNetworkNotification deleteNetworkNotification0 = new DeleteNetworkNotification();
+      deleteNetworkNotification0.completed = true;
+      boolean boolean0 = deleteNetworkNotification0.isCompleted();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      DeleteNetworkNotification deleteNetworkNotification0 = new DeleteNetworkNotification();
+      deleteNetworkNotification0.messageId = "";
+      String string0 = deleteNetworkNotification0.getMessageId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      DeleteNetworkNotification deleteNetworkNotification0 = new DeleteNetworkNotification();
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.IO;
+      deleteNetworkNotification0.setException(msoExceptionCategory0);
+      MsoExceptionCategory msoExceptionCategory1 = deleteNetworkNotification0.getException();
+      assertEquals(MsoExceptionCategory.IO, msoExceptionCategory1);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      DeleteNetworkNotification deleteNetworkNotification0 = new DeleteNetworkNotification();
+      deleteNetworkNotification0.setErrorMessage("");
+      String string0 = deleteNetworkNotification0.getErrorMessage();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      DeleteNetworkNotification deleteNetworkNotification0 = new DeleteNetworkNotification();
+      deleteNetworkNotification0.setMessageId("doA");
+      String string0 = deleteNetworkNotification0.getMessageId();
+      assertEquals("doA", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      DeleteNetworkNotification deleteNetworkNotification0 = new DeleteNetworkNotification();
+      deleteNetworkNotification0.setErrorMessage("aZ");
+      String string0 = deleteNetworkNotification0.getErrorMessage();
+      assertEquals("aZ", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      DeleteNetworkNotification deleteNetworkNotification0 = new DeleteNetworkNotification();
+      String string0 = deleteNetworkNotification0.getErrorMessage();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      DeleteNetworkNotification deleteNetworkNotification0 = new DeleteNetworkNotification();
+      boolean boolean0 = deleteNetworkNotification0.isCompleted();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      DeleteNetworkNotification deleteNetworkNotification0 = new DeleteNetworkNotification();
+      deleteNetworkNotification0.setNetworkDeleted((Boolean) null);
+      assertFalse(deleteNetworkNotification0.isCompleted());
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      DeleteNetworkNotification deleteNetworkNotification0 = new DeleteNetworkNotification();
+      Boolean boolean0 = deleteNetworkNotification0.isNetworkDeleted();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      DeleteNetworkNotification deleteNetworkNotification0 = new DeleteNetworkNotification();
+      deleteNetworkNotification0.setCompleted(false);
+      assertFalse(deleteNetworkNotification0.isCompleted());
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      DeleteNetworkNotification deleteNetworkNotification0 = new DeleteNetworkNotification();
+      deleteNetworkNotification0.getException();
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      DeleteNetworkNotification deleteNetworkNotification0 = new DeleteNetworkNotification();
+      String string0 = deleteNetworkNotification0.getMessageId();
+      assertNull(string0);
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/DeleteNetworkNotificationESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/DeleteNetworkNotificationESTestscaffolding.java
new file mode 100644
index 0000000..368b7d2
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/DeleteNetworkNotificationESTestscaffolding.java
@@ -0,0 +1,79 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:34:29 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+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 DeleteNetworkNotificationESTestscaffolding {
+
+  @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.network.async.client.DeleteNetworkNotification"; 
+    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(DeleteNetworkNotificationESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.DeleteNetworkNotification",
+      "org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/DeleteNetworkNotificationResponseESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/DeleteNetworkNotificationResponseESTest.java
new file mode 100644
index 0000000..f2a20f8
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/DeleteNetworkNotificationResponseESTest.java
@@ -0,0 +1,20 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:37:19 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class DeleteNetworkNotificationResponseESTest extends DeleteNetworkNotificationResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      DeleteNetworkNotificationResponse deleteNetworkNotificationResponse0 = new DeleteNetworkNotificationResponse();
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/DeleteNetworkNotificationResponseESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/DeleteNetworkNotificationResponseESTestscaffolding.java
new file mode 100644
index 0000000..ff40a14
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/DeleteNetworkNotificationResponseESTestscaffolding.java
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:37:19 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+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 DeleteNetworkNotificationResponseESTestscaffolding {
+
+  @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.network.async.client.DeleteNetworkNotificationResponse"; 
+    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(DeleteNetworkNotificationResponseESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.DeleteNetworkNotificationResponse"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/MsoExceptionCategoryESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/MsoExceptionCategoryESTest.java
new file mode 100644
index 0000000..90f4136
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/MsoExceptionCategoryESTest.java
@@ -0,0 +1,97 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:36:01 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoExceptionCategoryESTest extends MsoExceptionCategoryESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoExceptionCategory[] msoExceptionCategoryArray0 = MsoExceptionCategory.values();
+      assertNotNull(msoExceptionCategoryArray0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.valueOf("IO");
+      assertEquals(MsoExceptionCategory.IO, msoExceptionCategory0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        MsoExceptionCategory.valueOf((String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // Name is null
+         //
+         verifyException("java.lang.Enum", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        MsoExceptionCategory.valueOf("");
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // No enum constant org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory.
+         //
+         verifyException("java.lang.Enum", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        MsoExceptionCategory.fromValue("v@;'v:U'4Kk;");
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // No enum constant org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory.v@;'v:U'4Kk;
+         //
+         verifyException("java.lang.Enum", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.fromValue("INTERNAL");
+      String string0 = msoExceptionCategory0.value();
+      assertEquals("INTERNAL", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        MsoExceptionCategory.fromValue((String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // Name is null
+         //
+         verifyException("java.lang.Enum", e);
+      }
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/MsoExceptionCategoryESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/MsoExceptionCategoryESTestscaffolding.java
new file mode 100644
index 0000000..aff7063
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/MsoExceptionCategoryESTestscaffolding.java
@@ -0,0 +1,83 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:36:01 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+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 MsoExceptionCategoryESTestscaffolding {
+
+  @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.network.async.client.MsoExceptionCategory"; 
+    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(MsoExceptionCategoryESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoExceptionCategoryESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory"
+    );
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/MsoRequestESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/MsoRequestESTest.java
new file mode 100644
index 0000000..3d53643
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/MsoRequestESTest.java
@@ -0,0 +1,72 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:33:43 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoRequestESTest extends MsoRequestESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      msoRequest0.setServiceInstanceId("");
+      String string0 = msoRequest0.getServiceInstanceId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      msoRequest0.requestId = "";
+      msoRequest0.requestId = "0[73oqjz<&DT/q@";
+      String string0 = msoRequest0.getRequestId();
+      assertEquals("0[73oqjz<&DT/q@", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      msoRequest0.requestId = null;
+      msoRequest0.requestId = "";
+      String string0 = msoRequest0.getRequestId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      msoRequest0.setRequestId("");
+      assertEquals("", msoRequest0.getRequestId());
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      msoRequest0.setServiceInstanceId("0[73oqjz<&DT/q@");
+      String string0 = msoRequest0.getServiceInstanceId();
+      assertEquals("0[73oqjz<&DT/q@", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      String string0 = msoRequest0.getServiceInstanceId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      String string0 = msoRequest0.getRequestId();
+      assertNull(string0);
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/MsoRequestESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/MsoRequestESTestscaffolding.java
new file mode 100644
index 0000000..266db77
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/MsoRequestESTestscaffolding.java
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:33:43 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+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 MsoRequestESTestscaffolding {
+
+  @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.network.async.client.MsoRequest"; 
+    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(MsoRequestESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.MsoRequest"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/NetworkRollbackESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/NetworkRollbackESTest.java
new file mode 100644
index 0000000..524d5d0
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/NetworkRollbackESTest.java
@@ -0,0 +1,301 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:33:22 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import java.util.LinkedList;
+import java.util.List;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class NetworkRollbackESTest extends NetworkRollbackESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.networkUpdated = true;
+      boolean boolean0 = networkRollback0.isNetworkUpdated();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      LinkedList<Integer> linkedList0 = new LinkedList<Integer>();
+      linkedList0.add((Integer) null);
+      networkRollback0.vlans = (List<Integer>) linkedList0;
+      List<Integer> list0 = networkRollback0.getVlans();
+      assertEquals(1, list0.size());
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.tenantId = "&Ks9_, 2}e``";
+      String string0 = networkRollback0.getTenantId();
+      assertEquals("&Ks9_, 2}e``", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.tenantId = "";
+      String string0 = networkRollback0.getTenantId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.physicalNetwork = "'@3 VI0";
+      String string0 = networkRollback0.getPhysicalNetwork();
+      assertEquals("'@3 VI0", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.physicalNetwork = "";
+      String string0 = networkRollback0.getPhysicalNetwork();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.neutronNetworkId = "";
+      String string0 = networkRollback0.getNeutronNetworkId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setNetworkType("INXI`s_hhn8 |A");
+      String string0 = networkRollback0.getNetworkType();
+      assertEquals("INXI`s_hhn8 |A", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.networkType = "";
+      String string0 = networkRollback0.getNetworkType();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.networkStackId = "{vfF!&8J>*u,6e";
+      String string0 = networkRollback0.getNetworkStackId();
+      assertEquals("{vfF!&8J>*u,6e", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.networkStackId = "";
+      String string0 = networkRollback0.getNetworkStackId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.networkName = "!mdg>u#";
+      String string0 = networkRollback0.getNetworkName();
+      assertEquals("!mdg>u#", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setNetworkName("");
+      String string0 = networkRollback0.getNetworkName();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setNetworkId(">jKMf7Ce<f,p<");
+      String string0 = networkRollback0.getNetworkId();
+      assertEquals(">jKMf7Ce<f,p<", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setNetworkId("");
+      String string0 = networkRollback0.getNetworkId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      MsoRequest msoRequest0 = new MsoRequest();
+      networkRollback0.msoRequest = msoRequest0;
+      MsoRequest msoRequest1 = networkRollback0.getMsoRequest();
+      assertSame(msoRequest1, msoRequest0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.cloudId = "wzy(*<k&K@W";
+      String string0 = networkRollback0.getCloudId();
+      assertEquals("wzy(*<k&K@W", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setCloudId("");
+      String string0 = networkRollback0.getCloudId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      List<Integer> list0 = networkRollback0.getVlans();
+      assertEquals(0, list0.size());
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      String string0 = networkRollback0.getNetworkName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setNetworkCreated(true);
+      boolean boolean0 = networkRollback0.isNetworkCreated();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      String string0 = networkRollback0.getTenantId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setPhysicalNetwork("T(SG{/@|z:");
+      assertNull(networkRollback0.getNetworkName());
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      MsoRequest msoRequest0 = networkRollback0.getMsoRequest();
+      assertNull(msoRequest0);
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      boolean boolean0 = networkRollback0.isNetworkCreated();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      String string0 = networkRollback0.getNetworkStackId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      String string0 = networkRollback0.getCloudId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test27()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setNetworkUpdated(false);
+      assertFalse(networkRollback0.isNetworkUpdated());
+  }
+
+  @Test(timeout = 4000)
+  public void test28()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      String string0 = networkRollback0.getNetworkType();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test29()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setMsoRequest((MsoRequest) null);
+      assertNull(networkRollback0.getNetworkType());
+  }
+
+  @Test(timeout = 4000)
+  public void test30()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setNeutronNetworkId("hiSG;1>|vJ^&^D");
+      String string0 = networkRollback0.getNeutronNetworkId();
+      assertEquals("hiSG;1>|vJ^&^D", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test31()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      boolean boolean0 = networkRollback0.isNetworkUpdated();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test32()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      String string0 = networkRollback0.getNetworkId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test33()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setTenantId("");
+      assertFalse(networkRollback0.isNetworkCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test34()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      String string0 = networkRollback0.getPhysicalNetwork();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test35()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      String string0 = networkRollback0.getNeutronNetworkId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test36()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setNetworkStackId("hiSG;1>|vJ^&^D");
+      assertNull(networkRollback0.getNetworkType());
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/NetworkRollbackESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/NetworkRollbackESTestscaffolding.java
new file mode 100644
index 0000000..b493406
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/NetworkRollbackESTestscaffolding.java
@@ -0,0 +1,79 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:33:22 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+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 NetworkRollbackESTestscaffolding {
+
+  @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.network.async.client.NetworkRollback"; 
+    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(NetworkRollbackESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.MsoRequest",
+      "org.openecomp.mso.adapters.network.async.client.NetworkRollback"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/NetworkStatusESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/NetworkStatusESTest.java
new file mode 100644
index 0000000..ac2729a
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/NetworkStatusESTest.java
@@ -0,0 +1,91 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:37:01 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class NetworkStatusESTest extends NetworkStatusESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      NetworkStatus[] networkStatusArray0 = NetworkStatus.values();
+      assertNotNull(networkStatusArray0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        NetworkStatus.valueOf((String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // Name is null
+         //
+         verifyException("java.lang.Enum", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        NetworkStatus.valueOf("RjP-NHISY|sp*/M");
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // No enum constant org.openecomp.mso.adapters.network.async.client.NetworkStatus.RjP-NHISY|sp*_/M
+         //
+         verifyException("java.lang.Enum", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        NetworkStatus.fromValue((String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // Name is null
+         //
+         verifyException("java.lang.Enum", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        NetworkStatus.fromValue("");
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // No enum constant org.openecomp.mso.adapters.network.async.client.NetworkStatus.
+         //
+         verifyException("java.lang.Enum", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      NetworkStatus networkStatus0 = NetworkStatus.ACTIVE;
+      String string0 = networkStatus0.value();
+      assertEquals("ACTIVE", string0);
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/NetworkStatusESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/NetworkStatusESTestscaffolding.java
new file mode 100644
index 0000000..0d9c2ef
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/NetworkStatusESTestscaffolding.java
@@ -0,0 +1,83 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:37:01 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+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 NetworkStatusESTestscaffolding {
+
+  @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.network.async.client.NetworkStatus"; 
+    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(NetworkStatusESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.NetworkStatus"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(NetworkStatusESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.adapters.network.async.client.NetworkStatus"
+    );
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/ObjectFactoryESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/ObjectFactoryESTest.java
new file mode 100644
index 0000000..d897ae6
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/ObjectFactoryESTest.java
@@ -0,0 +1,154 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:38:17 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import javax.xml.bind.JAXBElement;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class ObjectFactoryESTest extends ObjectFactoryESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      MsoRequest msoRequest0 = objectFactory0.createMsoRequest();
+      assertNull(msoRequest0.getServiceInstanceId());
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      NetworkRollback networkRollback0 = objectFactory0.createNetworkRollback();
+      assertNull(networkRollback0.getPhysicalNetwork());
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      CreateNetworkNotification.SubnetIdMap.Entry createNetworkNotification_SubnetIdMap_Entry0 = objectFactory0.createCreateNetworkNotificationSubnetIdMapEntry();
+      assertNull(createNetworkNotification_SubnetIdMap_Entry0.getKey());
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      CreateNetworkNotification.SubnetIdMap createNetworkNotification_SubnetIdMap0 = objectFactory0.createCreateNetworkNotificationSubnetIdMap();
+      assertNotNull(createNetworkNotification_SubnetIdMap0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      UpdateNetworkNotification.SubnetIdMap.Entry updateNetworkNotification_SubnetIdMap_Entry0 = objectFactory0.createUpdateNetworkNotificationSubnetIdMapEntry();
+      assertNull(updateNetworkNotification_SubnetIdMap_Entry0.getKey());
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      UpdateNetworkNotification.SubnetIdMap updateNetworkNotification_SubnetIdMap0 = objectFactory0.createUpdateNetworkNotificationSubnetIdMap();
+      assertNotNull(updateNetworkNotification_SubnetIdMap0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      QueryNetworkNotification.SubnetIdMap.Entry queryNetworkNotification_SubnetIdMap_Entry0 = objectFactory0.createQueryNetworkNotificationSubnetIdMapEntry();
+      assertNull(queryNetworkNotification_SubnetIdMap_Entry0.getKey());
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      DeleteNetworkNotification deleteNetworkNotification0 = objectFactory0.createDeleteNetworkNotification();
+      JAXBElement<DeleteNetworkNotification> jAXBElement0 = objectFactory0.createDeleteNetworkNotification(deleteNetworkNotification0);
+      assertNotNull(jAXBElement0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      QueryNetworkNotification.SubnetIdMap queryNetworkNotification_SubnetIdMap0 = objectFactory0.createQueryNetworkNotificationSubnetIdMap();
+      assertNotNull(queryNetworkNotification_SubnetIdMap0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      DeleteNetworkNotificationResponse deleteNetworkNotificationResponse0 = objectFactory0.createDeleteNetworkNotificationResponse();
+      JAXBElement<DeleteNetworkNotificationResponse> jAXBElement0 = objectFactory0.createDeleteNetworkNotificationResponse(deleteNetworkNotificationResponse0);
+      assertNotNull(jAXBElement0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      RollbackNetworkNotificationResponse rollbackNetworkNotificationResponse0 = objectFactory0.createRollbackNetworkNotificationResponse();
+      JAXBElement<RollbackNetworkNotificationResponse> jAXBElement0 = objectFactory0.createRollbackNetworkNotificationResponse(rollbackNetworkNotificationResponse0);
+      assertNotNull(jAXBElement0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      CreateNetworkNotificationResponse createNetworkNotificationResponse0 = objectFactory0.createCreateNetworkNotificationResponse();
+      JAXBElement<CreateNetworkNotificationResponse> jAXBElement0 = objectFactory0.createCreateNetworkNotificationResponse(createNetworkNotificationResponse0);
+      assertNotNull(jAXBElement0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      RollbackNetworkNotification rollbackNetworkNotification0 = objectFactory0.createRollbackNetworkNotification();
+      JAXBElement<RollbackNetworkNotification> jAXBElement0 = objectFactory0.createRollbackNetworkNotification(rollbackNetworkNotification0);
+      assertNotNull(jAXBElement0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      UpdateNetworkNotification updateNetworkNotification0 = objectFactory0.createUpdateNetworkNotification();
+      JAXBElement<UpdateNetworkNotification> jAXBElement0 = objectFactory0.createUpdateNetworkNotification(updateNetworkNotification0);
+      assertNotNull(jAXBElement0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      QueryNetworkNotification queryNetworkNotification0 = objectFactory0.createQueryNetworkNotification();
+      JAXBElement<QueryNetworkNotification> jAXBElement0 = objectFactory0.createQueryNetworkNotification(queryNetworkNotification0);
+      assertNotNull(jAXBElement0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      UpdateNetworkNotificationResponse updateNetworkNotificationResponse0 = objectFactory0.createUpdateNetworkNotificationResponse();
+      JAXBElement<UpdateNetworkNotificationResponse> jAXBElement0 = objectFactory0.createUpdateNetworkNotificationResponse(updateNetworkNotificationResponse0);
+      assertNotNull(jAXBElement0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      QueryNetworkNotificationResponse queryNetworkNotificationResponse0 = objectFactory0.createQueryNetworkNotificationResponse();
+      JAXBElement<QueryNetworkNotificationResponse> jAXBElement0 = objectFactory0.createQueryNetworkNotificationResponse(queryNetworkNotificationResponse0);
+      assertNotNull(jAXBElement0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      CreateNetworkNotification createNetworkNotification0 = objectFactory0.createCreateNetworkNotification();
+      JAXBElement<CreateNetworkNotification> jAXBElement0 = objectFactory0.createCreateNetworkNotification(createNetworkNotification0);
+      assertNotNull(jAXBElement0);
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/ObjectFactoryESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/ObjectFactoryESTestscaffolding.java
new file mode 100644
index 0000000..1ac0a53
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/ObjectFactoryESTestscaffolding.java
@@ -0,0 +1,103 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:38:17 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+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 ObjectFactoryESTestscaffolding {
+
+  @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.network.async.client.ObjectFactory"; 
+    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(ObjectFactoryESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.MsoRequest",
+      "org.openecomp.mso.adapters.network.async.client.DeleteNetworkNotification",
+      "org.openecomp.mso.adapters.network.async.client.UpdateNetworkNotification",
+      "org.openecomp.mso.adapters.network.async.client.NetworkRollback",
+      "org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory",
+      "org.openecomp.mso.adapters.network.async.client.QueryNetworkNotification",
+      "org.openecomp.mso.adapters.network.async.client.QueryNetworkNotificationResponse",
+      "org.openecomp.mso.adapters.network.async.client.NetworkStatus",
+      "org.openecomp.mso.adapters.network.async.client.QueryNetworkNotification$SubnetIdMap$Entry",
+      "org.openecomp.mso.adapters.network.async.client.RollbackNetworkNotificationResponse",
+      "org.openecomp.mso.adapters.network.async.client.QueryNetworkNotification$SubnetIdMap",
+      "org.openecomp.mso.adapters.network.async.client.CreateNetworkNotification$SubnetIdMap",
+      "org.openecomp.mso.adapters.network.async.client.DeleteNetworkNotificationResponse",
+      "org.openecomp.mso.adapters.network.async.client.UpdateNetworkNotification$SubnetIdMap$Entry",
+      "org.openecomp.mso.adapters.network.async.client.UpdateNetworkNotification$SubnetIdMap",
+      "org.openecomp.mso.adapters.network.async.client.CreateNetworkNotificationResponse",
+      "org.openecomp.mso.adapters.network.async.client.CreateNetworkNotification$SubnetIdMap$Entry",
+      "org.openecomp.mso.adapters.network.async.client.RollbackNetworkNotification",
+      "org.openecomp.mso.adapters.network.async.client.ObjectFactory",
+      "org.openecomp.mso.adapters.network.async.client.CreateNetworkNotification",
+      "org.openecomp.mso.adapters.network.async.client.UpdateNetworkNotificationResponse"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ObjectFactoryESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.adapters.network.async.client.ObjectFactory"
+    );
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/QueryNetworkNotificationESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/QueryNetworkNotificationESTest.java
new file mode 100644
index 0000000..f5e0f95
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/QueryNetworkNotificationESTest.java
@@ -0,0 +1,266 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:33:21 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import java.util.LinkedList;
+import java.util.List;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class QueryNetworkNotificationESTest extends QueryNetworkNotificationESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      Boolean boolean0 = new Boolean(true);
+      queryNetworkNotification0.networkExists = boolean0;
+      Boolean boolean1 = queryNetworkNotification0.isNetworkExists();
+      assertTrue(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      Boolean boolean0 = new Boolean("EY");
+      queryNetworkNotification0.networkExists = boolean0;
+      Boolean boolean1 = queryNetworkNotification0.isNetworkExists();
+      assertFalse(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      LinkedList<Integer> linkedList0 = new LinkedList<Integer>();
+      queryNetworkNotification0.vlans = (List<Integer>) linkedList0;
+      Integer integer0 = new Integer((-1490));
+      linkedList0.add(integer0);
+      List<Integer> list0 = queryNetworkNotification0.getVlans();
+      assertEquals(1, list0.size());
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      QueryNetworkNotification.SubnetIdMap queryNetworkNotification_SubnetIdMap0 = new QueryNetworkNotification.SubnetIdMap();
+      queryNetworkNotification0.setSubnetIdMap(queryNetworkNotification_SubnetIdMap0);
+      QueryNetworkNotification.SubnetIdMap queryNetworkNotification_SubnetIdMap1 = queryNetworkNotification0.getSubnetIdMap();
+      assertSame(queryNetworkNotification_SubnetIdMap1, queryNetworkNotification_SubnetIdMap0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      NetworkStatus networkStatus0 = NetworkStatus.ERROR;
+      queryNetworkNotification0.setStatus(networkStatus0);
+      NetworkStatus networkStatus1 = queryNetworkNotification0.getStatus();
+      assertEquals(NetworkStatus.ERROR, networkStatus1);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      queryNetworkNotification0.setNeutronNetworkId("\"9\"@lJ*tfb");
+      String string0 = queryNetworkNotification0.getNeutronNetworkId();
+      assertEquals("\"9\"@lJ*tfb", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      queryNetworkNotification0.setNetworkId("uuPPD.~Xq(<)vCwo`");
+      String string0 = queryNetworkNotification0.getNetworkId();
+      assertEquals("uuPPD.~Xq(<)vCwo`", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      queryNetworkNotification0.messageId = "[P/";
+      String string0 = queryNetworkNotification0.getMessageId();
+      assertEquals("[P/", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      queryNetworkNotification0.messageId = "";
+      String string0 = queryNetworkNotification0.getMessageId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      queryNetworkNotification0.setErrorMessage("Q39tT8q6(`");
+      String string0 = queryNetworkNotification0.getErrorMessage();
+      assertEquals("Q39tT8q6(`", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      queryNetworkNotification0.setErrorMessage("");
+      String string0 = queryNetworkNotification0.getErrorMessage();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      List<Integer> list0 = queryNetworkNotification0.getVlans();
+      assertEquals(0, list0.size());
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      QueryNetworkNotification.SubnetIdMap queryNetworkNotification_SubnetIdMap0 = new QueryNetworkNotification.SubnetIdMap();
+      queryNetworkNotification_SubnetIdMap0.getEntry();
+      List<QueryNetworkNotification.SubnetIdMap.Entry> list0 = queryNetworkNotification_SubnetIdMap0.getEntry();
+      assertEquals(0, list0.size());
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      QueryNetworkNotification.SubnetIdMap.Entry queryNetworkNotification_SubnetIdMap_Entry0 = new QueryNetworkNotification.SubnetIdMap.Entry();
+      String string0 = queryNetworkNotification_SubnetIdMap_Entry0.getKey();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      QueryNetworkNotification.SubnetIdMap.Entry queryNetworkNotification_SubnetIdMap_Entry0 = new QueryNetworkNotification.SubnetIdMap.Entry();
+      queryNetworkNotification_SubnetIdMap_Entry0.setKey("");
+      assertEquals("", queryNetworkNotification_SubnetIdMap_Entry0.getKey());
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      QueryNetworkNotification.SubnetIdMap.Entry queryNetworkNotification_SubnetIdMap_Entry0 = new QueryNetworkNotification.SubnetIdMap.Entry();
+      String string0 = queryNetworkNotification_SubnetIdMap_Entry0.getValue();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      QueryNetworkNotification.SubnetIdMap.Entry queryNetworkNotification_SubnetIdMap_Entry0 = new QueryNetworkNotification.SubnetIdMap.Entry();
+      queryNetworkNotification_SubnetIdMap_Entry0.setValue("");
+      assertNull(queryNetworkNotification_SubnetIdMap_Entry0.getKey());
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      queryNetworkNotification0.setCompleted(true);
+      boolean boolean0 = queryNetworkNotification0.isCompleted();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      QueryNetworkNotification.SubnetIdMap queryNetworkNotification_SubnetIdMap0 = queryNetworkNotification0.getSubnetIdMap();
+      assertNull(queryNetworkNotification_SubnetIdMap0);
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      String string0 = queryNetworkNotification0.getNeutronNetworkId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      queryNetworkNotification0.setMessageId("q;G$a9I6oMF_p-Zy4");
+      assertNull(queryNetworkNotification0.getNetworkId());
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      String string0 = queryNetworkNotification0.getMessageId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      String string0 = queryNetworkNotification0.getErrorMessage();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.OPENSTACK;
+      queryNetworkNotification0.setException(msoExceptionCategory0);
+      MsoExceptionCategory msoExceptionCategory1 = queryNetworkNotification0.getException();
+      assertSame(msoExceptionCategory1, msoExceptionCategory0);
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      queryNetworkNotification0.getException();
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      Boolean boolean0 = Boolean.TRUE;
+      queryNetworkNotification0.setNetworkExists(boolean0);
+      assertFalse(queryNetworkNotification0.isCompleted());
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      String string0 = queryNetworkNotification0.getNetworkId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test27()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      queryNetworkNotification0.getStatus();
+  }
+
+  @Test(timeout = 4000)
+  public void test28()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      boolean boolean0 = queryNetworkNotification0.isCompleted();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test29()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      Boolean boolean0 = queryNetworkNotification0.isNetworkExists();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test30()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      queryNetworkNotification0.setNetworkId("");
+      String string0 = queryNetworkNotification0.getNetworkId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test31()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      queryNetworkNotification0.setNeutronNetworkId("");
+      String string0 = queryNetworkNotification0.getNeutronNetworkId();
+      assertEquals("", string0);
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/QueryNetworkNotificationESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/QueryNetworkNotificationESTestscaffolding.java
new file mode 100644
index 0000000..9442379
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/QueryNetworkNotificationESTestscaffolding.java
@@ -0,0 +1,82 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:33:21 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+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 QueryNetworkNotificationESTestscaffolding {
+
+  @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.network.async.client.QueryNetworkNotification"; 
+    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(QueryNetworkNotificationESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory",
+      "org.openecomp.mso.adapters.network.async.client.QueryNetworkNotification",
+      "org.openecomp.mso.adapters.network.async.client.NetworkStatus",
+      "org.openecomp.mso.adapters.network.async.client.QueryNetworkNotification$SubnetIdMap$Entry",
+      "org.openecomp.mso.adapters.network.async.client.QueryNetworkNotification$SubnetIdMap"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/QueryNetworkNotificationResponseESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/QueryNetworkNotificationResponseESTest.java
new file mode 100644
index 0000000..5ffce39
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/QueryNetworkNotificationResponseESTest.java
@@ -0,0 +1,20 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:36:18 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class QueryNetworkNotificationResponseESTest extends QueryNetworkNotificationResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      QueryNetworkNotificationResponse queryNetworkNotificationResponse0 = new QueryNetworkNotificationResponse();
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/QueryNetworkNotificationResponseESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/QueryNetworkNotificationResponseESTestscaffolding.java
new file mode 100644
index 0000000..cee3409
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/QueryNetworkNotificationResponseESTestscaffolding.java
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:36:18 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+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 QueryNetworkNotificationResponseESTestscaffolding {
+
+  @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.network.async.client.QueryNetworkNotificationResponse"; 
+    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(QueryNetworkNotificationResponseESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.QueryNetworkNotificationResponse"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/RollbackNetworkNotificationESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/RollbackNetworkNotificationESTest.java
new file mode 100644
index 0000000..2e1ec50
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/RollbackNetworkNotificationESTest.java
@@ -0,0 +1,116 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:37:41 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class RollbackNetworkNotificationESTest extends RollbackNetworkNotificationESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      RollbackNetworkNotification rollbackNetworkNotification0 = new RollbackNetworkNotification();
+      rollbackNetworkNotification0.completed = true;
+      boolean boolean0 = rollbackNetworkNotification0.isCompleted();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      RollbackNetworkNotification rollbackNetworkNotification0 = new RollbackNetworkNotification();
+      rollbackNetworkNotification0.messageId = "";
+      rollbackNetworkNotification0.messageId = "V^{b/%gy^";
+      String string0 = rollbackNetworkNotification0.getMessageId();
+      assertEquals("V^{b/%gy^", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      RollbackNetworkNotification rollbackNetworkNotification0 = new RollbackNetworkNotification();
+      rollbackNetworkNotification0.messageId = "";
+      String string0 = rollbackNetworkNotification0.getMessageId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      RollbackNetworkNotification rollbackNetworkNotification0 = new RollbackNetworkNotification();
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.IO;
+      rollbackNetworkNotification0.exception = msoExceptionCategory0;
+      MsoExceptionCategory msoExceptionCategory1 = rollbackNetworkNotification0.getException();
+      assertEquals(MsoExceptionCategory.IO, msoExceptionCategory1);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      RollbackNetworkNotification rollbackNetworkNotification0 = new RollbackNetworkNotification();
+      rollbackNetworkNotification0.setErrorMessage("06SZ x\"@[d5*iJ");
+      String string0 = rollbackNetworkNotification0.getErrorMessage();
+      assertEquals("06SZ x\"@[d5*iJ", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      RollbackNetworkNotification rollbackNetworkNotification0 = new RollbackNetworkNotification();
+      rollbackNetworkNotification0.errorMessage = "";
+      String string0 = rollbackNetworkNotification0.getErrorMessage();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      RollbackNetworkNotification rollbackNetworkNotification0 = new RollbackNetworkNotification();
+      rollbackNetworkNotification0.setCompleted(false);
+      assertFalse(rollbackNetworkNotification0.isCompleted());
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      RollbackNetworkNotification rollbackNetworkNotification0 = new RollbackNetworkNotification();
+      boolean boolean0 = rollbackNetworkNotification0.isCompleted();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      RollbackNetworkNotification rollbackNetworkNotification0 = new RollbackNetworkNotification();
+      String string0 = rollbackNetworkNotification0.getErrorMessage();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      RollbackNetworkNotification rollbackNetworkNotification0 = new RollbackNetworkNotification();
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.IO;
+      rollbackNetworkNotification0.setException(msoExceptionCategory0);
+      assertFalse(rollbackNetworkNotification0.isCompleted());
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      RollbackNetworkNotification rollbackNetworkNotification0 = new RollbackNetworkNotification();
+      String string0 = rollbackNetworkNotification0.getMessageId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      RollbackNetworkNotification rollbackNetworkNotification0 = new RollbackNetworkNotification();
+      rollbackNetworkNotification0.getException();
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      RollbackNetworkNotification rollbackNetworkNotification0 = new RollbackNetworkNotification();
+      rollbackNetworkNotification0.setMessageId("!!IDL8");
+      assertNull(rollbackNetworkNotification0.getErrorMessage());
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/RollbackNetworkNotificationESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/RollbackNetworkNotificationESTestscaffolding.java
new file mode 100644
index 0000000..fc15f61
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/RollbackNetworkNotificationESTestscaffolding.java
@@ -0,0 +1,79 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:37:41 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+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 RollbackNetworkNotificationESTestscaffolding {
+
+  @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.network.async.client.RollbackNetworkNotification"; 
+    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(RollbackNetworkNotificationESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory",
+      "org.openecomp.mso.adapters.network.async.client.RollbackNetworkNotification"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/RollbackNetworkNotificationResponseESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/RollbackNetworkNotificationResponseESTest.java
new file mode 100644
index 0000000..1858a8e
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/RollbackNetworkNotificationResponseESTest.java
@@ -0,0 +1,20 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:37:09 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class RollbackNetworkNotificationResponseESTest extends RollbackNetworkNotificationResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      RollbackNetworkNotificationResponse rollbackNetworkNotificationResponse0 = new RollbackNetworkNotificationResponse();
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/RollbackNetworkNotificationResponseESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/RollbackNetworkNotificationResponseESTestscaffolding.java
new file mode 100644
index 0000000..15f739f
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/RollbackNetworkNotificationResponseESTestscaffolding.java
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:37:09 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+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 RollbackNetworkNotificationResponseESTestscaffolding {
+
+  @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.network.async.client.RollbackNetworkNotificationResponse"; 
+    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(RollbackNetworkNotificationResponseESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.RollbackNetworkNotificationResponse"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/UpdateNetworkNotificationESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/UpdateNetworkNotificationESTest.java
new file mode 100644
index 0000000..eff07d3
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/UpdateNetworkNotificationESTest.java
@@ -0,0 +1,202 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:35:17 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import java.util.List;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class UpdateNetworkNotificationESTest extends UpdateNetworkNotificationESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      updateNetworkNotification0.setCompleted(true);
+      boolean boolean0 = updateNetworkNotification0.isCompleted();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      UpdateNetworkNotification.SubnetIdMap updateNetworkNotification_SubnetIdMap0 = new UpdateNetworkNotification.SubnetIdMap();
+      updateNetworkNotification0.subnetIdMap = updateNetworkNotification_SubnetIdMap0;
+      UpdateNetworkNotification.SubnetIdMap updateNetworkNotification_SubnetIdMap1 = updateNetworkNotification0.getSubnetIdMap();
+      assertSame(updateNetworkNotification_SubnetIdMap1, updateNetworkNotification_SubnetIdMap0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.networkCreated = true;
+      updateNetworkNotification0.rollback = networkRollback0;
+      NetworkRollback networkRollback1 = updateNetworkNotification0.getRollback();
+      assertNull(networkRollback1.getCloudId());
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      updateNetworkNotification0.rollback = networkRollback0;
+      NetworkRollback networkRollback1 = updateNetworkNotification0.getRollback();
+      assertSame(networkRollback1, networkRollback0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      updateNetworkNotification0.messageId = "Uc.S9x&9M[n";
+      String string0 = updateNetworkNotification0.getMessageId();
+      assertEquals("Uc.S9x&9M[n", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      updateNetworkNotification0.messageId = "";
+      String string0 = updateNetworkNotification0.getMessageId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.IO;
+      updateNetworkNotification0.exception = msoExceptionCategory0;
+      MsoExceptionCategory msoExceptionCategory1 = updateNetworkNotification0.getException();
+      assertEquals(MsoExceptionCategory.IO, msoExceptionCategory1);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      updateNetworkNotification0.setErrorMessage("org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory");
+      String string0 = updateNetworkNotification0.getErrorMessage();
+      assertEquals("org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      updateNetworkNotification0.errorMessage = "";
+      String string0 = updateNetworkNotification0.getErrorMessage();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      UpdateNetworkNotification.SubnetIdMap updateNetworkNotification_SubnetIdMap0 = new UpdateNetworkNotification.SubnetIdMap();
+      updateNetworkNotification_SubnetIdMap0.getEntry();
+      List<UpdateNetworkNotification.SubnetIdMap.Entry> list0 = updateNetworkNotification_SubnetIdMap0.getEntry();
+      assertTrue(list0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      UpdateNetworkNotification.SubnetIdMap.Entry updateNetworkNotification_SubnetIdMap_Entry0 = new UpdateNetworkNotification.SubnetIdMap.Entry();
+      updateNetworkNotification_SubnetIdMap_Entry0.setValue("");
+      assertEquals("", updateNetworkNotification_SubnetIdMap_Entry0.getValue());
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      UpdateNetworkNotification.SubnetIdMap.Entry updateNetworkNotification_SubnetIdMap_Entry0 = new UpdateNetworkNotification.SubnetIdMap.Entry();
+      String string0 = updateNetworkNotification_SubnetIdMap_Entry0.getValue();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      UpdateNetworkNotification.SubnetIdMap.Entry updateNetworkNotification_SubnetIdMap_Entry0 = new UpdateNetworkNotification.SubnetIdMap.Entry();
+      String string0 = updateNetworkNotification_SubnetIdMap_Entry0.getKey();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      UpdateNetworkNotification.SubnetIdMap.Entry updateNetworkNotification_SubnetIdMap_Entry0 = new UpdateNetworkNotification.SubnetIdMap.Entry();
+      updateNetworkNotification_SubnetIdMap_Entry0.setKey("F");
+      assertEquals("F", updateNetworkNotification_SubnetIdMap_Entry0.getKey());
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      UpdateNetworkNotification.SubnetIdMap updateNetworkNotification_SubnetIdMap0 = new UpdateNetworkNotification.SubnetIdMap();
+      updateNetworkNotification0.setSubnetIdMap(updateNetworkNotification_SubnetIdMap0);
+      assertFalse(updateNetworkNotification0.isCompleted());
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      updateNetworkNotification0.getException();
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      updateNetworkNotification0.setMessageId("");
+      assertEquals("", updateNetworkNotification0.getMessageId());
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      updateNetworkNotification0.setRollback((NetworkRollback) null);
+      assertFalse(updateNetworkNotification0.isCompleted());
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      String string0 = updateNetworkNotification0.getErrorMessage();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      boolean boolean0 = updateNetworkNotification0.isCompleted();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      NetworkRollback networkRollback0 = updateNetworkNotification0.getRollback();
+      assertNull(networkRollback0);
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      String string0 = updateNetworkNotification0.getMessageId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      UpdateNetworkNotification.SubnetIdMap updateNetworkNotification_SubnetIdMap0 = updateNetworkNotification0.getSubnetIdMap();
+      assertNull(updateNetworkNotification_SubnetIdMap0);
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.OPENSTACK;
+      updateNetworkNotification0.setException(msoExceptionCategory0);
+      assertNull(updateNetworkNotification0.getMessageId());
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/UpdateNetworkNotificationESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/UpdateNetworkNotificationESTestscaffolding.java
new file mode 100644
index 0000000..8c4e0ed
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/UpdateNetworkNotificationESTestscaffolding.java
@@ -0,0 +1,83 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:35:17 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+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 UpdateNetworkNotificationESTestscaffolding {
+
+  @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.network.async.client.UpdateNetworkNotification"; 
+    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(UpdateNetworkNotificationESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.MsoRequest",
+      "org.openecomp.mso.adapters.network.async.client.UpdateNetworkNotification",
+      "org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory",
+      "org.openecomp.mso.adapters.network.async.client.NetworkRollback",
+      "org.openecomp.mso.adapters.network.async.client.UpdateNetworkNotification$SubnetIdMap$Entry",
+      "org.openecomp.mso.adapters.network.async.client.UpdateNetworkNotification$SubnetIdMap"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/UpdateNetworkNotificationResponseESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/UpdateNetworkNotificationResponseESTest.java
new file mode 100644
index 0000000..a493ce1
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/UpdateNetworkNotificationResponseESTest.java
@@ -0,0 +1,20 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:38:03 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class UpdateNetworkNotificationResponseESTest extends UpdateNetworkNotificationResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      UpdateNetworkNotificationResponse updateNetworkNotificationResponse0 = new UpdateNetworkNotificationResponse();
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/UpdateNetworkNotificationResponseESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/UpdateNetworkNotificationResponseESTestscaffolding.java
new file mode 100644
index 0000000..f897b27
--- /dev/null
+++ b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/UpdateNetworkNotificationResponseESTestscaffolding.java
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:38:03 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+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 UpdateNetworkNotificationResponseESTestscaffolding {
+
+  @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.network.async.client.UpdateNetworkNotificationResponse"; 
+    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(UpdateNetworkNotificationResponseESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.UpdateNetworkNotificationResponse"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
