Merge "Put MSOReqId in ReqInfo to SDNC, not sdncReqId"
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GCTopologyOperationRequestMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GCTopologyOperationRequestMapper.java
index b11e2ca..7b86756 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GCTopologyOperationRequestMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GCTopologyOperationRequestMapper.java
@@ -21,6 +21,7 @@
 package org.onap.so.client.sdnc.mapper;
 
 import java.net.URI;
+import java.util.UUID;
 
 import org.onap.sdnc.northbound.client.model.GenericResourceApiConfigurationinformationConfigurationInformation;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiGcTopologyOperationInformation;
@@ -52,9 +53,13 @@
                                                                                          Configuration vnrConfiguration,
                                                                                          GenericVnf voiceVnf, String sdncReqId,URI callbackUri) {
 
+		String msoRequestId = UUID.randomUUID().toString();
+		if (requestContext != null && requestContext.getMsoRequestId() != null) {
+			msoRequestId = requestContext.getMsoRequestId();
+		} 
         GenericResourceApiGcTopologyOperationInformation req = new GenericResourceApiGcTopologyOperationInformation();
         GenericResourceApiSdncrequestheaderSdncRequestHeader sdncRequestHeader = generalTopologyObjectMapper.buildSdncRequestHeader(svcAction, sdncReqId,callbackUri.toString());
-        GenericResourceApiRequestinformationRequestInformation requestInformation = generalTopologyObjectMapper.buildGenericResourceApiRequestinformationRequestInformation(sdncReqId, reqAction);
+        GenericResourceApiRequestinformationRequestInformation requestInformation = generalTopologyObjectMapper.buildGenericResourceApiRequestinformationRequestInformation(msoRequestId, reqAction);
         GenericResourceApiServiceinformationServiceInformation serviceInformation = generalTopologyObjectMapper.buildServiceInformation(serviceInstance, requestContext, customer, false);
         GenericResourceApiConfigurationinformationConfigurationInformation configurationInformation = generalTopologyObjectMapper.buildConfigurationInformation(vnrConfiguration,true);
         GenericResourceApiGcrequestinputGcRequestInput gcRequestInput = generalTopologyObjectMapper.buildGcRequestInformation(voiceVnf,null);
@@ -74,11 +79,15 @@
                                                                                              RequestContext requestContext,
                                                                                              Configuration vnrConfiguration, String sdncReqId, URI callbackUri) {
 
+    	String msoRequestId = null;
+    	if (requestContext != null) {
+    		msoRequestId = requestContext.getMsoRequestId();
+    	}
         GenericResourceApiGcTopologyOperationInformation req = new GenericResourceApiGcTopologyOperationInformation();     
         GenericResourceApiSdncrequestheaderSdncRequestHeader sdncRequestHeader =
                 generalTopologyObjectMapper.buildSdncRequestHeader(svcAction, sdncReqId,callbackUri.toString());
         GenericResourceApiRequestinformationRequestInformation requestInformation = generalTopologyObjectMapper
-                .buildGenericResourceApiRequestinformationRequestInformation(sdncReqId,
+                .buildGenericResourceApiRequestinformationRequestInformation(msoRequestId,
                         GenericResourceApiRequestActionEnumeration.DELETEGENERICCONFIGURATIONINSTANCE);
         GenericResourceApiServiceinformationServiceInformation serviceInformation = new GenericResourceApiServiceinformationServiceInformation();
         serviceInformation.setServiceInstanceId(serviceInstance.getServiceInstanceId());
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java
index b086b8a..756e5b0 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java
@@ -60,10 +60,10 @@
 	/*
 	 * Build GenericResourceApiRequestinformationRequestInformation
 	 */
-	public GenericResourceApiRequestinformationRequestInformation buildGenericResourceApiRequestinformationRequestInformation(String sdncReqId, GenericResourceApiRequestActionEnumeration requestAction){
+	public GenericResourceApiRequestinformationRequestInformation buildGenericResourceApiRequestinformationRequestInformation(String msoReqId, GenericResourceApiRequestActionEnumeration requestAction){
 
 		GenericResourceApiRequestinformationRequestInformation requestInformation = new GenericResourceApiRequestinformationRequestInformation();
-		requestInformation.setRequestId(sdncReqId);
+		requestInformation.setRequestId(msoReqId);
 		requestInformation.setRequestAction(requestAction);
 		requestInformation.setSource("MSO");
 		return requestInformation;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/NetworkTopologyOperationRequestMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/NetworkTopologyOperationRequestMapper.java
index 188a228..aef7e9e 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/NetworkTopologyOperationRequestMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/NetworkTopologyOperationRequestMapper.java
@@ -57,8 +57,12 @@
 			Customer customer, RequestContext requestContext, CloudRegion cloudRegion) {
 		GenericResourceApiNetworkOperationInformation req = new GenericResourceApiNetworkOperationInformation();
 		String sdncReqId = UUID.randomUUID().toString();
+		String msoRequestId = UUID.randomUUID().toString();
+		if (requestContext != null && requestContext.getMsoRequestId() != null) {
+			msoRequestId = requestContext.getMsoRequestId();
+		} 
 		GenericResourceApiSdncrequestheaderSdncRequestHeader sdncRequestHeader = generalTopologyObjectMapper.buildSdncRequestHeader(svcAction, sdncReqId);
-		GenericResourceApiRequestinformationRequestInformation requestInformation = generalTopologyObjectMapper.buildGenericResourceApiRequestinformationRequestInformation(sdncReqId, reqAction);
+		GenericResourceApiRequestinformationRequestInformation requestInformation = generalTopologyObjectMapper.buildGenericResourceApiRequestinformationRequestInformation(msoRequestId, reqAction);
 		GenericResourceApiServiceinformationServiceInformation serviceInformation = generalTopologyObjectMapper.buildServiceInformation(serviceInstance, requestContext, customer, true);
 		GenericResourceApiNetworkinformationNetworkInformation networkInformation = generalTopologyObjectMapper.buildNetworkInformation(network);
 		GenericResourceApiNetworkrequestinputNetworkRequestInput networkRequestInput = buildNetworkRequestInput(network, serviceInstance, cloudRegion);
@@ -68,7 +72,7 @@
 		req.setServiceInformation(serviceInformation);
 		req.setNetworkInformation(networkInformation);
 
-		if (requestContext.getUserParams() != null) {
+		if (requestContext != null && requestContext.getUserParams() != null) {
 			for (Map.Entry<String, Object> entry : requestContext.getUserParams().entrySet()) {
 				GenericResourceApiParam networkInputParameters = new GenericResourceApiParam();
 				GenericResourceApiParamParam paramItem = new GenericResourceApiParamParam();
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapper.java
index 505466b..cdb4ab9 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapper.java
@@ -49,9 +49,13 @@
 			SDNCSvcAction svcAction, GenericResourceApiRequestActionEnumeration resourceAction,ServiceInstance serviceInstance, Customer customer, RequestContext requestContext) {
 
 		String sdncReqId = UUID.randomUUID().toString();
+		String msoRequestId = UUID.randomUUID().toString();
+		if (requestContext != null && requestContext.getMsoRequestId() != null) {
+			msoRequestId = requestContext.getMsoRequestId();
+		} 
 		GenericResourceApiServiceOperationInformation servOpInput = new GenericResourceApiServiceOperationInformation();
 		GenericResourceApiSdncrequestheaderSdncRequestHeader sdncRequestHeader = generalTopologyObjectMapper.buildSdncRequestHeader(svcAction, sdncReqId);
-		GenericResourceApiRequestinformationRequestInformation reqInfo = generalTopologyObjectMapper.buildGenericResourceApiRequestinformationRequestInformation(sdncReqId, resourceAction);
+		GenericResourceApiRequestinformationRequestInformation reqInfo = generalTopologyObjectMapper.buildGenericResourceApiRequestinformationRequestInformation(msoRequestId, resourceAction);
 		GenericResourceApiServiceinformationServiceInformation servInfo = generalTopologyObjectMapper.buildServiceInformation(serviceInstance, requestContext, customer, true);
 		GenericResourceApiServicerequestinputServiceRequestInput servReqInfo = new GenericResourceApiServicerequestinputServiceRequestInput();
 	
@@ -62,7 +66,7 @@
 		servOpInput.setServiceInformation(servInfo);
 		servOpInput.setServiceRequestInput(servReqInfo);
 		
-		if(requestContext.getUserParams()!=null){
+		if(requestContext != null && requestContext.getUserParams()!=null){
 			for (Map.Entry<String, Object> entry : requestContext.getUserParams().entrySet()) {
 				GenericResourceApiServicerequestinputServiceRequestInput serviceRequestInput = new GenericResourceApiServicerequestinputServiceRequestInput(); 
 				serviceRequestInput.setServiceInstanceName(serviceInstance.getServiceInstanceName()); 
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java
index b8c5fad..86c718d 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java
@@ -96,8 +96,12 @@
 		}		
 		
 		String sdncReqId = UUID.randomUUID().toString();
+		String msoRequestId = UUID.randomUUID().toString();
+		if (requestContext != null && requestContext.getMsoRequestId() != null) {
+			msoRequestId = requestContext.getMsoRequestId();
+		} 
 		
-		GenericResourceApiRequestinformationRequestInformation requestInformation = generalTopologyObjectMapper.buildGenericResourceApiRequestinformationRequestInformation(sdncReqId, 
+		GenericResourceApiRequestinformationRequestInformation requestInformation = generalTopologyObjectMapper.buildGenericResourceApiRequestinformationRequestInformation(msoRequestId, 
 				requestAction);
 		GenericResourceApiServiceinformationServiceInformation serviceInformation = generalTopologyObjectMapper.buildServiceInformation(serviceInstance, requestContext, customer, includeModelInformation);
 				GenericResourceApiVnfinformationVnfInformation vnfInformation = generalTopologyObjectMapper.buildVnfInformation(vnf, serviceInstance, includeModelInformation);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapper.java
index 7de393b..85e5b85 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapper.java
@@ -59,11 +59,15 @@
 			GenericResourceApiRequestActionEnumeration requestAction, GenericVnf vnf, ServiceInstance serviceInstance,
 			Customer customer, CloudRegion cloudRegion, RequestContext requestContext, boolean homing) {
 		String sdncReqId = UUID.randomUUID().toString();
+		String msoRequestId = UUID.randomUUID().toString();
+		if (requestContext != null && requestContext.getMsoRequestId() != null) {
+			msoRequestId = requestContext.getMsoRequestId();
+		} 
 		GenericResourceApiVnfOperationInformation req = new GenericResourceApiVnfOperationInformation();
 		GenericResourceApiSdncrequestheaderSdncRequestHeader sdncRequestHeader = generalTopologyObjectMapper
 				.buildSdncRequestHeader(svcAction, sdncReqId);
 		GenericResourceApiRequestinformationRequestInformation requestInformation = generalTopologyObjectMapper
-				.buildGenericResourceApiRequestinformationRequestInformation(sdncReqId, requestAction);
+				.buildGenericResourceApiRequestinformationRequestInformation(msoRequestId, requestAction);
 		GenericResourceApiServiceinformationServiceInformation serviceInformation = generalTopologyObjectMapper
 				.buildServiceInformation(serviceInstance, requestContext, customer, true);
 		GenericResourceApiVnfinformationVnfInformation vnfInformation = generalTopologyObjectMapper
@@ -84,7 +88,7 @@
 		req.setVnfInformation(vnfInformation);
 
 		GenericResourceApiParam vnfInputParameters = new GenericResourceApiParam();
-		if (requestContext.getUserParams() != null) {
+		if (requestContext != null && requestContext.getUserParams() != null) {
 			for (Map.Entry<String, Object> entry : requestContext.getUserParams().entrySet()) {
 				GenericResourceApiParamParam paramItem = new GenericResourceApiParamParam();
 				paramItem.setName(entry.getKey());
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/GCTopologyOperationRequestMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/GCTopologyOperationRequestMapperTest.java
index 0ca80c7..302bb55 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/GCTopologyOperationRequestMapperTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/GCTopologyOperationRequestMapperTest.java
@@ -75,6 +75,7 @@
         Assert.assertEquals("VLAN-NETWORK-RECEPTOR", genericInfo.getConfigurationInformation().getConfigurationType());
         Assert.assertEquals("uuid",genericInfo.getSdncRequestHeader().getSvcRequestId()); 
         Assert.assertEquals("http://localhost",genericInfo.getSdncRequestHeader().getSvcNotificationUrl());
+        Assert.assertEquals("MsoRequestId",genericInfo.getRequestInformation().getRequestId()); 
     }
 
 
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/NetworkTopologyOperationRequestMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/NetworkTopologyOperationRequestMapperTest.java
index 6a14f8b..1bfa78a 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/NetworkTopologyOperationRequestMapperTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/NetworkTopologyOperationRequestMapperTest.java
@@ -23,6 +23,7 @@
 import static com.shazam.shazamcrest.MatcherAssert.assertThat;
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 
 import java.io.IOException;
@@ -109,6 +110,7 @@
 		userParams.put("key1", "value1");
 		requestContext.setUserParams(userParams);
 		requestContext.setProductFamilyId("productFamilyId");
+		requestContext.setMsoRequestId("MsoRequestId");
 
 		network = new L3Network();
 		network.setNetworkId("TEST_NETWORK_ID");
@@ -138,8 +140,24 @@
 
 		assertThat(networkSDNCrequest, sameBeanAs(reqMapper1).ignoring("sdncRequestHeader.svcRequestId")
 				.ignoring("requestInformation.requestId"));
+		assertEquals("MsoRequestId", networkSDNCrequest.getRequestInformation().getRequestId());
 	}
+	
+	@Test
+	public void createGenericResourceApiNetworkOperationInformationReqContextNullTest() throws Exception {
 
+		RequestContext rc = new RequestContext();
+		rc.setMsoRequestId(null);
+		GenericResourceApiNetworkOperationInformation networkSDNCrequest = mapper.reqMapper(
+				SDNCSvcOperation.NETWORK_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN, GenericResourceApiRequestActionEnumeration.CREATENETWORKINSTANCE, network, serviceInstance, customer,
+				rc, cloudRegion);
+		assertNotNull(networkSDNCrequest.getRequestInformation().getRequestId());
+		GenericResourceApiNetworkOperationInformation networkSDNCrequest2 = mapper.reqMapper(
+				SDNCSvcOperation.NETWORK_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN, GenericResourceApiRequestActionEnumeration.CREATENETWORKINSTANCE, network, serviceInstance, customer,
+				null, cloudRegion);
+		assertNotNull(networkSDNCrequest2.getRequestInformation().getRequestId());
+	}
+	
 	@Test
 	public void reqMapperTest() throws Exception {
 
@@ -175,7 +193,8 @@
 
 		assertThat(reqMapperUnassign, sameBeanAs(networkSDNCrequestUnassign).ignoring("sdncRequestHeader.svcRequestId")
 				.ignoring("requestInformation.requestId"));
-
+		assertEquals("MsoRequestId", networkSDNCrequestUnassign.getRequestInformation().getRequestId());
+		
  	}
 	
 	@Test
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapperTest.java
index 0bf06a0..1919ef4 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapperTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapperTest.java
@@ -22,6 +22,8 @@
 
 import static com.shazam.shazamcrest.MatcherAssert.assertThat;
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 
 import java.nio.file.Files;
 import java.nio.file.Paths;
@@ -80,10 +82,14 @@
 		userParams.put("key1", "value1");
 		requestContext.setUserParams(userParams);
 		requestContext.setProductFamilyId("productFamilyId");
+		requestContext.setMsoRequestId("MsoRequestId");
 
 		GenericResourceApiServiceOperationInformation serviceOpInformation = mapper.reqMapper(
 				SDNCSvcOperation.SERVICE_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN, GenericResourceApiRequestActionEnumeration.CREATESERVICEINSTANCE, serviceInstance, customer,
 				requestContext);
+		GenericResourceApiServiceOperationInformation serviceOpInformationNullReqContext = mapper.reqMapper(
+				SDNCSvcOperation.SERVICE_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN, GenericResourceApiRequestActionEnumeration.CREATESERVICEINSTANCE, serviceInstance, customer,
+				null);
 
 		String jsonToCompare = new String(Files.readAllBytes(Paths.get("src/test/resources/__files/BuildingBlocks/genericResourceApiEcompModelInformation.json")));
 
@@ -92,5 +98,7 @@
 				GenericResourceApiOnapmodelinformationOnapModelInformation.class);
 
 		assertThat(reqMapper1, sameBeanAs(serviceOpInformation.getServiceInformation().getOnapModelInformation()));
+		assertEquals("MsoRequestId", serviceOpInformation.getRequestInformation().getRequestId());
+		assertNotNull(serviceOpInformationNullReqContext.getRequestInformation().getRequestId());
 	}
 }
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapperTest.java
index 282f23c..7fce8c4 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapperTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapperTest.java
@@ -23,6 +23,7 @@
 import static com.shazam.shazamcrest.MatcherAssert.assertThat;
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 
 import java.nio.file.Files;
@@ -102,6 +103,7 @@
 		RequestParameters requestParameters = new RequestParameters();
 		requestParameters.setUsePreload(true);
 		requestContext.setRequestParameters(requestParameters);
+		requestContext.setMsoRequestId("MsoRequestId");
 
 		GenericVnf vnf = new GenericVnf();
 		vnf.setVnfId("testVnfId");
@@ -148,6 +150,7 @@
 
 		assertThat(reqMapper1, sameBeanAs(vfModuleSDNCrequest).ignoring("sdncRequestHeader.svcRequestId")
 				.ignoring("requestInformation.requestId"));
+		assertEquals("MsoRequestId", vfModuleSDNCrequest.getRequestInformation().getRequestId());
 	}
 
 	@Test
@@ -168,10 +171,13 @@
 		VfModule vfModule = new VfModule();
 		vfModule.setVfModuleId("testVfModuleId");
 		vfModule.setVfModuleName("testVfModuleName");
+		
+		RequestContext requestContext = new RequestContext();
+		requestContext.setMsoRequestId("MsoRequestId");
 
 		GenericResourceApiVfModuleOperationInformation vfModuleSDNCrequest = mapper.reqMapper(
 				SDNCSvcOperation.VF_MODULE_TOPOLOGY_OPERATION, SDNCSvcAction.UNASSIGN, vfModule, null, vnf, serviceInstance, null,
-				null, null, null);
+				null, requestContext, null);
 
 		String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleOperationInformationUnassign.json")));
 
@@ -182,6 +188,35 @@
 
 		assertThat(reqMapper1, sameBeanAs(vfModuleSDNCrequest).ignoring("sdncRequestHeader.svcRequestId")
 				.ignoring("requestInformation.requestId"));
+		assertEquals("MsoRequestId", vfModuleSDNCrequest.getRequestInformation().getRequestId());
+	}
+	
+	@Test
+	public void unassignGenericResourceApiVfModuleInformationNullMsoReqIdTest() throws Exception {
+
+		// prepare and set service instance
+		ServiceInstance serviceInstance = new ServiceInstance();
+		serviceInstance.setServiceInstanceId("serviceInstanceId");
+
+		// prepare and set vnf instance
+
+		GenericVnf vnf = new GenericVnf();
+		vnf.setVnfId("testVnfId");
+		vnf.setVnfType("testVnfType");
+
+		// prepare and set vf module instance
+
+		VfModule vfModule = new VfModule();
+		vfModule.setVfModuleId("testVfModuleId");
+		vfModule.setVfModuleName("testVfModuleName");
+		
+		RequestContext requestContext = new RequestContext();
+
+		GenericResourceApiVfModuleOperationInformation vfModuleSDNCrequest = mapper.reqMapper(
+				SDNCSvcOperation.VF_MODULE_TOPOLOGY_OPERATION, SDNCSvcAction.UNASSIGN, vfModule, null, vnf, serviceInstance, null,
+				null, requestContext, null);
+
+		assertNotNull(vfModuleSDNCrequest.getRequestInformation().getRequestId());
 	}
 
 	@Test
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapperTest.java
index 229a8cf..64b532f 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapperTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapperTest.java
@@ -21,6 +21,7 @@
 package org.onap.so.client.sdnc.mapper;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 
 import java.util.ArrayList;
@@ -122,12 +123,16 @@
 		userParams.put("key1", "value1");
 		requestContext.setUserParams(userParams);
 		requestContext.setProductFamilyId("productFamilyId");
+		requestContext.setMsoRequestId("MsoRequestId");
 
 		CloudRegion cloudRegion = new CloudRegion();
 
 		GenericResourceApiVnfOperationInformation vnfOpInformation = mapper.reqMapper(
 				SDNCSvcOperation.VNF_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN,GenericResourceApiRequestActionEnumeration.CREATEVNFINSTANCE, vnf, serviceInstance, customer,
 				cloudRegion, requestContext,true);
+		GenericResourceApiVnfOperationInformation vnfOpInformationNullReqContext = mapper.reqMapper(
+				SDNCSvcOperation.VNF_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN,GenericResourceApiRequestActionEnumeration.CREATEVNFINSTANCE, vnf, serviceInstance, customer,
+				cloudRegion, null,true);
 
 		assertNull(vnfOpInformation.getServiceInformation().getOnapModelInformation().getModelCustomizationUuid());
 		assertEquals("vnfModelCustomizationUUID", vnfOpInformation.getVnfInformation().getOnapModelInformation().getModelCustomizationUuid());
@@ -136,5 +141,7 @@
 		assertEquals("l3-network-ig-222", vnfOpInformation.getVnfRequestInput().getVnfNetworkInstanceGroupIds().get(1).getVnfNetworkInstanceGroupId());
 		assertEquals("entitlementPoolUuid", vnfOpInformation.getVnfRequestInput().getVnfInputParameters().getParam().get(1).getValue());
 		assertEquals("licenseKeyGroupUuid", vnfOpInformation.getVnfRequestInput().getVnfInputParameters().getParam().get(2).getValue());
+		assertEquals("MsoRequestId", vnfOpInformation.getRequestInformation().getRequestId());
+		assertNotNull(vnfOpInformationNullReqContext.getRequestInformation().getRequestId());
 	}
 }