diff --git a/appc-outbound/appc-aai-client/provider/pom.xml b/appc-outbound/appc-aai-client/provider/pom.xml
index 27d2d13..4d6e047 100755
--- a/appc-outbound/appc-aai-client/provider/pom.xml
+++ b/appc-outbound/appc-aai-client/provider/pom.xml
@@ -1,163 +1,159 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ============LICENSE_START=======================================================
-  ONAP : APPC
-  ================================================================================
-  Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
-  Copyright (C) 2017 Amdocs
-  ================================================================================
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-  
-       http://www.apache.org/licenses/LICENSE-2.0
-  
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-  ============LICENSE_END=========================================================
-  -->
-<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.onap.appc.parent</groupId>
-		<artifactId>binding-parent</artifactId>
-		<version>1.5.0-SNAPSHOT</version>
-                <relativePath />
-	</parent>
-        <groupId>org.onap.appc</groupId>
-	<artifactId>appc-aai-client-provider</artifactId>
-	<packaging>bundle</packaging>
-	<name>APPC AAI Client - Provider</name>
-
-	<properties>
-		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-	</properties>
-	<dependencies>
-		<dependency>
-			<groupId>equinoxSDK381</groupId>
-			<artifactId>org.eclipse.osgi</artifactId>
-			<version>${equinox.osgi.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.onap.ccsdk.sli.core</groupId>
-			<artifactId>sli-provider</artifactId>
-			<scope>compile</scope>
-		</dependency>
-
-		<dependency>
-			<groupId>org.onap.ccsdk.sli.adaptors</groupId>
-			<artifactId>aai-service-provider</artifactId>
-			<scope>compile</scope>
-		</dependency>
-
-
-		<dependency>
-			<groupId>commons-io</groupId>
-			<artifactId>commons-io</artifactId>
-			<version>2.5</version>
-		</dependency>
-                <dependency>
-			<groupId>org.apache.commons</groupId>
-			<artifactId>commons-lang3</artifactId>
-		</dependency>
-                <dependency>
-                        <groupId>ch.qos.logback</groupId>
-                        <artifactId>logback-classic</artifactId>
-	                <version>${logback.version}</version>
-                </dependency>
-		<dependency>
-			<groupId>com.att.eelf</groupId>
-			<artifactId>eelf-core</artifactId>
-                        <exclusions>
-                            <exclusion>
-                                 <groupId>ch.qos.logback</groupId>
-                                 <artifactId>logback-classic</artifactId>
-                            </exclusion>
-                        </exclusions>
-		</dependency>
-
-		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-			<scope>test</scope>
-		</dependency>
-
-
-
-	</dependencies>
-	<build>
-		<plugins>
-			<plugin>
-				<artifactId>maven-resources-plugin</artifactId>
-				<version>2.6</version>
-				<executions>
-					<execution>
-						<id>copy-xsl</id>
-						<goals>
-							<goal>copy-resources</goal>
-						</goals>
-						<phase>validate</phase>
-						<configuration>
-							<outputDirectory>${basedir}/target/templates/xslt/sbg</outputDirectory>
-							<resources>
-								<resource>
-									<directory>src/main/resources/xsl</directory>
-									<includes>
-										<include>*</include>
-									</includes>
-									<filtering>true</filtering>
-								</resource>
-							</resources>
-						</configuration>
-					</execution>
-					<execution>
-						<id>copy-properties</id>
-						<goals>
-							<goal>copy-resources</goal>
-						</goals>
-						<phase>validate</phase>
-						<configuration>
-							<outputDirectory>${basedir}/target/properties/</outputDirectory>
-							<resources>
-								<resource>
-									<directory>src/main/resources</directory>
-									<includes>
-										<include>*.properties</include>
-									</includes>
-									<filtering>true</filtering>
-								</resource>
-							</resources>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.felix</groupId>
-				<artifactId>maven-bundle-plugin</artifactId>
-				<version>${bundle.plugin.version}</version>
-				<extensions>true</extensions>
-				<configuration>
-					<instructions>
-						<Bundle-SymbolicName>org.onap.appc.aai.client</Bundle-SymbolicName>
-						<Bundle-Activator>org.onap.appc.aai.client.AppcAaiClientActivator</Bundle-Activator>
-						<Export-Package>org.onap.appc.aai.client,org.onap.appc.aai.client.*</Export-Package>
-						<Import-Package>groovy.lang;resolution:=optional,
-						    org.codehaus.groovy.*;resolution:=optional,*</Import-Package>
-						<DynamicImport-Package>*</DynamicImport-Package>
-						<Embed-Dependency>eelf-core,logback-core,logback-classic</Embed-Dependency>
-					</instructions>
-					<manifestLocation>${project.basedir}/src/main/resources/META-INF</manifestLocation>
-				</configuration>
-			</plugin>
-		</plugins>
-		<pluginManagement>
-			<plugins>
-			</plugins>
-		</pluginManagement>
-	</build>
-	<version>1.5.0-SNAPSHOT</version>
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ============LICENSE_START=======================================================
+  ONAP : APPC
+  ================================================================================
+  Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+  Copyright (C) 2017 Amdocs
+  Modifications Copyright (C) 2019 Ericsson
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ============LICENSE_END=========================================================
+  -->
+<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.onap.appc.parent</groupId>
+		<artifactId>binding-parent</artifactId>
+		<version>1.5.0-SNAPSHOT</version>
+                <relativePath />
+	</parent>
+        <groupId>org.onap.appc</groupId>
+	<artifactId>appc-aai-client-provider</artifactId>
+	<packaging>bundle</packaging>
+	<name>APPC AAI Client - Provider</name>
+
+	<properties>
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+	</properties>
+	<dependencies>
+		<dependency>
+			<groupId>org.onap.ccsdk.sli.core</groupId>
+			<artifactId>sli-provider</artifactId>
+			<scope>compile</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.onap.ccsdk.sli.adaptors</groupId>
+			<artifactId>aai-service-provider</artifactId>
+			<scope>compile</scope>
+		</dependency>
+
+
+		<dependency>
+			<groupId>commons-io</groupId>
+			<artifactId>commons-io</artifactId>
+			<version>2.5</version>
+		</dependency>
+                <dependency>
+			<groupId>org.apache.commons</groupId>
+			<artifactId>commons-lang3</artifactId>
+		</dependency>
+                <dependency>
+                        <groupId>ch.qos.logback</groupId>
+                        <artifactId>logback-classic</artifactId>
+	                <version>${logback.version}</version>
+                </dependency>
+		<dependency>
+			<groupId>com.att.eelf</groupId>
+			<artifactId>eelf-core</artifactId>
+                        <exclusions>
+                            <exclusion>
+                                 <groupId>ch.qos.logback</groupId>
+                                 <artifactId>logback-classic</artifactId>
+                            </exclusion>
+                        </exclusions>
+		</dependency>
+
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<scope>test</scope>
+		</dependency>
+
+
+
+	</dependencies>
+	<build>
+		<plugins>
+			<plugin>
+				<artifactId>maven-resources-plugin</artifactId>
+				<version>2.6</version>
+				<executions>
+					<execution>
+						<id>copy-xsl</id>
+						<goals>
+							<goal>copy-resources</goal>
+						</goals>
+						<phase>validate</phase>
+						<configuration>
+							<outputDirectory>${basedir}/target/templates/xslt/sbg</outputDirectory>
+							<resources>
+								<resource>
+									<directory>src/main/resources/xsl</directory>
+									<includes>
+										<include>*</include>
+									</includes>
+									<filtering>true</filtering>
+								</resource>
+							</resources>
+						</configuration>
+					</execution>
+					<execution>
+						<id>copy-properties</id>
+						<goals>
+							<goal>copy-resources</goal>
+						</goals>
+						<phase>validate</phase>
+						<configuration>
+							<outputDirectory>${basedir}/target/properties/</outputDirectory>
+							<resources>
+								<resource>
+									<directory>src/main/resources</directory>
+									<includes>
+										<include>*.properties</include>
+									</includes>
+									<filtering>true</filtering>
+								</resource>
+							</resources>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<version>${bundle.plugin.version}</version>
+				<extensions>true</extensions>
+				<configuration>
+					<instructions>
+						<Bundle-SymbolicName>org.onap.appc.aai.client</Bundle-SymbolicName>
+						<Bundle-Activator>org.onap.appc.aai.client.AppcAaiClientActivator</Bundle-Activator>
+						<Export-Package>org.onap.appc.aai.client,org.onap.appc.aai.client.*</Export-Package>
+						<Import-Package>groovy.lang;resolution:=optional,
+						    org.codehaus.groovy.*;resolution:=optional,*</Import-Package>
+						<DynamicImport-Package>*</DynamicImport-Package>
+						<Embed-Dependency>eelf-core,logback-core,logback-classic</Embed-Dependency>
+					</instructions>
+					<manifestLocation>${project.basedir}/src/main/resources/META-INF</manifestLocation>
+				</configuration>
+			</plugin>
+		</plugins>
+		<pluginManagement>
+			<plugins>
+			</plugins>
+		</pluginManagement>
+	</build>
+	<version>1.5.0-SNAPSHOT</version>
+</project>
diff --git a/appc-outbound/appc-aai-client/provider/src/main/java/org/onap/appc/aai/client/aai/AaiService.java b/appc-outbound/appc-aai-client/provider/src/main/java/org/onap/appc/aai/client/aai/AaiService.java
index 76336c1..a25013f 100644
--- a/appc-outbound/appc-aai-client/provider/src/main/java/org/onap/appc/aai/client/aai/AaiService.java
+++ b/appc-outbound/appc-aai-client/provider/src/main/java/org/onap/appc/aai/client/aai/AaiService.java
@@ -5,6 +5,8 @@
  * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Copyright (C) 2017 Amdocs
+ * ================================================================================
+ * Modifications (C) 2019 Ericsson
  * =============================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -263,7 +265,6 @@
 
             log.info(QUERY_STR_VNFC_NAME + ctx.getAttribute(aaiRefKey + ATTR_VNFC_NAME));
             String vnfcNameAAI = ctx.getAttribute(aaiRefKey + ATTR_VNFC_NAME);
-
             // Get Vnfc_reference data from the table
             String vnfcRefKey = STR_VNFC_REF + vnfcRefIndx + "].";
 
diff --git a/appc-outbound/appc-aai-client/provider/src/main/java/org/onap/appc/aai/client/node/AAIResourceNode.java b/appc-outbound/appc-aai-client/provider/src/main/java/org/onap/appc/aai/client/node/AAIResourceNode.java
index e32cc94..27bf84a 100644
--- a/appc-outbound/appc-aai-client/provider/src/main/java/org/onap/appc/aai/client/node/AAIResourceNode.java
+++ b/appc-outbound/appc-aai-client/provider/src/main/java/org/onap/appc/aai/client/node/AAIResourceNode.java
@@ -7,6 +7,8 @@
  * Copyright (C) 2017 Amdocs
  * =============================================================================
  * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
+ * Modifications Copyright (C) 2019 Ericsson
  * =============================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -79,8 +81,8 @@
             AaiService aai = getAaiService();
             aai.getGenericVnfInfo(inParams, ctx);
 
-            String cloudOwnerValue=ctx.getAttribute(responsePrefix + "vm[0].cloud-owner");
-            String cloudRegionValue=ctx.getAttribute(responsePrefix + "vm[0].cloud-region-id");
+            String cloudOwnerValue = ctx.getAttribute(responsePrefix + "vm[0].cloud-owner");
+            String cloudRegionValue = ctx.getAttribute(responsePrefix + "vm[0].cloud-region-id");
 
             log.debug("Cloud Owner" + cloudOwnerValue);
             log.debug("CloudRegionId" + cloudOwnerValue);
@@ -88,7 +90,7 @@
             paramsCloud.put(AppcAaiClientConstant.INPUT_PARAM_RESPONSE_PREFIX,
                     inParams.get(AppcAaiClientConstant.INPUT_PARAM_RESPONSE_PREFIX));
 
-            if(StringUtils.isNotBlank(cloudOwnerValue)&&StringUtils.isNotBlank(cloudRegionValue)) {
+            if(StringUtils.isNotBlank(cloudOwnerValue) && StringUtils.isNotBlank(cloudRegionValue)) {
 
                 paramsCloud.put(PARAM_CLOUD_OWNER, cloudOwnerValue);
                 paramsCloud.put(PARAM_CLOUD_REGION_ID, cloudRegionValue);
@@ -127,7 +129,7 @@
             int vmCountForVfModule = 0;
             String vmCountStr = ctx.getAttribute(responsePrefix + "vm-count");
             String vfModuleFromRequest =  ctx.getAttribute("req-vf-module-id");
-            log.info("getAllVServersVnfcsInfo()::: vfMOdule="+vfModuleFromRequest);
+            log.info("getAllVServersVnfcsInfo()::: vfMOdule=" + vfModuleFromRequest);
 
             if (vmCountStr == null) {
                 throw new ResourceNodeInternalException("Unable to get VServers for the VNF");
@@ -196,7 +198,7 @@
                 } else {
                     vmWithNoVnfcsCount++;
                     //ConfigScaleOut
-                    log.info("getAllVServersVnfcsInfo()::Vf Modules: "+vfModuleForVserver+", "+vfModuleFromRequest);
+                    log.info("getAllVServersVnfcsInfo()::Vf Modules: " + vfModuleForVserver+", " + vfModuleFromRequest);
                     if (StringUtils.isNotBlank(vfModuleFromRequest) && StringUtils.isNotBlank(vfModuleForVserver) && StringUtils.equalsIgnoreCase(vfModuleForVserver,vfModuleFromRequest)) {
                         vmsWithNoVnfcsForVfModule++;
                     }
@@ -342,19 +344,19 @@
         int vmsWithoutVnfcsForVfModule = 0;
         String vmsWithoutVnfcsForVfModuleStr = ctx.getAttribute(responsePrefix + "vnf.vm-with-no-vnfcs-count-vf-module");
         if (StringUtils.isBlank(vmsWithoutVnfcsForVfModuleStr) && StringUtils.isNotBlank(vfModuleIdFromRequest)) {
-            log.info("addVnfcs()::No vmsWithoutVnfcsForVfModule (is null) for vfmodule="+vfModuleIdFromRequest);
+            log.info("addVnfcs()::No vmsWithoutVnfcsForVfModule (is null) for vfmodule=" + vfModuleIdFromRequest);
         }
         else {
             vmsWithoutVnfcsForVfModule = Integer.parseInt(vmsWithoutVnfcsForVfModuleStr);
         }
-        log.info("addVnfcs():::Number of VMs without vnfcs for vfmodule: "+vmsWithoutVnfcsForVfModule);
-        String vmsForVfModuleStr = ctx.getAttribute(responsePrefix +"vnf.vm-count-for-vf-module");
+        log.info("addVnfcs():::Number of VMs without vnfcs for vfmodule: " + vmsWithoutVnfcsForVfModule);
+        String vmsForVfModuleStr = ctx.getAttribute(responsePrefix + "vnf.vm-count-for-vf-module");
         int vmsForVfModule = 0;
         if (StringUtils.isNotBlank(vmsForVfModuleStr)) {
             vmsForVfModule = Integer.parseInt(vmsForVfModuleStr);
         }
         if ((vmsForVfModule != vnfcRefLen ) &&  StringUtils.isNotBlank(vfModuleIdFromRequest)) {
-            throw new ResourceNodeInternalException("Vnfc and VM count mismatch for vfModule in request="+vfModuleIdFromRequest);
+            throw new ResourceNodeInternalException("Vnfc and VM count mismatch for vfModule in request=" + vfModuleIdFromRequest);
         }
         log.info("processCheckForVfModule()::vmsForVfModule " + vmsForVfModule);
 
@@ -516,7 +518,7 @@
         try {
             responsePrefix = StringUtils.isNotBlank(responsePrefix) ? (responsePrefix + ".") : "";
             AaiService aaiService = getAaiService();
-            processForVfModuleModelInfo(aaiService,inParams,ctx);
+            processForVfModuleModelInfo(aaiService, inParams, ctx);
         } catch (Exception e) {
             ctx.setAttribute(responsePrefix + AppcAaiClientConstant.OUTPUT_PARAM_STATUS,
                 AppcAaiClientConstant.OUTPUT_STATUS_FAILURE);
@@ -554,10 +556,10 @@
                 log.info("processForVfModuleModelInfo()::model-invariant-id or model-version-id is blank, not getting model info !!!!");
                 return;
             }
-            aaiService.getModelVersionInfo(modelParams,modelCtx);
-            String modelName = modelCtx.getAttribute(responsePrefix+"vfModule.model-name");
-            log.info("processForVfModuleModelInfo()::modelName for vfModule:::"+modelName);
-            log.info("Setting context template-model-id as :::"+modelName);
+            aaiService.getModelVersionInfo(modelParams, modelCtx);
+            String modelName = modelCtx.getAttribute(responsePrefix + "vfModule.model-name");
+            log.info("processForVfModuleModelInfo()::modelName for vfModule:::" + modelName);
+            log.info("Setting context template-model-id as :::" + modelName);
             ctx.setAttribute("template-model-id", modelName);
             log.info("processForVfModuleModelInfo() ::: End");
             }
@@ -580,7 +582,7 @@
                 return;
             }
             String outputValue = StringUtils.replace(inputValue, "/", "_");//change / to _
-            outputValue = StringUtils.replace(outputValue," ","");//remove space
+            outputValue = StringUtils.replace(outputValue, " ", "");//remove space
             ctx.setAttribute("template-model-id", outputValue);
         } catch (Exception e) {
             ctx.setAttribute(responsePrefix + AppcAaiClientConstant.OUTPUT_PARAM_STATUS,
diff --git a/appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/aai/TestAaiService.java b/appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/aai/TestAaiService.java
index 671c355..9087a7f 100644
--- a/appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/aai/TestAaiService.java
+++ b/appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/aai/TestAaiService.java
@@ -7,6 +7,8 @@
  * Copyright (C) 2017 Amdocs
  * =============================================================================
  * Modification Copyright (C) 2018 IBM.
+ * ================================================================================
+ * Modifications Copyright (C) 2019 Ericsson
  * =============================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -29,20 +31,134 @@
 
 import java.util.HashMap;
 import java.util.Map;
-
-import org.apache.commons.lang3.StringUtils;
+import org.junit.Before;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.junit.runner.RunWith;
+import org.mockito.Matchers;
+import org.mockito.Mockito;
 import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
+import org.onap.ccsdk.sli.core.sli.SvcLogicException;
+import org.onap.ccsdk.sli.core.sli.SvcLogicResource.QueryStatus;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.ServiceReference;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
 import org.onap.ccsdk.sli.adaptors.aai.AAIClient;
 
 import com.att.eelf.configuration.EELFLogger;
 import com.att.eelf.configuration.EELFManager;
 
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({FrameworkUtil.class})
 public class TestAaiService {
     // ONAP merging
 
     private static final EELFLogger log = EELFManager.getInstance().getLogger(TestAaiService.class);
-    private AAIClient aaiClient;
+    private AAIClient aaiClient = Mockito.mock(AAIClient.class);
+    private final BundleContext bundleContext= Mockito.mock(BundleContext.class);
+    private final Bundle bundleService=Mockito.mock(Bundle.class);
+    private final ServiceReference sref=Mockito.mock(ServiceReference.class);
+
+    @Rule
+    public ExpectedException expectedEx = ExpectedException.none();
+
+    @Before
+    public void setup() {
+        PowerMockito.mockStatic(FrameworkUtil.class);
+        PowerMockito.when(FrameworkUtil.getBundle(Matchers.any(Class.class))).thenReturn(bundleService);
+        PowerMockito.when(bundleService.getBundleContext()).thenReturn(bundleContext);
+        PowerMockito.when(bundleContext.getServiceReference(Matchers.any(Class.class))).thenReturn(sref);
+        PowerMockito.when(bundleContext.getService(sref)).thenReturn(aaiClient);
+    }
+
+    @Test
+    public void testMissingVnfId() throws AaiServiceInternalException, SvcLogicException {
+        AaiService aaiService = new AaiService();
+        expectedEx.expect(AaiServiceInternalException.class);
+        expectedEx.expectMessage("VnfId is missing");
+        aaiService.getGenericVnfInfo(new HashMap<String, String>(), new SvcLogicContext());
+    }
+
+    @Test
+    public void testGetVmInfoExceptionFlow() throws SvcLogicException, AaiServiceInternalException {
+        AaiService aaiService = Mockito.spy(new AaiService());
+        Map<String, String> inParams = new HashMap<String, String>();
+        inParams.put("vserverId", "vserverId1");
+        inParams.put("tenantId", "tenantId1");
+        inParams.put("cloudOwner", "cloudOwner1");
+        inParams.put("cloudRegionId", "cloudRegionId1");
+        inParams.put("responsePrefix", "tmp.vnfInfo");
+
+        SvcLogicContext ctx = new SvcLogicContext();
+        Mockito.doThrow(new SvcLogicException()).when(aaiService).readResource(Mockito.anyString(), Mockito.anyString(), Mockito.anyString());
+        expectedEx.expect(SvcLogicException.class);
+        expectedEx.expectMessage("Failed to fetch VM info");
+        aaiService.getVMInfo(inParams, ctx);
+    }
+
+    @Test
+    public void testGetVnfcInfoExceptionFlow() throws Exception {
+        AaiService aaiService = new AaiService();
+        Map<String, String> inParams = new HashMap<String, String>();
+        inParams.put("vnfcName", "");
+        inParams.put("responsePrefix", "tmp.vnfInfo");
+        SvcLogicContext ctx = new SvcLogicContext();
+        expectedEx.expect(AaiServiceInternalException.class);
+        expectedEx.expectMessage("Vnfc Name is missing");
+        aaiService.getVnfcInfo(inParams, ctx);
+    }
+
+    @Test
+    public void testInsertVnfcsExceptionFlow() throws Exception {
+        AaiService aaiService = new AaiService();
+        Map<String, String> inParams = new HashMap<String, String>();
+        inParams.put("responsePrefix", "tmp.vnfInfo");
+        SvcLogicContext ctx = new SvcLogicContext();
+        inParams.put("AppcAaiClientConstant.INPUT_PARAM_RESPONSE_PREFIX", "prefix.");
+        ctx.setAttribute("tmp.vnfInfo.vm[1].vnfc-name", "nullnull001");
+        aaiService.insertVnfcs(inParams, ctx, 2, 2, null);
+    }
+
+    @Test
+    public void testGetVnfcData() {
+        AaiService aaiService = new AaiService();
+        Map<String, String> inParams = new HashMap<String, String>();
+        inParams.put("responsePrefix", "tmp.vnfInfo");
+        SvcLogicContext ctx = new SvcLogicContext();
+        inParams.put("AppcAaiClientConstant.INPUT_PARAM_RESPONSE_PREFIX", "prefix.");
+        ctx.setAttribute("tmp.vnfInfo.vm[1].vnfc-name", "nullnull001");
+        aaiService.getVnfcData(inParams, ctx, 1, 1);
+    }
+
+    @Test
+    public void testReadResource() throws AaiServiceInternalException, SvcLogicException {
+        AaiService aaiService = Mockito.spy(new AaiService());
+        Map<String, String> inParams = new HashMap<String, String>();
+        inParams.put("responsePrefix", "tmp.vnfInfo");
+        inParams.put("AppcAaiClientConstant.INPUT_PARAM_RESPONSE_PREFIX", "prefix.");
+        Mockito.doReturn(QueryStatus.FAILURE).when(aaiClient).query(Mockito.anyString(), Mockito.anyBoolean(), Mockito.anyString(),
+                Mockito.anyString(), Mockito.anyString(), Mockito.anyString(), Mockito.any(SvcLogicContext.class));
+        expectedEx.expect(AaiServiceInternalException.class);
+        expectedEx.expectMessage("Error Retrieving null from A&AI");
+        aaiService.readResource(null, null, null);
+    }
+
+    @Test
+    public void testCheckAndUpdateVnfc() throws AaiServiceInternalException, SvcLogicException {
+        AaiService aaiService = Mockito.spy(new AaiService());
+        Map<String, String> inParams = new HashMap<String, String>();
+        inParams.put("responsePrefix", "tmp.vnfInfo");
+        SvcLogicContext ctx = new SvcLogicContext();
+        inParams.put("AppcAaiClientConstant.INPUT_PARAM_RESPONSE_PREFIX", "prefix.");
+        ctx.setAttribute("tmp.vnfInfo.vm[0].vnfc-name", "nullnull001");
+        aaiService.checkAndUpdateVnfc(inParams, ctx, 1, 1);
+        Mockito.verify(aaiService).updateVnfcStatus(Mockito.anyString(), Mockito.anyMap(), Mockito.anyString());
+    }
 
     @Test
     public void testGetGenericVnfInfo() throws Exception {
@@ -255,6 +371,7 @@
 
 
     }
+
     @Test
     public void testInsertVnfcsForRelativeValueSame() throws Exception {
 
@@ -327,23 +444,6 @@
         mockAai.updateVnfStatus(inParams, ctx);
     }
 
-    @Test
-    public void testReadResource() throws Exception {
-
-        MockAaiService mockAai = new MockAaiService(aaiClient);
-        // AaiService mockAai = new AaiService(new AAIClientMock());
-
-        String vnfId = "ibcx0001v";
-        String resourceKey = "generic-vnf.vnf-id = '" + vnfId + "'";
-        String resourceType = "generic-vnf";
-        String queryPrefix = "vnfInfo";
-        SvcLogicContext ctx = mockAai.readResource(resourceKey, queryPrefix, resourceType);
-
-        // System.out.println("VNF TYPE " + queryPrefix + ".vnf.vnf-type");
-
-        assertEquals(ctx.getAttribute("vnfInfo.vnf-type"), "vUSP-Metaswitch");
-
-    }
     private void printContext(SvcLogicContext ctx) throws Exception {
         for (String key : ctx.getAttributeKeySet()) {
             log.info(" KEY " + key);
@@ -399,7 +499,7 @@
         assertEquals(ctx.getAttribute("tmp.vnfInfo.cloud-region.identity-url"), "TestUrl");
 
     } 
-    
+
     @Test
     public void testAddvnfc()
     {
diff --git a/appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/node/TestAAIResourceNode.java b/appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/node/TestAAIResourceNode.java
index b3944b7..cb07584 100644
--- a/appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/node/TestAAIResourceNode.java
+++ b/appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/node/TestAAIResourceNode.java
@@ -5,6 +5,8 @@
  * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Copyright (C) 2017 Amdocs
+ * ================================================================================
+ * Modifications Copyright (C) 2019 Ericsson
  * =============================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -23,33 +25,26 @@
 
 package org.onap.appc.aai.client.node;
 
-import static org.junit.Assert.*;
 
-import java.io.File;
-import java.nio.charset.Charset;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.IOUtils;
-import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.mockito.Mockito;
 import org.onap.appc.aai.client.AppcAaiClientConstant;
 import org.onap.appc.aai.client.aai.AaiService;
-import org.onap.appc.aai.client.aai.TestAaiService;
-
+import org.onap.ccsdk.sli.adaptors.aai.AAIClient;
+import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
+import org.onap.ccsdk.sli.core.sli.SvcLogicException;
 import com.att.eelf.configuration.EELFLogger;
 import com.att.eelf.configuration.EELFManager;
-import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
 
-import org.onap.ccsdk.sli.core.sli.SvcLogicException;
-import org.onap.ccsdk.sli.adaptors.aai.AAIClient;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
 
 
 public class TestAAIResourceNode {
@@ -58,27 +53,40 @@
 
     private static final EELFLogger log = EELFManager.getInstance().getLogger(TestAAIResourceNode.class);
 
+    @Rule
+    public ExpectedException expectedEx = ExpectedException.none();
+
+    @Test
+    public void testGetVnfInfo() throws Exception {
+        AAIResourceNode aai = Mockito.spy(new AAIResourceNode());
+        Map<String, String> inParams = new HashMap<>();
+        SvcLogicContext ctx = new SvcLogicContext();
+        ctx.setAttribute("vm[0].cloud-owner", "TEST");
+        ctx.setAttribute("vm[0].cloud-region-id", "TEST");
+        AaiService aaiService = Mockito.mock(AaiService.class);
+        Mockito.doReturn(aaiService).when(aai).getAaiService();
+        aai.getVnfInfo(inParams, ctx);
+        Mockito.verify(aaiService).getIdentityUrl(Mockito.anyMap(), Mockito.any(SvcLogicContext.class));
+    }
+
     @Test
     public void sortVServer() throws Exception{
-
-        //log.info("Test");
-
         ArrayList<Map<String, String>> vservers = new ArrayList<Map<String, String>>();
-        HashMap<String, String> vserverMap = new HashMap<String, String>();
+        Map<String, String> vserverMap = new HashMap<>();
         vserverMap.put("vserver-id", "vserverId9");
         vserverMap.put("tenant-id", "tenantId9");
         vserverMap.put("cloud-owner", "cloudOwner9");
         vserverMap.put("cloud-region-id", "cloudRegionId9");
         vserverMap.put("vserver-name", "vServerName9");
         vservers.add(vserverMap);
-        vserverMap = new HashMap<String, String>();
+        vserverMap = new HashMap<>();
         vserverMap.put("vserver-id", "vserverId1");
         vserverMap.put("tenant-id", "tenantId1");
         vserverMap.put("cloud-owner", "cloudOwner1");
         vserverMap.put("cloud-region-id", "cloudRegionId1");
         vserverMap.put("vserver-name", "vServerName1");
         vservers.add(vserverMap);
-        vserverMap = new HashMap<String, String>();
+        vserverMap = new HashMap<>();
         vserverMap.put("vserver-id", "vserverId3");
         vserverMap.put("tenant-id", "tenantId3");
         vserverMap.put("cloud-owner", "cloudOwner3");
@@ -104,7 +112,7 @@
         MockAAIResourceNode mrn = new MockAAIResourceNode();
         SvcLogicContext ctx = new SvcLogicContext();
         populateAllVServerInfo(ctx, "tmp.vnfInfo");
-        Map<String, String> inParams  =new HashMap<String, String>();
+        Map<String, String> inParams = new HashMap<>();
         inParams.put("responsePrefix", "tmp.vnfInfo");
         mrn.getAllVServersVnfcsInfo(inParams, ctx);
         assertEquals(ctx.getAttribute("tmp.vnfInfo.vm-count"), "2");
@@ -138,6 +146,18 @@
         assertEquals(ctx.getAttribute("tmp.vnfInfo.vnf.vm-count-for-vf-module"),"1");
     }
 
+    @Test
+    public void testAllVServerExceptionFlow() throws Exception{
+        AAIResourceNode aai = Mockito.spy(new AAIResourceNode());
+        Map<String, String> inParams = new HashMap<>();
+        SvcLogicContext ctx = new SvcLogicContext();
+        AaiService aaiService = Mockito.mock(AaiService.class);
+        Mockito.doReturn(aaiService).when(aai).getAaiService();
+        expectedEx.expect(SvcLogicException.class);
+        expectedEx.expectMessage("Unable to get VServers for the VNF");
+        aai.getAllVServersVnfcsInfo(inParams, ctx);
+    }
+
     public void populateAllVServerInfo(SvcLogicContext ctx, String prefix) throws Exception {
          ctx.setAttribute("vnf-id", "ibcx0001v");
          ctx.setAttribute("vnf-host-ip-address", "000.00.00.00");
@@ -150,7 +170,6 @@
          ctx.setAttribute(prefix+ ".vm[1].tenant-id", "tenantid1");
          ctx.setAttribute(prefix+ ".vm[1].cloud-owner", "cloudOwner1");
          ctx.setAttribute(prefix+ ".vm[1].cloud-region-id", "cloudRegionId1");
-
     }
 
     public static class MockAAIResourceNode extends AAIResourceNode {
@@ -165,10 +184,9 @@
 
     @Test
     public void testPopulateContext() throws Exception{
-
         ArrayList<Map<String, String>> vservers = new ArrayList<Map<String, String>>();
-        HashMap<String, String> vserverMap = new HashMap<String, String>();
-        vserverMap = new HashMap<String, String>();
+        Map<String, String> vserverMap = new HashMap<>();
+        vserverMap = new HashMap<>();
         vserverMap.put("vserver-id", "vserverId1");
         vserverMap.put("tenant-id", "tenantId1");
         vserverMap.put("cloud-owner", "cloudOwner1");
@@ -176,14 +194,14 @@
         vserverMap.put("vserver-name", "vServerName1");
         vserverMap.put("vnfc-name", "vnfcName1");
         vservers.add(vserverMap);
-        vserverMap = new HashMap<String, String>();
+        vserverMap = new HashMap<>();
         vserverMap.put("vserver-id", "vserverId3");
         vserverMap.put("tenant-id", "tenantId3");
         vserverMap.put("cloud-owner", "cloudOwner3");
         vserverMap.put("cloud-region-id", "cloudRegionId3");
         vserverMap.put("vserver-name", "vServerName3");
         vservers.add(vserverMap);
-        vserverMap = new HashMap<String, String>();
+        vserverMap = new HashMap<>();
         vserverMap.put("vserver-id", "vserverId9");
         vserverMap.put("tenant-id", "tenantId9");
         vserverMap.put("cloud-owner", "cloudOwner9");
@@ -202,84 +220,107 @@
     }
 
     @Test
-    public final void testGetVnfInfo() {
+    public final void testGetVnfInfoExceptionFlow() throws Exception {
         SvcLogicContext ctx = new SvcLogicContext();
-        AAIResourceNode aai = new AAIResourceNode();
-Map<String, String> inParams  =new HashMap<String, String>();
-        inParams.put("responsePrefix", "tmp.vnfInfo");
-        try {
-            aai.getVnfInfo(inParams, ctx);
-        } catch (SvcLogicException e) {
-            e.printStackTrace();
-        }
-
+        AAIResourceNode aai = Mockito.spy(new AAIResourceNode());
+        Map<String, String> inParams = new HashMap<>();
+        ctx.setAttribute("vm[0].cloud-owner", "TEST");
+        ctx.setAttribute("vm[0].cloud-region-id", "TEST");
+        AaiService aaiService = Mockito.mock(AaiService.class);
+        Mockito.doThrow(new SvcLogicException("TEST")).when(aaiService).getIdentityUrl(Mockito.anyMap(), Mockito.any(SvcLogicContext.class));
+        Mockito.doReturn(aaiService).when(aai).getAaiService();
+        expectedEx.expect(SvcLogicException.class);
+        expectedEx.expectMessage("TEST");
+        aai.getVnfInfo(inParams, ctx);
     }
+
     @Test
-    public final void testaddVnfcs()
+    public final void testaddVnfcs() throws SvcLogicException
     {
         SvcLogicContext ctx = new SvcLogicContext();
-        AAIResourceNode aai = new AAIResourceNode();
-Map<String, String> inParams  =new HashMap<String, String>();
-        inParams.put("responsePrefix", "tmp.vnfInfo");
-        try {
-            aai.addVnfcs(inParams, ctx);
-        } catch (SvcLogicException e) {
-            e.printStackTrace();
-        }
-
+        ctx.setAttribute("vnfcReference_length", "1");
+        ctx.setAttribute("vnf.vm-count", "1");
+        AAIResourceNode aai = Mockito.spy(new AAIResourceNode());
+        Map<String, String> inParams = new HashMap<>();
+        AaiService aaiService = Mockito.mock(AaiService.class);
+        Mockito.doReturn(aaiService).when(aai).getAaiService();
+        aai.addVnfcs(inParams, ctx);
     }
+
     @Test
-    public final void  testupdateVnfAndVServerStatus(){
+    public final void testaddVnfcsExceptionFlow() throws Exception
+    {
+        SvcLogicContext ctx = new SvcLogicContext();
+        AAIResourceNode aai = Mockito.spy(new AAIResourceNode());
+        Map<String, String> inParams = new HashMap<>();
+        inParams.put("responsePrefix", "tmp.vnfInfo");
+        AaiService aaiService = Mockito.mock(AaiService.class);
+        Mockito.doThrow(new SvcLogicException("TEST")).when(aaiService).getIdentityUrl(Mockito.anyMap(), Mockito.any(SvcLogicContext.class));
+        Mockito.doReturn(aaiService).when(aai).getAaiService();
+        expectedEx.expect(SvcLogicException.class);
+        aai.addVnfcs(inParams, ctx);
+    }
+
+    @Test
+    public final void  testupdateVnfAndVServerStatus() throws SvcLogicException{
+        SvcLogicContext ctx = new SvcLogicContext();
+        ctx.setAttribute("vnf.vm-count", "1");
+        AAIResourceNode aai = Mockito.spy(new AAIResourceNode());
+        Map<String, String> inParams = new HashMap<>();
+        AaiService aaiService = Mockito.mock(AaiService.class);
+        Mockito.doReturn(aaiService).when(aai).getAaiService();
+        aai.updateVnfAndVServerStatus(inParams, ctx);
+        assertEquals(AppcAaiClientConstant.OUTPUT_STATUS_SUCCESS, ctx.getAttribute(AppcAaiClientConstant.OUTPUT_PARAM_STATUS));
+    }
+
+    @Test
+    public final void  testupdateVnfAndVServerStatusExceptionFlow() throws SvcLogicException{
         SvcLogicContext ctx = new SvcLogicContext();
         AAIResourceNode aai = new AAIResourceNode();
-Map<String, String> inParams  =new HashMap<String, String>();
-
-        inParams.put("responsePrefix", "tmp.vnfInfo");
-        try {
-            aai.updateVnfAndVServerStatus(inParams, ctx);
-        } catch (SvcLogicException e) {
-            e.printStackTrace();
-        }
+        Map<String, String> inParams = new HashMap<>();
+        expectedEx.expect(SvcLogicException.class);
+        aai.updateVnfAndVServerStatus(inParams, ctx);
     }
 
     @Test
     public void testgetVfModduleModelInfo() throws Exception{
         SvcLogicContext ctx = new SvcLogicContext();
         AAIResourceNode aai = new AAIResourceNode();
-        AAIClient aaic=null;
-        MockAaiService aaiService=new MockAaiService(aaic);
-        Map<String, String> inParams  =new HashMap<String, String>();
+        AAIClient aaic = null;
+        MockAaiService aaiService = new MockAaiService(aaic);
+        Map<String, String> inParams = new HashMap<>();
         inParams.put("responsePrefix", "tmp.vnfInfo");
-        aai.processForVfModuleModelInfo(aaiService,inParams, ctx);
-        assertEquals(ctx.getAttribute("template-model-id"),"model0001");
-
+        aai.processForVfModuleModelInfo(aaiService, inParams, ctx);
+        assertEquals(ctx.getAttribute("template-model-id"), "model0001");
     }
+
     @Test
     public final void testSetVmParams() {
         SvcLogicContext ctx = new SvcLogicContext();
         String vServerId = "vserver02";
         ctx.setAttribute("tmp.vnfInfo.vm-count","3");
-        ctx.setAttribute("tmp.vnfInfo.vm[0].vserver-id","vserver01");
-        ctx.setAttribute("tmp.vnfInfo.vm[1].vserver-id","vserver02");
-        ctx.setAttribute("tmp.vnfInfo.vm[1].tenant-id","ten01");
-        ctx.setAttribute("tmp.vnfInfo.vm[1].cloud-region-id","cr01");
-        ctx.setAttribute("tmp.vnfInfo.vm[1].cloud-owner","co01");
+        ctx.setAttribute("tmp.vnfInfo.vm[0].vserver-id", "vserver01");
+        ctx.setAttribute("tmp.vnfInfo.vm[1].vserver-id", "vserver02");
+        ctx.setAttribute("tmp.vnfInfo.vm[1].tenant-id", "ten01");
+        ctx.setAttribute("tmp.vnfInfo.vm[1].cloud-region-id", "cr01");
+        ctx.setAttribute("tmp.vnfInfo.vm[1].cloud-owner", "co01");
         AAIResourceNode aairn= new AAIResourceNode();
-        Map <String, String> params  = aairn.setVmParams(ctx, vServerId);
+        Map <String, String> params = aairn.setVmParams(ctx, vServerId);
         assertNotNull(params);
     }
+
     @Test
     public final void testGetVnfcInformationForVserver() throws Exception{
         MockAAIResourceNode aairn = new MockAAIResourceNode();
         SvcLogicContext ctx = new SvcLogicContext();
         SvcLogicContext newVnfcCtx = new SvcLogicContext();
-        Map<String,String> inParams = new HashMap<String, String>();
-        Map<String,String> vnfcParams = new HashMap<String, String>();
-        String responsePrefix="test.";
+        Map<String, String> inParams = new HashMap<>();
+        Map<String, String> vnfcParams = new HashMap<>();
+        String responsePrefix = "test.";
         inParams.put(AppcAaiClientConstant.INPUT_PARAM_RESPONSE_PREFIX, "test");
         vnfcParams.put("vnfcName", "vnfcName2");
         aairn.getVnfcInformationForVserver(vnfcParams, newVnfcCtx, inParams, ctx, aairn.getAaiService(), responsePrefix);
-        assertEquals(ctx.getAttribute("test.vm.vnfc.vnfc-name"),"vnfcName2");
+        assertEquals(ctx.getAttribute("test.vm.vnfc.vnfc-name"), "vnfcName2");
         assertEquals(ctx.getAttribute("test.vm.vnfc.vnfc-type"), "vnfcType2");
         assertEquals(ctx.getAttribute("test.vm.vnfc.vnfc-function-code"), "vnfcFuncCode2");
         assertEquals(ctx.getAttribute("test.vm.vnfc.vnfc-group-notation"), "vnfcGrpNot2");
@@ -289,12 +330,11 @@
     public final void testGetFormattedValue() throws Exception{
         MockAAIResourceNode aairn = new MockAAIResourceNode();
         SvcLogicContext ctx = new SvcLogicContext();
-        Map<String,String> inParams = new HashMap<String, String>();
+        Map<String, String> inParams = new HashMap<>();
         inParams.put(AppcAaiClientConstant.INPUT_PARAM_RESPONSE_PREFIX, "test");
         inParams.put("inputParameter", "Some/Value/With/ Many Spaces");
         aairn.getFormattedValue(inParams, ctx);
-        assertEquals(ctx.getAttribute("template-model-id"),"Some_Value_With_ManySpaces");
-
+        assertEquals(ctx.getAttribute("template-model-id"), "Some_Value_With_ManySpaces");
     }
 
     @Test
@@ -307,7 +347,30 @@
         ctx.setAttribute("test.vnf.vm-with-no-vnfcs-count-vf-module", "0");
         ctx.setAttribute("test.vnf.vm-count-for-vf-module", "2");
         aairn.processCheckForVfModule("vfmoduleId1", ctx, "test.", 2);
+    }
 
+    @Test
+    public void testGetVserverInfo() throws SvcLogicException {
+        SvcLogicContext ctx = new SvcLogicContext();
+        ctx.setAttribute("tmp.vnfInfo.vm-count", "1");
+        AAIResourceNode aai = Mockito.spy(new AAIResourceNode());
+        Map<String, String> inParams = new HashMap<>();
+        AaiService aaiService = Mockito.mock(AaiService.class);
+        Mockito.doReturn(aaiService).when(aai).getAaiService();
+        aai.getVserverInfo(inParams, ctx);
+        Mockito.verify(aaiService).getVMInfo(Mockito.anyMap(), Mockito.any(SvcLogicContext.class));
+    }
 
+    @Test
+    public void testGetVserverInfoExceptionFlow() throws Exception {
+        SvcLogicContext ctx = new SvcLogicContext();
+        ctx.setAttribute("tmp.vnfInfo.vm-count", "1");
+        Map<String, String> inParams = new HashMap<>();
+        AaiService aaiService = Mockito.mock(AaiService.class);
+        AAIResourceNode aai = Mockito.spy(new AAIResourceNode());
+        Mockito.doThrow(new SvcLogicException("TEST")).when(aaiService).getVMInfo(Mockito.anyMap(), Mockito.any(SvcLogicContext.class));
+        Mockito.doReturn(aaiService).when(aai).getAaiService();
+        aai.getVserverInfo(inParams, ctx);
+        assertEquals("TEST", ctx.getAttribute(AppcAaiClientConstant.OUTPUT_PARAM_ERROR_MESSAGE));
     }
 }
