diff --git a/bpmn/MSOCommonBPMN/pom.xml b/bpmn/MSOCommonBPMN/pom.xml
index c85bcd7..934aea8 100644
--- a/bpmn/MSOCommonBPMN/pom.xml
+++ b/bpmn/MSOCommonBPMN/pom.xml
@@ -397,5 +397,11 @@
 			<version>1.2.4.RELEASE</version>
 			<scope>test</scope>
 		</dependency>
+		<dependency>
+			<groupId>org.assertj</groupId>
+			<artifactId>assertj-core</artifactId>
+			<version>3.11.1</version>
+			<scope>test</scope>
+		</dependency>
 	</dependencies>
 </project>
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupName.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupName.groovy
index c309c3b..f4e7926 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupName.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupName.groovy
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright 2018 Nokia
+ * ================================================================================
  * 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
@@ -19,6 +21,11 @@
  */
 
 package org.onap.so.bpmn.common.scripts
+
+import joptsimple.internal.Strings
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.springframework.http.HttpStatus
+
 import javax.ws.rs.core.UriBuilder
 
 import org.camunda.bpm.engine.delegate.DelegateExecution
@@ -33,8 +40,12 @@
 public class ConfirmVolumeGroupName extends AbstractServiceTaskProcessor{
 	private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, ConfirmVolumeGroupName.class);
 
-	def Prefix="CVGN_"
-	ExceptionUtil exceptionUtil = new ExceptionUtil()
+	def static final Prefix = "CVGN_"
+	private final ExceptionUtil exceptionUtil
+
+	ConfirmVolumeGroupName(ExceptionUtil exceptionUtil) {
+		this.exceptionUtil = exceptionUtil
+	}
 
 	public void initProcessVariables(DelegateExecution execution) {
 		execution.setVariable("prefix",Prefix)
@@ -74,40 +85,39 @@
 		try {
 			Optional<VolumeGroup> volumeGroupOp = getAAIClient().get(VolumeGroup.class,  resourceUri)
             if(volumeGroupOp.isPresent()){
-                execution.setVariable("CVGN_queryVolumeGroupResponseCode", 200)
+                execution.setVariable("CVGN_queryVolumeGroupResponseCode", HttpStatus.OK.value())
                 execution.setVariable("CVGN_queryVolumeGroupResponse", volumeGroupOp.get())
             }else{
-                execution.setVariable("CVGN_queryVolumeGroupResponseCode", 404)
+                execution.setVariable("CVGN_queryVolumeGroupResponseCode", HttpStatus.NOT_FOUND.value())
                 execution.setVariable("CVGN_queryVolumeGroupResponse", "Volume Group not Found!")
             }
 		} catch (Exception ex) {
 			msoLogger.debug("Exception occurred while executing AAI GET:" + ex.getMessage())
-			execution.setVariable("CVGN_queryVolumeGroupResponseCode", 500)
+			execution.setVariable("CVGN_queryVolumeGroupResponseCode", HttpStatus.INTERNAL_SERVER_ERROR.value())
 			execution.setVariable("CVGN_queryVolumeGroupResponse", "AAI GET Failed:" + ex.getMessage())
-			exceptionUtil.buildAndThrowWorkflowException(execution, 500, "AAI GET Failed")
+			exceptionUtil.buildAndThrowWorkflowException(execution, HttpStatus.INTERNAL_SERVER_ERROR.value(), "AAI GET Failed")
 		}
 	}
 
 	// process the result from queryAAIVolumeGroupId()
 
 	public void checkAAIQueryResult(DelegateExecution execution) {
-		def result = execution.getVariable("CVGN_queryVolumeGroupResponse")
-
         def actualVolumeGroupName = ""
-        if (execution.getVariable("CVGN_queryVolumeGroupResponseCode") == 404) {
+        if (execution.getVariable("CVGN_queryVolumeGroupResponseCode") == HttpStatus.NOT_FOUND.value()) {
 			msoLogger.debug('volumeGroupId does not exist in AAI')
 		}
-		else if (execution.getVariable("CVGN_queryVolumeGroupResponseCode") == 200) {
+		else if (execution.getVariable("CVGN_queryVolumeGroupResponseCode") == HttpStatus.OK.value()) {
             VolumeGroup volumeGroup = execution.getVariable("CVGN_queryVolumeGroupResponse")
-            if(volumeGroup.getVolumeGroupName()!=null){
+
+            if (!Strings.isNullOrEmpty(volumeGroup.getVolumeGroupName())) {
                 actualVolumeGroupName =  volumeGroup.getVolumeGroupName()
-            }
-			msoLogger.debug("volumeGroupId exists in AAI")
+				msoLogger.debug("volumeGroupId exists in AAI")
+			}
 		}
 		execution.setVariable("CVGN_volumeGroupNameMatches", false)
 		def volumeGroupName = execution.getVariable("CVGN_volumeGroupName")
 
-		if (volumeGroupName.equals(actualVolumeGroupName)) {
+		if (!actualVolumeGroupName.isEmpty() && volumeGroupName.equals(actualVolumeGroupName)) {
 			msoLogger.debug('Volume Group Name Matches AAI records')
 			execution.setVariable("CVGN_volumeGroupNameMatches", true)
 		}
@@ -121,8 +131,8 @@
 
 	// generates a WorkflowException if the volume group name does not match AAI record for this volume group
 	public void handleVolumeGroupNameNoMatch(DelegateExecution execution) {
-		def errorNotAssociated = "Error occurred - volume group id " + execution.getVariable("CVGN_volumeGroupId") +
-			" is not associated with  " + execution.getVariable("CVGN_volumeGroupName")
+		def errorNotAssociated = "Error occurred - volume group id ${execution.getVariable('CVGN_volumeGroupId')} " +
+				"is not associated with ${execution.getVariable('CVGN_volumeGroupName')}"
 		msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, errorNotAssociated, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "");
 		exceptionUtil.buildAndThrowWorkflowException(execution, 1002, errorNotAssociated)
 	}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupNameFactory.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupNameFactory.groovy
new file mode 100644
index 0000000..f032d64
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupNameFactory.groovy
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Nokia.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.common.scripts
+
+import org.onap.so.bpmn.common.scripts.ConfirmVolumeGroupName
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+
+public class ConfirmVolumeGroupNameFactory {
+
+    ConfirmVolumeGroupName create() {
+        return  new ConfirmVolumeGroupName(new ExceptionUtil());
+    }
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExceptionUtil.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExceptionUtil.groovy
index 4b701e6..e132b41 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExceptionUtil.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExceptionUtil.groovy
@@ -293,7 +293,7 @@
 		execution.setVariable("WorkflowException", exception);
 		msoLogger.debug("Outgoing WorkflowException is " + exception)
 		msoLogger.debug("Throwing MSOWorkflowException")
-		throw new BpmnError("MSOWorkflowException")
+		throw new BpmnError(errorCode.toString(), String.format("MSOWorkflowException: %s", errorMessage))
 	}
 
 	/**
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/ConfirmVolumeGroupName.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/ConfirmVolumeGroupName.bpmn
index 0e99ce9..403be98 100644
--- a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/ConfirmVolumeGroupName.bpmn
+++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/ConfirmVolumeGroupName.bpmn
@@ -13,7 +13,7 @@
       <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
       <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-def cvgn= new ConfirmVolumeGroupName()
+def cvgn= new ConfirmVolumeGroupNameFactory().create()
 cvgn.handleAAIQueryFailure(execution)]]></bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="AAIQueryFailure" targetRef="EndEvent_7"/>
@@ -25,7 +25,7 @@
       <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>
       <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-def cvgn= new ConfirmVolumeGroupName()
+def cvgn= new ConfirmVolumeGroupNameFactory().create()
 cvgn.queryAAIForVolumeGroupId(execution)]]></bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:sequenceFlow id="SequenceFlow_39" name="" sourceRef="QueryAAIForVolumeGroupId" targetRef="ExclusiveGateway_3"/>
@@ -33,7 +33,7 @@
       <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
       <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-def cvgn= new ConfirmVolumeGroupName()
+def cvgn= new ConfirmVolumeGroupNameFactory().create()
 cvgn.preProcessRequest(execution)]]></bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="InitializeVariables" targetRef="QueryAAIForVolumeGroupId"/>
@@ -42,7 +42,7 @@
       <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
       <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-def cvgn= new ConfirmVolumeGroupName()
+def cvgn= new ConfirmVolumeGroupNameFactory().create()
 cvgn.checkAAIQueryResult(execution)]]></bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="CheckAAIQueryResult" targetRef="ExclusiveGateway_1"/>
@@ -50,7 +50,7 @@
       <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
       <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-def cvgn= new ConfirmVolumeGroupName()
+def cvgn= new ConfirmVolumeGroupNameFactory().create()
 cvgn.handleVolumeGroupNameNoMatch(execution)]]></bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:exclusiveGateway id="ExclusiveGateway_1" default="SequenceFlow_7">
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupNameTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupNameTest.groovy
index a96127a..79aacdf 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupNameTest.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupNameTest.groovy
@@ -4,12 +4,14 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright 2018 Nokia
+ * ================================================================================
  * 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.
@@ -20,64 +22,216 @@
 
 package org.onap.so.bpmn.common.scripts
 
-import static org.mockito.Mockito.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake
+import org.junit.Before
+import org.junit.Test
+import org.mockito.Mock
+import org.mockito.MockitoAnnotations
+import org.onap.aai.domain.yang.RelationshipList
+import org.onap.aai.domain.yang.VolumeGroup
+import org.onap.so.bpmn.common.scripts.ConfirmVolumeGroupName
+import org.onap.so.bpmn.common.scripts.ConfirmVolumeGroupNameFactory
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import org.onap.so.constants.Defaults
+import org.springframework.http.HttpStatus
 
 import javax.ws.rs.core.UriBuilder
 
-import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
-import org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake
-import org.junit.Assert
-import org.junit.Before
-import org.junit.Test
-import org.mockito.ArgumentCaptor
-import org.mockito.Captor
-import org.mockito.Mockito
-import org.mockito.MockitoAnnotations
-import org.mockito.Spy
-import org.onap.aai.domain.yang.VolumeGroup
-import org.onap.so.client.aai.AAIObjectType
-import org.onap.so.client.aai.entities.uri.AAIResourceUri
-import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import static org.assertj.core.api.Assertions.catchThrowableOfType
+import static org.junit.Assert.assertEquals
+import static org.junit.Assert.assertFalse
+import static org.junit.Assert.assertTrue
+import static org.mockito.Mockito.spy
+import static org.mockito.Mockito.when
 
-class ConfirmVolumeGroupNameTest extends MsoGroovyTest {
-	
-	@Spy
-	private ConfirmVolumeGroupName confirmVolumeGroupName;
+class ConfirmVolumeGroupNameTest {
 
-	@Before
-	public void init() throws IOException {
-		super.init("ConfirmVolumeGroupName")
-		MockitoAnnotations.initMocks(this);
-		when(confirmVolumeGroupName.getAAIClient()).thenReturn(client)
+    private static final AAIResourceUri RESOURCE_URI = AAIUriFactory.createResourceFromExistingURI(
+            AAIObjectType.VOLUME_GROUP, UriBuilder.fromPath('/aai/test/volume-groups/volume-group/testVolumeGroup').build())
 
-	}
+    private ConfirmVolumeGroupName confirmVolumeGroupName
+    @Mock
+    private VolumeGroup volumeGroup
+    @Mock
+    private AAIResourcesClient client
+    private ExceptionUtilFake exceptionUtilFake
 
-	@Test
-	public void testQueryAAIForVolumeGroupId() {
+    private DelegateExecution delegateExecution
 
-		AAIResourceUri resourceUri = AAIUriFactory.createResourceFromExistingURI(AAIObjectType.VOLUME_GROUP, UriBuilder.fromPath('/aai/test/volume-groups/volume-group/testVolumeGroup').build());
-		when(mockExecution.getVariable("CVGN_volumeGroupGetEndpoint")).thenReturn(resourceUri)
-		VolumeGroup volumeGroup = new VolumeGroup()
-		volumeGroup.setVolumeGroupId("Test")
-		when(client.get(VolumeGroup.class,resourceUri)).thenReturn(Optional.of(volumeGroup))
-		confirmVolumeGroupName.queryAAIForVolumeGroupId(mockExecution)
-        Mockito.verify(mockExecution).setVariable("CVGN_queryVolumeGroupResponseCode",200)
-        Mockito.verify(mockExecution).setVariable("CVGN_queryVolumeGroupResponse",volumeGroup)
-	}
+    @Before
+    public void init() throws IOException {
+        exceptionUtilFake = new ExceptionUtilFake()
+        confirmVolumeGroupName = spy(new ConfirmVolumeGroupName(exceptionUtilFake))
+        MockitoAnnotations.initMocks(this)
+        delegateExecution = new DelegateExecutionFake()
+        volumeGroup = createVolumeGroup()
+        when(confirmVolumeGroupName.getAAIClient()).thenReturn(client)
+    }
 
-	@Test
-	public void testQueryAAIForVolumeGroupId_404() {
-		AAIResourceUri resourceUri = AAIUriFactory.createResourceFromExistingURI(AAIObjectType.VOLUME_GROUP, UriBuilder.fromPath('/aai/test/volume-groups/volume-group/testVolumeGroup').build());
-		when(client.get(VolumeGroup.class,  resourceUri)).thenReturn(Optional.empty())
-		DelegateExecution execution = new DelegateExecutionFake()
-		try {
-			execution.setVariable("CVGN_volumeGroupGetEndpoint", resourceUri)
-			confirmVolumeGroupName.queryAAIForVolumeGroupId(execution)
-		}
-		catch(Exception ex){}
-		Assert.assertEquals(404, execution.getVariable("CVGN_queryVolumeGroupResponseCode"))
-		Assert.assertEquals("Volume Group not Found!", execution.getVariable("CVGN_queryVolumeGroupResponse"))
-		
-	}
+    @Test
+    public void preProcessRequest_shouldSetUpVariables() {
+        String volumeGroupId = "volume-group-id-1"
+        String volumeGroupName = "volume-group-name-1"
+        String aicCloudRegion = "aic-cloud-region-1"
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER, aicCloudRegion, volumeGroupId)
+
+        delegateExecution.setVariable("ConfirmVolumeGroupName_volumeGroupId", volumeGroupId)
+        delegateExecution.setVariable("ConfirmVolumeGroupName_volumeGroupName", volumeGroupName)
+        delegateExecution.setVariable("ConfirmVolumeGroupName_aicCloudRegion", aicCloudRegion)
+        delegateExecution.setVariable("CVGN_volumeGroupGetEndpoint", uri)
+
+        confirmVolumeGroupName.preProcessRequest(delegateExecution)
+
+        assertEquals(ConfirmVolumeGroupName.Prefix, delegateExecution.getVariable("prefix"))
+
+        assertEquals(volumeGroupId, delegateExecution.getVariable("CVGN_volumeGroupId"))
+        assertEquals(volumeGroupName, delegateExecution.getVariable("CVGN_volumeGroupName"))
+        assertEquals(aicCloudRegion, delegateExecution.getVariable("CVGN_aicCloudRegion"))
+    }
+
+    @Test
+    public void queryAAIForVolumeGroupId_shouldSucceed_whenVolumeGroupExists() {
+        delegateExecution.setVariable("CVGN_queryVolumeGroupResponseCode", HttpStatus.OK)
+        delegateExecution.setVariable("CVGN_queryVolumeGroupResponse", volumeGroup)
+        delegateExecution.setVariable("CVGN_volumeGroupGetEndpoint", RESOURCE_URI)
+        when(client.get(VolumeGroup.class, RESOURCE_URI)).thenReturn(Optional.of(volumeGroup))
+
+        confirmVolumeGroupName.queryAAIForVolumeGroupId(delegateExecution)
+
+        assertEquals(HttpStatus.OK.value(), delegateExecution.getVariable("CVGN_queryVolumeGroupResponseCode"))
+        assertEquals(volumeGroup, delegateExecution.getVariable("CVGN_queryVolumeGroupResponse"))
+    }
+
+    @Test
+    public void queryAAIForVolumeGroupId_shouldFailWith404_whenVolumeGroupDoesNotExist() {
+        delegateExecution.setVariable("CVGN_volumeGroupGetEndpoint", RESOURCE_URI)
+        when(client.get(VolumeGroup.class, RESOURCE_URI)).thenReturn(Optional.empty())
+
+        confirmVolumeGroupName.queryAAIForVolumeGroupId(delegateExecution)
+
+        assertEquals(HttpStatus.NOT_FOUND.value(), delegateExecution.getVariable("CVGN_queryVolumeGroupResponseCode"))
+        assertEquals("Volume Group not Found!", delegateExecution.getVariable("CVGN_queryVolumeGroupResponse"))
+    }
+
+    @Test
+    public void queryAAIForVolumeGroupId_shouldThrowWorkflowException_whenRuntimeExceptionIsThrown() throws BpmnError {
+        delegateExecution.setVariable("CVGN_volumeGroupGetEndpoint", RESOURCE_URI)
+        delegateExecution.setVariable("testProcessKey", "process-key1")
+
+        def errorMsg = "my runtime exception"
+        when(client.get(VolumeGroup.class, RESOURCE_URI)).thenThrow(new RuntimeException(errorMsg))
+
+        def exceptionMsg = "AAI GET Failed"
+
+        BpmnError error = catchThrowableOfType(
+                { -> confirmVolumeGroupName.queryAAIForVolumeGroupId(delegateExecution) }, BpmnError.class)
+
+        assertEquals(String.format("MSOWorkflowException: %s", exceptionMsg), error.getMessage())
+        assertEquals(HttpStatus.INTERNAL_SERVER_ERROR.value().toString(), error.getErrorCode())
+
+        assertEquals(HttpStatus.INTERNAL_SERVER_ERROR.value(), delegateExecution.getVariable("CVGN_queryVolumeGroupResponseCode"))
+        assertEquals(String.format("AAI GET Failed:%s", errorMsg), delegateExecution.getVariable("CVGN_queryVolumeGroupResponse"))
+        assertEquals(HttpStatus.INTERNAL_SERVER_ERROR.value(), exceptionUtilFake.getErrorCode())
+        assertEquals(exceptionMsg, exceptionUtilFake.getErrorMessage())
+        assertEquals(delegateExecution, exceptionUtilFake.getDelegateExecution())
+    }
+
+    @Test
+    public void checkAAIQueryResult_shouldSetVolumeGroupNameMatchesToFalse_whenResponseCodeIs404() {
+        delegateExecution.setVariable("CVGN_queryVolumeGroupResponseCode", HttpStatus.NOT_FOUND)
+        delegateExecution.setVariable("CVGN_volumeGroupName", "")
+
+        confirmVolumeGroupName.checkAAIQueryResult(delegateExecution)
+
+        assertFalse(delegateExecution.getVariable("CVGN_volumeGroupNameMatches"))
+    }
+
+    @Test
+    public void checkAAIQueryResult_shouldSetVolumeGroupNameMatchesToTrue_whenResponseCodeIs200AndVolumeGroupNameExists() {
+        delegateExecution.setVariable("CVGN_queryVolumeGroupResponseCode", HttpStatus.OK.value())
+        delegateExecution.setVariable("CVGN_queryVolumeGroupResponse", volumeGroup)
+        delegateExecution.setVariable("CVGN_volumeGroupName", volumeGroup.getVolumeGroupName())
+
+        confirmVolumeGroupName.checkAAIQueryResult(delegateExecution)
+
+        assertTrue(delegateExecution.getVariable("CVGN_volumeGroupNameMatches"))
+    }
+
+    @Test
+    public void handleVolumeGroupNameNoMatch_shouldThrowBpmnErrorException() {
+        def volumeGroupId = "volume-group-id"
+        def volumeGroupName = "volume-group-name"
+
+        delegateExecution.setVariable("CVGN_volumeGroupId", volumeGroupId)
+        delegateExecution.setVariable("CVGN_volumeGroupName", volumeGroupName)
+
+        def errorMessage = String.format("Error occurred - volume group id %s is not associated with %s",
+                delegateExecution.getVariable('CVGN_volumeGroupId'), delegateExecution.getVariable('CVGN_volumeGroupName'))
+
+        BpmnError error = catchThrowableOfType(
+                { -> confirmVolumeGroupName.handleVolumeGroupNameNoMatch(delegateExecution) }, BpmnError.class)
+
+        assertEquals(String.format("MSOWorkflowException: %s", errorMessage), error.getMessage())
+        assertEquals("1002", error.getErrorCode())
+
+        assertEquals(1002, exceptionUtilFake.getErrorCode())
+        assertEquals(errorMessage, exceptionUtilFake.getErrorMessage())
+        assertEquals(delegateExecution, exceptionUtilFake.getDelegateExecution())
+    }
+
+    @Test
+    public void reportSuccess_shouldSetWorkflowResponseToEmptyString() {
+        confirmVolumeGroupName.reportSuccess(delegateExecution)
+        assertEquals("", delegateExecution.getVariable("WorkflowResponse"))
+    }
+
+    private VolumeGroup createVolumeGroup() {
+        VolumeGroup volumeGroup = new VolumeGroup()
+
+        volumeGroup.setVolumeGroupId("volume-group-id")
+        volumeGroup.setVolumeGroupName("volume-group-name")
+        volumeGroup.setHeatStackId("heat-stack-id")
+        volumeGroup.setVnfType("vnf-type")
+        volumeGroup.setOrchestrationStatus("orchestration-status")
+        volumeGroup.setModelCustomizationId("model-customization-id")
+        volumeGroup.setVfModuleModelCustomizationId("vf-module-model-customization-id")
+        volumeGroup.setResourceVersion("resource-version")
+        volumeGroup.setRelationshipList(new RelationshipList())
+
+        return volumeGroup
+    }
+
+    private static class ExceptionUtilFake extends ExceptionUtil {
+
+        private int errorCode
+        private String errorMessage
+        private DelegateExecution execution
+
+        @Override
+        public void buildAndThrowWorkflowException(DelegateExecution execution, int errorCode, String errorMessage) {
+            this.errorCode = errorCode
+            this.errorMessage = errorMessage
+            this.execution = execution
+            throw new BpmnError(errorCode.toString(), "MSOWorkflowException: ${errorMessage}")
+        }
+
+        public int getErrorCode() {
+            return errorCode
+        }
+
+        public String getErrorMessage() {
+            return errorMessage
+        }
+
+        public DelegateExecution getDelegateExecution() {
+            return execution
+        }
+    }
+
 }
