diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn
index 3e9c6e9e7e3a8a33fa7bdd76c1a697af3cbb34e0..c707f968d2b0367f380461f36a97cd345f817c84 100644
--- a/LibOneM2M/OneM2M_Functions.ttcn
+++ b/LibOneM2M/OneM2M_Functions.ttcn
@@ -149,7 +149,7 @@ module OneM2M_Functions {
 			map(self:mccPort, system:mccPort) param (vc_cseSimuDesc.mccPort);
 			map(self:mccPortIn, system:mccPortIn) param (vc_cseSimuDesc.mccPortIn);
 			map(self:acPort, system:acPort);
-						
+			
 			f_setProtocolBinding(vc_cseSimuDesc.mccPort, vc_cseSimuDesc.mccPortIn, v_binding, v_host, v_binding_in);
 		    
 		    vc_myInterfaces[enum2int(valueof(InterfaceIds:e_mccPort))] := { mccPort, v_host, v_binding, vc_cseSimuDesc.mccPort.serialization };
@@ -548,19 +548,19 @@ module OneM2M_Functions {
 
 			// Connect
 		}			
-
+			
 		/**
 		 * @desc Ports unmapping
 		 */
 		function f_cf01Down() runs on AeSimu {
-
+		
 			unmap(self:mcaPort, system:mcaPort);
 			unmap(self:acPort, system:acPort);
 			if(vc_auxiliaryAe2Up) {
 				if(vc_ae2.alive) {
-				vc_ae2.start(f_cf01DownAe2());
-				vc_ae2.done;
-			}
+					vc_ae2.start(f_cf01DownAe2());
+					vc_ae2.done;
+				}
 			}
 		
 		}// end f_cf01Down
@@ -655,7 +655,7 @@ module OneM2M_Functions {
 				}
 			}
 		}// end f_cf04Down
-		
+
 		/**
 		 * @desc Ports unmapping
 		 */
@@ -912,7 +912,7 @@ module OneM2M_Functions {
 				return v_resourceIndex;
 
 			}
-			
+
 			/**
 			 * @desc Getting the address of the last resource saved in the vc_resourcesList
 			 * @param p_tester Given component
@@ -1097,7 +1097,7 @@ module OneM2M_Functions {
 				infoPort.send(lengthof(vc_resourcesList)-1);
 		
 			} 
-		
+
 			/**
 			 * @desc Sending the address of the last resource saved in the vc_resourcesList
 			 */	
@@ -1265,7 +1265,7 @@ module OneM2M_Functions {
 							
 							if(ispresent(vc_response.primitive.responsePrimitive.primitiveContent.aE.aE_ID)){
 								f_sendAcPrimitive("AE-ID_changed", vc_aeAuxIndex);
-							}	
+							} 
 						}
 					}
 					[] mcaPort.receive(mw_response(mw_responsePrimitiveKO))
@@ -1351,7 +1351,7 @@ module OneM2M_Functions {
 					vc_ae2.start(f_cse_notifyProcedure_subscriptionVerificationHandler(p_responseStatusCode));
 				}
 			}
-			
+		
 			/**
 			 * @desc Registration of aux AE1 for dynamic authorization
 			 * @param p_ae2Index Internal AE1 resource index
@@ -1592,26 +1592,26 @@ module OneM2M_Functions {
 							
 						if(not(v_deregistrationPerformed)) {
 							if(vc_localRemoteCseIndex != -1) {
-							//Deregistration by Registree (IUT) - Send trigger message for deregistration
-							v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(vc_localRemoteCseIndex);
-							f_sendUtPrimitive(v_utRequest, v_action & f_getLocalResourceAddress(vc_localRemoteCseIndex));	
-							
-							tc_ac.start;
-							alt {
-								[] mccPortIn.receive(mw_request(mw_delete(f_getLocalResourceAddress(vc_localRemoteCseIndex)))) -> value vc_request {
-									tc_ac.stop;
-									f_processDeleteRequestPrimitive(vc_request.primitive.requestPrimitive);
+								//Deregistration by Registree (IUT) - Send trigger message for deregistration
+								v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(vc_localRemoteCseIndex);
+								f_sendUtPrimitive(v_utRequest, v_action & f_getLocalResourceAddress(vc_localRemoteCseIndex));	
+								
+								tc_ac.start;
+								alt {
+									[] mccPortIn.receive(mw_request(mw_delete(f_getLocalResourceAddress(vc_localRemoteCseIndex)))) -> value vc_request {
+										tc_ac.stop;
+										f_processDeleteRequestPrimitive(vc_request.primitive.requestPrimitive);
 										f_send(e_mccPortIn, m_response(vc_response.primitive.responsePrimitive));
-									log(__SCOPE__&": INFO: Deregistration performed successfully");
-								}
-								[] tc_ac.timeout {
-									log(__SCOPE__&": INFO: No deregistration performed");
+										log(__SCOPE__&": INFO: Deregistration performed successfully");
+									}
+									[] tc_ac.timeout {
+										log(__SCOPE__&": INFO: No deregistration performed");
+									}
 								}
 							}
 						}
 					}					
 				}
-				}
 			
 			}			
 			
@@ -1649,12 +1649,12 @@ module OneM2M_Functions {
 							vc_aeAuxIndex := v_resourceIndex;
 							if(ispresent(vc_response.primitive.responsePrimitive.primitiveContent.aE.aE_ID)){
 								f_sendAcPrimitive("AE-ID_changed", vc_aeAuxIndex);
-						}
+							}
 						} else if (p_resourceType == int9) {
 							//Check that group members are correctly in the group
 							if(not(match(v_request.primitiveContent.group_.memberIDs, vc_response.primitive.responsePrimitive.primitiveContent.group_.memberIDs))) {
 								setverdict(inconc, __SCOPE__&":INFO: Wrong number of members in group");
-					}
+							}
 						}
 					}
 					[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
@@ -1792,9 +1792,17 @@ module OneM2M_Functions {
 			 * @return PrimitiveContent parameter of the RETRIEVE response
 			 * @verdict 
 			 */
-			function f_cse_retrieveResource(integer p_resourceIndex) runs on AeSimu return PrimitiveContent{
+			function f_cse_retrieveResource(integer p_resourceIndex, in template(omit) XSD.ID p_virtualResource := omit) runs on AeSimu return PrimitiveContent{
+				
+				var XSD.ID v_resourceAddress;
+				
+				if(isvalue(p_virtualResource)) {
+					v_resourceAddress := f_getResourceAddress(p_resourceIndex) & "/" & valueof(p_virtualResource);
+				} else {
+					v_resourceAddress := f_getResourceAddress(p_resourceIndex);
+				}
 
-				f_send(e_mcaPort, m_request(m_retrieve(f_getResourceAddress(p_resourceIndex), f_getOriginator(p_resourceIndex))));
+				f_send(e_mcaPort, m_request(m_retrieve(v_resourceAddress, f_getOriginator(p_resourceIndex))));
 				tc_ac.start;
 				alt {
 					[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response {
@@ -1826,11 +1834,11 @@ module OneM2M_Functions {
 			 */
 			function f_cse_retrieveResourceWithRoleToken(integer p_resourceIndex, template (omit) XSD.ID p_roleResourceID := omit, template (omit) XSD.ID p_tokenResourceID := omit) runs on AeSimu return PrimitiveContent{
 
-				var RequestPrimitive v_retrieveRequest;
+				var template RequestPrimitive v_retrieveRequest;
 				v_retrieveRequest := m_retrieve(f_getResourceAddress(p_resourceIndex), f_getOriginator(p_resourceIndex));
 				if (ispresent(p_roleResourceID)) {v_retrieveRequest.roleIDs := {p_roleResourceID};}
 				if (ispresent(p_tokenResourceID)) {v_retrieveRequest.tokenIDs := {p_tokenResourceID};}
-				f_send(e_mcaPort, m_request(v_retrieveRequest));
+				f_send(e_mcaPort, m_request(valueof(v_retrieveRequest)));
 				
 				tc_ac.start;
 				alt {
@@ -1869,7 +1877,7 @@ module OneM2M_Functions {
 				}
 				
 				f_send(e_mcaPort, m_request(v_request));
-						
+				
 				tc_ac.start;
 				alt {
 					[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
@@ -2156,19 +2164,19 @@ module OneM2M_Functions {
 							stop;
 						}
 					}
-						
+					
 					//Sending response to the notification received	
 					//Preparation of Notification response to be sent
 					v_responsePrimitive := valueof(m_responseNotification(p_responseStatusCode, omit));
-					v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier;
+    				v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier;
 					
 					if(getverdict != pass) {
 						v_responsePrimitive.responseStatusCode := int4000; 
 					}
 					f_send(e_mcaPortIn, m_response(v_responsePrimitive));
-					
+					        
 				} //end f_cse_notifyProcedure_subscriptionVerificationHandler
-        
+				
 				/**
 				 * @desc Default handling message exchange for the notification procedure
 				 * @verdict 
@@ -2243,7 +2251,7 @@ module OneM2M_Functions {
 				 * @param p_responsePrimitive Expected responsePrimitive in the notification
 				 * @verdict 
 				 */
-				function f_cse_notifyProcedure_responsePrimitiveHandler(template ResponsePrimitive p_responsePrimitive) runs on AeSimu {
+				function f_cse_notifyProcedure_responsePrimitiveHandler(template  ResponsePrimitive p_responsePrimitive) runs on AeSimu {
 					// Local variables
 					var ResponsePrimitive v_responsePrimitive;
 	
@@ -2339,7 +2347,7 @@ module OneM2M_Functions {
 				 * @param p_notification Expected notification
 				 * @verdict 
 				 */
-				function f_cse_notifyProcedure_subscriptionDeletionHandler( template Notification p_notification) runs on AeSimu {
+				function f_cse_notifyProcedure_subscriptionDeletionHandler( template  Notification p_notification) runs on AeSimu {
 					var ResponsePrimitive v_responsePrimitive;
 					
 					//Activate defaults when running on a PTC
@@ -2429,7 +2437,7 @@ module OneM2M_Functions {
 					f_checkCseSimuStatus();
 				
 				} //end f_cse_notifyProcedure_notify	
-
+				
 				/**
 				 * @desc Handling message exchange for the dynamic authorization procedure
 				 * @desc Processing details are out of scope of oneM2M
@@ -2515,7 +2523,7 @@ module OneM2M_Functions {
 							v_responsePrimitive.primitiveContent.securityInfo.dasResponse.dynamicACPInfo.privilegesLifetime.alt_ := p_privilegesLifetime;
 							if (isvalue(p_token))
 							{
-								v_responsePrimitive.primitiveContent.securityInfo.dasResponse.tokens[0] := p_token;
+								v_responsePrimitive.primitiveContent.securityInfo.dasResponse.tokens[0] := valueof(p_token);
 							}
 						}
 						else if (p_secInfoType==1)
@@ -2556,8 +2564,8 @@ module OneM2M_Functions {
 							f_send(e_mccPortIn, m_response(vc_response.primitive.responsePrimitive));
 							if(getverdict == inconc) {
 								setverdict(fail, __SCOPE__ & ":ERROR: Wrong target resource address");
-							}		
-						}	
+									}	
+									}
 						[] mccPortIn.receive(mw_request(?)) -> value vc_request {
 							tc_ac.stop;
 							setverdict(fail, __SCOPE__ & ":ERROR:  Request received with unexpected parameters");
@@ -2632,8 +2640,8 @@ module OneM2M_Functions {
 					var PrimitiveContent v_announcedResource;
 
 					//Activate defaults when running on a PTC
-					f_cse_activateDefaults_cse1();
-					
+					f_cse_activateDefaults_cse1();		
+				
 					tc_ac.start;
 					alt {
 						[] mccPortIn.receive(mw_request(p_requestprimitive)) -> value vc_request {
@@ -2652,7 +2660,7 @@ module OneM2M_Functions {
 							setverdict(fail, __SCOPE__ & ":ERROR:  No announcement received");
 						}
 					}
-		
+				
 					f_checkCseSimuStatus();
 
 				} //end f_cse_announcementProcedure_updateHandler	
@@ -2673,8 +2681,8 @@ module OneM2M_Functions {
 					var PrimitiveContent v_announcedResource;
 
 					//Activate defaults when running on a PTC
-					f_cse_activateDefaults_cse1();
-					
+					f_cse_activateDefaults_cse1();		
+				
 					tc_ac.start;
 					alt {
 						[] mccPortIn.receive(mw_request(p_requestprimitive)) -> value v_request {
@@ -2693,7 +2701,7 @@ module OneM2M_Functions {
 							setverdict(fail, __SCOPE__ & ":ERROR:  No announcement received");
 						}
 					}
-		
+				
 					f_checkCseSimuStatus();
 
 				} //end f_cse_announcementProcedure_deleteHandler
@@ -3160,7 +3168,7 @@ module OneM2M_Functions {
 				f_cse_activateDefaults_cse1();			
 				
 				//send triggering primitive to SUT
-			  	f_sendUtPrimitive(v_utRequest,v_action);
+			  f_sendUtPrimitive(v_utRequest,v_action);
 
 				tc_ac.start;
 				alt {
@@ -3318,7 +3326,7 @@ module OneM2M_Functions {
 							v_myResource.aEAnnc.link := substr(v_myResource.aEAnnc.link, 0, lengthof(v_myResource.aEAnnc.link)-1) & v_myResource.aEAnnc.resourceID;
 						} else {
 							v_myResource.aEAnnc.resourceID := "aeA" & int2str(v_resourceIndex);
-					}
+						}
 					}
 				} else if (p_resourceType == int10001 and ispresent (p_resource)) { //Acp Annc
 					if(ischosen(p_resource.accessControlPolicyAnnc)) {
@@ -3443,7 +3451,7 @@ module OneM2M_Functions {
 				} else if(p_resourceType == int3 and ispresent(p_resource)) { //Container
 					if(ischosen(p_resource.container)){
 						if(isvalue(p_resource.container)) {
-							v_myResource.container := valueof(p_resource.container);
+						v_myResource.container := valueof(p_resource.container);
 						}
 						v_myResource.container.resourceType := p_resourceType;
       					
@@ -3518,7 +3526,7 @@ module OneM2M_Functions {
 						}
 						if(not(ispresent(p_resource.group_.memberType))) {
 							v_myResource.group_.memberType := int0;
-					}				
+						}
 						if(not(ispresent(p_resource.group_.consistencyStrategy))) {
 							v_myResource.group_.consistencyStrategy := int1;
 						}
@@ -3547,7 +3555,7 @@ module OneM2M_Functions {
 						v_myResource.timeSeries.resourceID := "ts" & int2str(v_resourceIndex);
 						if(not(ispresent(p_resource.timeSeries.resourceName))) {
 							v_myResource.timeSeries.resourceName := "timeSeries" & int2str(v_resourceIndex);
-						}
+				}
 						v_myResource.timeSeries.resourceType := p_resourceType;
 						v_myResource.timeSeries.parentID := f_getResourceId(vc_localResourcesList[p_parentIndex].resource);
 						v_myResource.timeSeries.creationTime := fx_generateTimestamp();
@@ -3904,8 +3912,8 @@ module OneM2M_Functions {
 			  */
 			 altstep a_cse_cf04() runs on CseSimu {
 			 	[] a_cse_cseSimu();
-			 }	
-
+			 }		
+ 
 			/**
 			 * @desc    Cse altstep for config 06
 			 */
@@ -4070,7 +4078,7 @@ module OneM2M_Functions {
 				
 				p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(-,-,-);
 				if(not(ispresent(p_utRequest.requestPrimitive.primitiveContent))) {
-					p_utRequest.requestPrimitive.primitiveContent.aE := m_contentCreateAe(omit, omit, omit, omit);
+					p_utRequest.requestPrimitive.primitiveContent.aE := m_contentCreateAe(omit, omit, -, omit);
 				}
   
 				f_sendUtPrimitive(p_utRequest, v_action);
@@ -4194,7 +4202,7 @@ module OneM2M_Functions {
 	
 				return v_resourceIndex;	
 			} //end function f_ae_createPollingChannel
-			
+
 			/**
 			 * @desc Message exchange for the creation of a resource
 			 * @param p_request CREATE request primitive expected
@@ -4294,7 +4302,7 @@ module OneM2M_Functions {
 
 
 	group GetSetFunctions {
-	
+		
 		/**
 		 * @desc Build a reception template from the primitiveContent sent in previous request primitive
 		 * @param p_primitiveContent PrimitiveContent from previous request primitive
@@ -4549,7 +4557,7 @@ module OneM2M_Functions {
 				if(ispresent(p_primitiveContent.remoteCSE.nodeLink)){
 					v_primitiveContent.remoteCSE.nodeLink := ?;			    
 				}
-			}
+			}			
 			else if(ischosen(p_primitiveContent.timeSeries)){ // timeSeries
 				v_primitiveContent := {timeSeries := mw_contentTimeSeriesBase};
 				
@@ -4706,10 +4714,10 @@ module OneM2M_Functions {
 				if(ispresent(p_request.primitiveContent.timeSeries.accessControlPolicyIDs)) {
 					if((match(valueof(p_request.primitiveContent.timeSeries.accessControlPolicyIDs), v_defaultAcpIDs )) and (isbound(vc_acpAuxIndex))){
 						p_request.primitiveContent.timeSeries.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[vc_acpAuxIndex].resource)};
-					}	
+			}
 				} 
 			} 
-		
+
 			return valueof(p_request);
 		}
 		
@@ -4768,7 +4776,7 @@ module OneM2M_Functions {
 		
 			p_request.requestIdentifier := valueof(p_request.requestIdentifier) & f_rnd(1, 1000000);
 			
-				p_request.from_ := f_getOriginator(p_resourceIndex);
+			p_request.from_ := f_getOriginator(p_resourceIndex);
 			
 			if(p_resourceType != int10002) {
 				//Only set To parameter if it has not been set yet
@@ -4895,7 +4903,7 @@ module OneM2M_Functions {
 			if(ischosen(p_contentResource.timeSeriesInstanceAnnc)) {
 				return p_contentResource.timeSeriesInstanceAnnc.resourceID;
 			}
-			
+
 			log(__SCOPE__&":WARNING: Primitive Content Kind not implemented");
 			
 			return "resourceIDNotFound";
@@ -4960,7 +4968,7 @@ module OneM2M_Functions {
 			}
 			if(ischosen(p_contentResource.genericInterworkingService_invalid)) {
 				return p_contentResource.genericInterworkingService_invalid.resourceName;
-			}		
+			}			
 			if(ischosen(p_contentResource.timeSeries)) {
 				return p_contentResource.timeSeries.resourceName;
 			}	
@@ -5101,7 +5109,7 @@ module OneM2M_Functions {
 		 */
 		function f_getCompletePoA(in PortDesc p_portDesc := PX_TS_CSE1.mccPortIn, charstring p_announcementTargetResource := "") return charstring {
       var charstring v_poa;
-						
+      
       log(">>> f_getCompletePoA: ", p_portDesc);
       
       if (ischosen(p_portDesc.binding.httpBindingDesc)) {
@@ -5119,17 +5127,17 @@ module OneM2M_Functions {
         if (ispresent(p_portDesc.binding.mqttBindingDesc.bindingDesc.localPort)) {
             v_poa := v_poa & ":" & int2str(p_portDesc.binding.mqttBindingDesc.bindingDesc.localPort);
         }
-			} else {
+      } else {
         v_poa := "ws://" & p_portDesc.binding.wsBindingDesc.bindingDesc.tsAddress;
         if (ispresent(p_portDesc.binding.wsBindingDesc.bindingDesc.localPort)) {
             v_poa := v_poa & ":" & int2str(p_portDesc.binding.wsBindingDesc.bindingDesc.localPort);
-			}
-		}
+        }
+      }
 			v_poa := v_poa & "/" & p_announcementTargetResource;
 			
 			return v_poa;
 		}
-    		
+		
 		function f_getPortAddress(in PortDesc p_portDesc := PX_TS_CSE1.mcaPortIn) return charstring {
       if (ischosen(p_portDesc.binding.httpBindingDesc)) {
         return p_portDesc.binding.httpBindingDesc.bindingDesc.tsAddress;
@@ -5257,7 +5265,7 @@ module OneM2M_Functions {
 					} else {
 						v_resourceAddress := f_getResourceAddress(vc_resourcesList[p_targetResourceIndex].parentIndex, e_nonHierarchical, p_primitiveScope) & "/" & f_getResourceName(vc_resourcesList[p_targetResourceIndex].resource);
 						return v_resourceAddress;
-				}
+					}	
 				}
 					
 			} else if (p_primitiveScope == e_spRelative) {
@@ -5281,7 +5289,7 @@ module OneM2M_Functions {
 					} else {
 						v_resourceAddress := f_getResourceAddress(vc_resourcesList[p_targetResourceIndex].parentIndex, e_nonHierarchical, p_primitiveScope) & "/" & f_getResourceName(vc_resourcesList[p_targetResourceIndex].resource);
 						return v_resourceAddress;
-				}
+					}	
 				}
 			} else if (p_primitiveScope ==  e_absolute) {
 				if(p_addressingMethod == e_nonHierarchical) {
@@ -5304,7 +5312,7 @@ module OneM2M_Functions {
 					} else {
 						v_resourceAddress := f_getResourceAddress(vc_resourcesList[p_targetResourceIndex].parentIndex, e_nonHierarchical, p_primitiveScope) & "/" & f_getResourceName(vc_resourcesList[p_targetResourceIndex].resource);
 						return v_resourceAddress;
-				}				
+					}	
 				}
 			} else {
 				return "";
@@ -5492,7 +5500,7 @@ module OneM2M_Functions {
         v_ipv4Address := p_portDesc.binding.mqttBindingDesc.bindingDesc.tsAddress;
       } else {
         v_ipv4Address := p_portDesc.binding.wsBindingDesc.bindingDesc.tsAddress;
-			}
+      }
 			
 			return v_ipv4Address;
 			
@@ -5685,7 +5693,7 @@ module OneM2M_Functions {
 			}
 			return valueof(p_resource);					
 		}
-
+ 
 		/**
 			@desc Set protocol binding and host for the given ports
 			@param p_sendingPort Config parameters of sending port
@@ -6226,7 +6234,7 @@ module OneM2M_Functions {
 				if (ischosen(p_primitiveContent.aE)){
 					
 					if(isvalue(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.aE)) {
-					log("Representation contains AE resource representation");
+						log("Representation contains AE resource representation");
 						v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.aE, p_primitiveContent.aE);
 					}
 					//TODO Probably to be removed these alternatives. Function is checking notification content
@@ -6274,7 +6282,7 @@ module OneM2M_Functions {
 						v_matchResult := match(p_requestPrimitive.primitiveContent.responsePrimitive.primitiveContent.timeSeries, p_primitiveContent.timeSeries)
 					}
 				}
-	    	
+				
 				if (ischosen(p_primitiveContent.uRI)){
 					if(isvalue(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.uRI)) {
 						log("Representation contains URI element");
@@ -6367,7 +6375,7 @@ module OneM2M_Functions {
 				var charstring v_spRelativeAeIdForMqtt;
 				
 				select (p_event) {
-	
+				
 					case ("AE-ID_changed") {
 						//Calculate the SP-Relative-AE-ID following format defined in TS-0010 MQTT
 						v_aeResourceAddress := f_getResourceAddress(p_aeIndex, e_nonHierarchical, e_spRelative);
@@ -6376,11 +6384,11 @@ module OneM2M_Functions {
 						} else {
 							v_spRelativeAeIdForMqtt := f_getSpRelativeAeIdForMqtt(v_aeResourceAddress);
 						}
-				
+						
 						if((vc_config == e_cf01) or (((vc_config == e_cf02) or (vc_config == e_cf02CseSimuMaster)) and (vc_testSystemRole == e_ae)) or (vc_config == e_cf03)) {
 							if(vc_myInterfaces[enum2int(valueof(InterfaceIds:e_mcaPort))].myProtocolBinding == "MQTT") {
 								acPort.send(AcRequestPrimitive:{p_event & "_mcaPort", {charstring := v_spRelativeAeIdForMqtt}});
-			}
+							}
 							if(vc_myInterfaces[enum2int(valueof(InterfaceIds:e_mcaPortIn))].myProtocolBinding == "MQTT") {
 								acPort.send(AcRequestPrimitive:{p_event & "_mcaPortIn", {charstring := v_spRelativeAeIdForMqtt}});	
 							}
@@ -6558,7 +6566,7 @@ module OneM2M_Functions {
 					}	
 				}
 				if(p_responseStatusCode == int2000) {
-					setverdict(pass, __SCOPE__&":INFO: Resource retrieved successfuly");
+				setverdict(pass, __SCOPE__&":INFO: Resource retrieved successfuly");
 					vc_response.primitive.responsePrimitive.primitiveContent := vc_localResourcesList[v_targetLocalResourceIndex].resource;
 				} else {
 					setverdict(pass, __SCOPE__&":INFO: Resource retrieve rejected");
@@ -6596,7 +6604,7 @@ module OneM2M_Functions {
 					setverdict(pass, __SCOPE__&":INFO: Resource deleted successfuly");
 				} else {
 					setverdict(pass, __SCOPE__&":INFO: Resource deletion rejected");
-			}
+				}
 			}
 			vc_response.primitive.responsePrimitive.from_ := PX_TS_CSE1.cseId;
 			vc_response.primitive.responsePrimitive.to_ := p_request.from_;
@@ -6764,7 +6772,7 @@ module OneM2M_Functions {
 			}
 
 		}		
-				
+		
 		function f_send(
 		                in InterfaceIds p_interfaceIds, 
 		                in template MsgOut p_msgOut
diff --git a/LibOneM2M/OneM2M_Templates.ttcn b/LibOneM2M/OneM2M_Templates.ttcn
index ad279e90386d957dcafd04d86a5371de158da4ac..d169a9893af00251d5cd18abbbcc129dbd46ad38 100644
--- a/LibOneM2M/OneM2M_Templates.ttcn
+++ b/LibOneM2M/OneM2M_Templates.ttcn
@@ -75,7 +75,7 @@ module OneM2M_Templates {
 			forcedFields := p_forcedFields
 		};
 		
-		template MsgIn mw_request(in template (present) RequestPrimitive p_requestPrimitive, template AttributeList_1 p_nullFields := *) := {
+		template MsgIn mw_request(in template RequestPrimitive p_requestPrimitive, template AttributeList_1 p_nullFields := *) := {
 			primitive := { requestPrimitive := p_requestPrimitive}, 
 			nullFields := p_nullFields
 		};
@@ -515,6 +515,8 @@ module OneM2M_Templates {
 			
 			
 			
+			
+			
     	}//end group Retrieve
 
     	group Update {
@@ -745,7 +747,34 @@ module OneM2M_Templates {
 			 */
 			template RequestPrimitive mw_updateAccessControlPolicyAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_update := {
 				primitiveContent := {accessControlPolicyAnnc := ?}
-			}; 	
+			};
+			
+			
+			/**
+			 * @desc Base UPDATE request primitive for Semantic Descriptor resource
+			 */
+			template (value) RequestPrimitive m_updateSemanticDescriptorBase modifies m_update := {
+				requestIdentifier := "m_updateSemanticDescriptor",
+				primitiveContent:= {semanticDescriptor := m_contentUpdateSemanticDescriptor}
+			};	
+			
+		   /**
+			 * @desc Base UPDATE request primitive for Semantic Descriptor resource. Reusing m_contentCreateSemanticMashupJobProfile.
+			 */
+			template (value) RequestPrimitive m_updateSemanticMashupJobProfileBase modifies m_update := {
+				requestIdentifier := "m_updateSemanticMashupJobProfileBase",
+				primitiveContent:= {semanticMashupJobProfile := m_contentUpdateSemanticMashupJobProfile}
+			};			
+			
+			/**
+			 * @desc Base UPDATE request primitive for SemanticMashupInstance resource
+			 */
+			template (value) RequestPrimitive m_updateSemanticMashupInstanceBase modifies m_create := {
+				requestIdentifier := testcasename() & "-m_createSemanticMashupInstance",
+				resourceType := int41,
+				primitiveContent := {semanticMashupInstance := m_contentUpdateSemanticMashupInstance }
+			};
+			 	
 			
 			/**
 			 * @desc Base UPDATE request primitive for TimeSeries resource
@@ -875,7 +904,7 @@ module OneM2M_Templates {
 				resourceType := int10002,
 				primitiveContent := {aEAnnc := m_contentCreateAEAnnc({"Credential-ID:None"}, p_accessControlPolicyIds, p_appId, valueof(p_parentResourceAddress) & "/" & p_stemId)}
 			};
-
+			
 			/**
 			 * @desc Base CREATE request primitive for AEAnnc resource
 			 * @param p_accessControlPolicyIds
@@ -1040,7 +1069,7 @@ module OneM2M_Templates {
 				requestIdentifier := testcasename() & "-m_createRemoteCSE",
 				resourceType := int16,
 				primitiveContent := {remoteCSE := m_contentCreateRemoteCSE(p_resourceName, p_accessControlPolicyIds,p_cSEBase, p_cSE_ID)}
-			};			
+			};
 			
 			/**
 			 * @desc CREATE request primitive for remoteCSE resource with poa
@@ -1129,7 +1158,7 @@ module OneM2M_Templates {
 				resourceType := int4,
 				primitiveContent := {contentInstance := m_contentCreateContentInstance}
 			};
-			
+				
 			/**
 			 * @desc Base CREATE request primitive for ContentInstanceAnnc resource
 			 */
@@ -1348,7 +1377,7 @@ module OneM2M_Templates {
 				resourceType := int19,
 				primitiveContent := {serviceSubscribedAppRule := m_contentCreateServiceSubscribedAppRuleBase}
 			};
-        	
+       	
 			/**
 			 * @desc Base CREATE request primitive for ServiceSubscribedNode Resource
 			 */
@@ -1382,6 +1411,67 @@ module OneM2M_Templates {
 				primitiveContent := {subscription := mw_contentCreateSubscriptionBase}
 			};
         	
+
+			/**
+			 * @desc Base CREATE request primitive for OntologyRepository resource
+			 */        	
+			template (value) RequestPrimitive m_createOntologyRepositoryBase modifies m_create := {
+				requestIdentifier := testcasename() & "-m_createOntologyRepository",
+				resourceType := int38,
+				primitiveContent := {ontologyRepository := m_contentCreateOntologyRepository }
+			};
+			
+		    /**
+			 * @desc Base CREATE request primitive for Ontology resource
+			 */        	
+			template (value) RequestPrimitive m_createOntologyBase modifies m_create := {
+				requestIdentifier := testcasename() & "-m_createOntologyRepository",
+				resourceType := int39,
+				primitiveContent := {ontology := m_contentCreateOntology }
+			};
+
+			/**
+			 * @desc Base CREATE request primitive for SemanticDescriptor resource
+			 */        	
+			template (value) RequestPrimitive m_createSemanticDescriptorBase modifies m_create := {
+				requestIdentifier := testcasename() & "-m_createSemanticDescriptor",
+				resourceType := int24,
+				primitiveContent := {semanticDescriptor := m_contentCreateSemanticDescriptor }
+			};
+        	
+			/**
+			 * @desc Base CREATE request primitive for SemanticMashupJobProfile resource
+			 */        	
+			template (value) RequestPrimitive m_createSemanticMashupJobProfileBase (in template (value) Sparql p_memberFilter := c_defaultMmemberFilter,
+			                                                                        in template (value) XSD.Base64Binary p_outputDescriptor := int2oct(0,65537),
+			                                                                        in template (value) XSD.Base64Binary p_functionDescriptor := int2oct(0,65537) ) modifies m_create := {
+				requestIdentifier := testcasename() & "-m_createSemanticMashupJobProfile",
+				resourceType := int40,
+				primitiveContent := {semanticMashupJobProfile := m_contentCreateSemanticMashupJobProfile (p_memberFilter, p_outputDescriptor, p_functionDescriptor) }
+			};
+
+        	/**
+			 * @desc Base CREATE request primitive for SemanticMashupInstance resource
+			 */
+			template (value) RequestPrimitive m_createSemanticMashupInstanceBase (in XSD.AnyURI p_smjpID := "/AEID",
+			                                                                      in XSD.Base64Binary p_smjpInputParameter := '1234'O,
+			                                                                      in MashupMemberStoreType p_memberStoreType := int1,
+			                                                                      in MashupResultGenType p_mashupMember := int2) modifies m_create := {
+				requestIdentifier := testcasename() & "-m_createSemanticMashupInstance",
+				resourceType := int41,
+				primitiveContent := {semanticMashupInstance := m_contentCreateSemanticMashupInstance (p_smjpID, p_smjpInputParameter, p_memberStoreType, p_mashupMember) }
+			};
+			
+			
+			/**
+			 * @desc Base CREATE request primitive for SemanticMashupResult resource
+			 */
+			template (value) RequestPrimitive m_createSemanticMashupResultBase modifies m_create := {
+				requestIdentifier := testcasename() & "-m_createsemanticMashupResult",
+				resourceType := int42,
+				primitiveContent := {semanticMashupResult := m_contentCreateSemanticMashupResult}
+			};
+        	
 			template (value) RequestPrimitive m_createSubscriptionAdvanced(	XSD.ID p_parentResourceAddress, 
 																		   in template (omit)  XSD.String p_name := omit,
 																		   in template (value) ListOfURIs p_notificationURI,
@@ -1511,6 +1601,32 @@ module OneM2M_Templates {
 				resourceType := int30,
 				primitiveContent := {timeSeriesInstance := m_contentCreateTimeSeriesInstance (p_name)}
 			};
+        	
+			/**
+			 * @desc Base Reception template for CREATE SemanticMashupJobProfile resource
+			 */        	
+			template RequestPrimitive mw_createSemanticMashupJobProfile(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
+				resourceType := int40,
+				primitiveContent := {semanticMashupJobProfile := mw_contentCreateSemanticMashupJobProfileBase }
+			};
+
+        	/**
+			 * @desc Base Reception template for CREATE SemanticMashupInstance resource
+			 */
+			template RequestPrimitive mw_createSemanticMashupInstance (template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
+				resourceType := int41,
+				primitiveContent := {semanticMashupInstance := mw_contentCreateSemanticMashupInstanceBase }
+			};
+			
+			
+			/**
+			 * @desc Base Reception template for CREATE SemanticMashupResult resource
+			 */
+			template RequestPrimitive mw_createSemanticMashupResult (template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
+				resourceType := int42,
+				primitiveContent := {semanticMashupResult := mw_contentCreateSemanticMashupResultBase}
+			};
+			
 			
 			/**
 			 * @desc Reception template for CREATE timeSeriesInstance
@@ -1527,7 +1643,7 @@ module OneM2M_Templates {
 				resourceType := int10029,
 				primitiveContent := {timeSeriesAnnc := mw_contentCreateTimeSeriesAnncBase}
 			};  
-					
+			
 			/**
 			 * @desc Base CREATE request primitive for TimeSeriesInstanceAnnc
 			 */
@@ -2175,51 +2291,68 @@ module OneM2M_Templates {
 				primitiveContent := {responsePrimitive := p_responsePrimitive}
 			};		
 
-
+			
     		
     	}//end of group Notify
 	}//end group RequestPrimitives
 	
 	group ContentCreate {
 		
-		template PrimitiveContent m_primitiveContentAccessControlPolicy(template AccessControlPolicy_optional p_acp) := {
+		template (value) PrimitiveContent m_primitiveContentAccessControlPolicy(template (value) AccessControlPolicy_optional p_acp) := {
 			accessControlPolicy := p_acp
 		}
 		
-		template PrimitiveContent m_primitiveContentAe(template AE_optional p_ae) := {
+		template (value) PrimitiveContent m_primitiveContentAe(template (value) AE_optional p_ae) := {
 			aE := p_ae
 		}
+
+		
+		template (value) PrimitiveContent m_primitiveContentOntologyRepository(template (value) OntologyRepository_optional p_ontologyRepository) := {
+			ontologyRepository := p_ontologyRepository
+		}
 		
-		template PrimitiveContent m_primitiveContentContainer(template Container_optional p_container) := {
+	    template (value) PrimitiveContent m_primitiveContentOntology(template (value) Ontology_optional p_ontology) := {
+			ontology := p_ontology
+		}
+				
+		template (value) PrimitiveContent m_primitiveContentContainer(template (value) Container_optional p_container) := {
 			container := p_container
 		}
 		
-		template PrimitiveContent m_primitiveContentContentInstance(template ContentInstance_optional p_contentInstance) := {
+		template (value) PrimitiveContent m_primitiveContentContentInstance(template (value) ContentInstance_optional p_contentInstance) := {
 			contentInstance := p_contentInstance
 		}
 		            
-        template PrimitiveContent m_primitiveContentCSEBase(template CSEBase_optional p_cSEBase) := {
+        template (value) PrimitiveContent m_primitiveContentCSEBase(template (value) CSEBase_optional p_cSEBase) := {
 	        cSEBase := p_cSEBase
 		}
 
-		template PrimitiveContent m_primitiveContentRemoteCSE(template RemoteCSE_optional p_remoteCSE) := {
+		template (value) PrimitiveContent m_primitiveContentRemoteCSE(template (value) RemoteCSE_optional p_remoteCSE) := {
 			remoteCSE := p_remoteCSE
 		}
 		
-		template PrimitiveContent m_primitiveContentResponsePrimitive(template ResponsePrimitive p_responsePrimitive) := {
+		template (value) PrimitiveContent m_primitiveContentResponsePrimitive(template (value) ResponsePrimitive p_responsePrimitive) := {
 			responsePrimitive := p_responsePrimitive
 		}		
-				
-		template PrimitiveContent m_primitiveContentTimeSeries(template TimeSeries_optional p_timeSeries) := {
+		
+		template (value) PrimitiveContent m_primitiveContentTimeSeries(template (value) TimeSeries_optional p_timeSeries) := {
 			timeSeries := p_timeSeries
 		}
 		
-		template PrimitiveContent m_primitiveContentTimeSeriesInstance(template TimeSeriesInstance_optional p_timeSeriesInstance) := {
+		template (value) PrimitiveContent m_primitiveContentTimeSeriesInstance(template (value) TimeSeriesInstance_optional p_timeSeriesInstance) := {
 			timeSeriesInstance := p_timeSeriesInstance
 		}
 
-		template (value) PrimitiveContent m_primitiveContentGroup(template Group_optional p_group) := {
-			group_ := valueof(p_group)
+		template (value) PrimitiveContent m_primitiveContentSemanticDescriptor(template (value) SemanticDescriptor_optional p_SemanticDescriptor) := {
+			semanticDescriptor := p_SemanticDescriptor
+		}
+		
+		template (value) PrimitiveContent m_primitiveContentSemanticMashupInstance(template (value) SemanticMashupInstance_optional p_semanticMashupInstance) := {
+			semanticMashupInstance := p_semanticMashupInstance
+		}
+				
+		template (value) PrimitiveContent m_primitiveContentGroup(template (value) Group_optional p_group) := {
+			group_ := p_group
 		}
 				
 		template PrimitiveContent mw_primitiveContent := ?;
@@ -2344,7 +2477,7 @@ module OneM2M_Templates {
     	 * @param p_name Resource name
     	 * @param p_accessControlPolicyIds ACP IDs for the AE
     	 */
-    	template (value) AE_optional m_contentCreateAe (in template (omit) AcpType p_accessControlPolicyIds, in template (omit)  XSD.String p_name := c_defaultAeResourceName, in template XSD.ID p_appId := PX_TS_AE1.appId, in template (omit) PoaList p_poaList) := {
+    	template (value) AE_optional m_contentCreateAe (in template (omit) AcpType p_accessControlPolicyIds, in template (omit)  XSD.String p_name := c_defaultAeResourceName, in XSD.ID p_appId := PX_TS_AE1.appId, in template (omit) PoaList p_poaList) := {
 
 			resourceName := p_name,//O
 			resourceType := omit,//NP
@@ -2410,7 +2543,7 @@ module OneM2M_Templates {
 			sessionCapabilities := *, //O
 			triggerEnable := *, //O
 			activityPatternElements := *, //O
-    		choice := *//NP
+			choice := *//NP
     	};	
     	
     	/**
@@ -2650,7 +2783,8 @@ module OneM2M_Templates {
     															in template (omit) MemberType p_memberType := omit,
     															in template (omit) ConsistencyStrategy p_consistencyStrategy := omit,
     															in template (omit) ListOfURIs p_membersAccessControlPolicyIDs := omit,
-																in template (omit) XSD.String p_name := c_defaultGroupResourceName) := {
+																in template (omit) XSD.String p_name := c_defaultGroupResourceName,
+																in template (omit) XSD.Boolean p_semanticSupportIndicator := true) := {
 			resourceName := p_name,//O
 			resourceType := omit,//NP
 			resourceID := omit,//NP
@@ -3093,6 +3227,263 @@ module OneM2M_Templates {
 			choice := omit//NP
     	};   	
     	
+    			
+		template (value) OntologyRepository_optional m_contentCreateOntologyRepository := {
+			resourceName := omit,	//O
+			resourceType := omit,	//NP
+			resourceID := omit,	//NP
+			parentID := omit,	//NP
+			accessControlPolicyIDs := omit,	//O
+			creationTime := omit,	//NP
+			expirationTime := omit,	//O
+			lastModifiedTime := omit,	//NP
+			labels := omit,	//O
+			announceTo := omit,	//O
+			announcedAttribute := omit,	//O
+			dynamicAuthorizationConsultationIDs := omit,	//O
+			creator := omit,	//O
+			stateTag := omit,	//NP
+			choice := omit	//NP
+		};
+		
+		template (value) Ontology_optional m_contentCreateOntology(SemanticFormat p_ontologyFormat := int1, 
+                                                           // TO DO: May have to URI encode it
+		                                                   XSD.AnySimpleType p_ontologyContent := "https://git.onem2m.org/MAS/BaseOntology/raw/3_6_0/base_ontology.owl") := {
+			resourceName := omit, //O
+			resourceType := omit,	//NP
+			resourceID := omit,	//NP
+			parentID := omit,	//NP
+			accessControlPolicyIDs := omit,	//O
+			creationTime := omit, //NP
+			expirationTime := omit, //O
+			lastModifiedTime := omit, //NP
+			labels := omit,	//O
+			announceTo := omit,	//O
+			announcedAttribute := omit,	//O
+			dynamicAuthorizationConsultationIDs := omit, //O
+			creator := omit,	//O
+            description := omit, //O
+            ontologyFormat := p_ontologyFormat, //M
+            ontologyContent := p_ontologyContent, //M
+            semanticOpExec := omit, //O
+            choice := omit//O
+		};
+
+    			
+    	/**
+		 * @desc 	Base primitiveContent for CREATE operation for SemanticDescriptor resource
+		 */
+		template (value) SemanticDescriptor_optional m_contentCreateSemanticDescriptor := {			
+			resourceName := omit,                              //O
+			resourceType := omit,                           //NP
+			resourceID := omit,                             //NP
+			parentID := omit,                               //NP
+			accessControlPolicyIDs := omit,                 //O
+			creationTime := omit,                           //NP
+			expirationTime := omit,                         //O
+			lastModifiedTime := omit,                       //NP
+			labels := omit,                                 //O
+			announceTo := omit,                             //O
+			announcedAttribute := omit,                     //O
+			dynamicAuthorizationConsultationIDs := omit,    //O
+			creator := omit,                                //O
+			descriptorRepresentation := omit,               //M
+			semanticOpExec := omit,                         //NP
+			descriptor := omit,                             //M
+			ontologyRef := omit,                            //O
+			relatedSemantics := omit,                       //O
+			semanticValidated := omit,                      //NP
+			validationEnable := omit,                       //O
+			choice := omit//O
+		} 
+		
+		/**
+		 * @desc Base reception template primitiveContent for CREATE operation for SemanticDescriptor resource
+		 * @param NULL
+		 */	
+		template SemanticDescriptor_optional mw_contentCreateSemanticDescriptor := {			
+			resourceName := *,                              //O
+			resourceType := omit,                           //NP
+			resourceID := omit,                             //NP
+			parentID := omit,                               //NP
+			accessControlPolicyIDs := *,                 //O
+			creationTime := omit,                           //NP
+			expirationTime := *,                         //O
+			lastModifiedTime := omit,                       //NP
+			labels := *,                                 //O
+			announceTo := *,                             //O
+			announcedAttribute := *,                     //O
+			dynamicAuthorizationConsultationIDs := *,    //O
+			creator := *,                                //O
+			descriptorRepresentation := ?,               //M
+			semanticOpExec := omit,                         //NP
+			descriptor := ?,                             //M
+			ontologyRef := *,                            //O
+			relatedSemantics := *,                       //O
+			semanticValidated := omit,                      //NP
+			validationEnable := *,                       //O
+			choice := *//O
+		} 		
+    	
+    	/**
+    	 * @desc Base primitiveContent for CREATE operation for SemanticMashupJobProfile resource
+    	 * @param TODO 
+    	 * @param TODO
+    	 */   	
+		template SemanticMashupJobProfile_optional m_contentCreateSemanticMashupJobProfile (in template (value) Sparql p_memberFilter,
+		                                                                                    in template (value) XSD.Base64Binary p_outputDescriptor, 
+		                                                                                    in template (value) XSD.Base64Binary p_functionDescriptor)  := {		
+			resourceName := omit,	//O
+			resourceType := omit,	//NP
+			resourceID := omit,	//NP
+			parentID := omit,	//NP
+			creationTime := omit,	//NP
+			lastModifiedTime := omit,	//NP
+			labels := omit,	//O
+			accessControlPolicyIDs := omit,	//O
+			expirationTime := omit,	//O
+			dynamicAuthorizationConsultationIDs := omit,	//O
+			announceTo := omit,	//O
+			announcedAttribute := omit,	//O
+			creator := omit,	//O
+			memberFilter := p_memberFilter,	//M
+			smiID := omit,	//O
+			inputDescriptor := omit,	//O
+			outputDescriptor := p_outputDescriptor,	//M
+			functionDescriptor := p_functionDescriptor	//M
+		}
+		
+		/**
+		 * @desc Base reception template primitiveContent for CREATE operation for SemanticMashupJobProfile resource
+		 * @param NULL
+		 */			
+		template SemanticMashupJobProfile_optional mw_contentCreateSemanticMashupJobProfileBase  := {		
+			resourceName := *,	//O
+			resourceType := omit,	//NP
+			resourceID := omit,	//NP
+			parentID := omit,	//NP
+			creationTime := omit,	//NP
+			lastModifiedTime := omit,	//NP
+			labels := *,	//O
+			accessControlPolicyIDs := *,	//O
+			expirationTime := *,	//O
+			dynamicAuthorizationConsultationIDs := *,	//O
+			announceTo := *,	//O
+			announcedAttribute := *,	//O
+			creator := *,	//O
+			memberFilter := ?,	//M
+			smiID := *,	//O
+			inputDescriptor := *,	//O
+			outputDescriptor := ?,	//M
+			functionDescriptor := ?	//M
+		}
+    	
+    	
+    	
+    	/**
+    	 * @desc Base primitiveContent for CREATE operation for SemanticMashupInstance resource
+    	 */    	
+  		template SemanticMashupInstance_optional m_contentCreateSemanticMashupInstance (in XSD.AnyURI p_smjpID,
+		                                                                                in XSD.Base64Binary p_smjpInputParameter,
+		                                                                                in MashupMemberStoreType p_memberStoreType,
+		                                                                                in MashupResultGenType p_mashupMember)  := {
+  			resourceName := omit,	//O
+			resourceType := omit,	//NP
+			resourceID := omit,	//NP
+			parentID := omit,	//NP
+			creationTime := omit,	//NP
+			lastModifiedTime := omit,	//NP
+			labels := omit,	//O
+			accessControlPolicyIDs := omit,	//O
+			expirationTime := omit,	//O
+			dynamicAuthorizationConsultationIDs := omit,	//O
+			announceTo := omit,	//O
+			announcedAttribute := omit,	//O
+			creator := omit,	//O
+			smjpID := p_smjpID,	//M
+			smjpInputParameter := p_smjpInputParameter,	//M
+			memberStoreType := p_memberStoreType,	//M
+			mashupMember := omit,	//O
+			resultGenType := p_mashupMember,   //M
+			periodForResultGen := omit	//O
+		}   	
+    	
+		/**
+		 * @desc Base reception template primitiveContent for CREATE operation for SemanticMashupInstance resource
+		 * @param NULL
+		 */    	
+  		template SemanticMashupInstance_optional mw_contentCreateSemanticMashupInstanceBase  := {
+  			resourceName := *,	//O
+			resourceType := omit,	//NP
+			resourceID := omit,	//NP
+			parentID := omit,	//NP
+			creationTime := omit,	//NP
+			lastModifiedTime := omit,	//NP
+			labels := *,	//O
+			accessControlPolicyIDs := *,	//O
+			expirationTime := *,	//O
+			dynamicAuthorizationConsultationIDs := *,	//O
+			announceTo := *,	//O
+			announcedAttribute := *,	//O
+			creator := *,	//O
+			smjpID := ?,	//M
+			smjpInputParameter := ?,	//M
+			memberStoreType := ?,	//M
+			mashupMember := *,	//O
+			resultGenType := ?,	//M
+			periodForResultGen := *	//O
+		}   	
+
+
+    	
+		/**
+		 * @desc Base primitiveContent for CREATE operation for SemanticMashupResult resource
+		 * @param TODO 
+		 * @param TODO
+		 */    	
+		template (value) SemanticMashupResult_optional m_contentCreateSemanticMashupResult  := {    	
+			resourceName := omit,	//NP
+			resourceType := omit,	//NP
+			resourceID := omit,	//NP
+			parentID := omit,	//NP
+			creationTime := omit,	//NP
+			lastModifiedTime := omit,	//NP
+			labels := omit,	//NP
+			accessControlPolicyIDs := omit,	//NP
+			expirationTime := omit,	//NP
+			dynamicAuthorizationConsultationIDs := omit,	//NP
+			announceTo := omit,	//NP
+			announcedAttribute := omit,	//NP
+			creator := omit,	//NP
+			smjpInputParameter := omit,	//NP
+			mashupResultFormat := omit,	//NP
+			mashupResult := omit	//NP
+		}
+		
+		/**
+		 * @desc Base reception template primitiveContent for CREATE operation for SemanticMashupResult resource
+		 * @param NULL
+		 */		
+		template SemanticMashupResult_optional mw_contentCreateSemanticMashupResultBase  := {    	
+			resourceName := omit,	//NP
+			resourceType := omit,	//NP
+			resourceID := omit,	//NP
+			parentID := omit,	//NP
+			creationTime := omit,	//NP
+			lastModifiedTime := omit,	//NP
+			labels := omit,	//NP
+			accessControlPolicyIDs := omit,	//NP
+			expirationTime := omit,	//NP
+			dynamicAuthorizationConsultationIDs := omit,	//NP
+			announceTo := omit,	//NP
+			announcedAttribute := omit,	//NP
+			creator := omit,	//NP
+			smjpInputParameter := omit,	//NP
+			mashupResultFormat := omit,	//NP
+			mashupResult := omit	//NP
+		}
+		
+		
 		/**
 		 * @desc Base reception template primitiveContent for CREATE operation for Subscription resource
 		 * @param p_notificationURI Notification URI
@@ -3301,16 +3692,16 @@ module OneM2M_Templates {
 		 * @param p_name Resource name
 		 */
 		template (value) DynamicAuthorizationConsultation_optional m_contentDynamicAuthorizationConsultation (in template (value) XSD.Boolean p_dyn_auth_enabled, in template (omit) XSD.String p_name := c_dynamicAuthorizationConsultationName):= {
-			resourceName := p_name, //O
-			resourceType := omit, //NP
-			resourceID := omit, //NP
-			parentID := omit, //NP
-			creationTime := omit, //NP
-			lastModifiedTime := omit, //NP
+			resourceName := p_name,//O
+			resourceType := omit,//NP
+			resourceID := omit,//NP
+			parentID := omit,//NP
+			creationTime := omit,//NP
+			lastModifiedTime := omit,//NP
 			labels := omit,//O
 			accessControlPolicyIDs := omit,//O
 			expirationTime := omit,//O
-			dynamicAuthorizationConsultationIDs := omit,//O
+			dynamicAuthorizationConsultationIDs := omit, //O
 			dynamicAuthorizationEnabled := p_dyn_auth_enabled,//M
 			dynamicAuthorizationPoA := omit,//O
 			dynamicAuthorizationLifetime := omit,//O	
@@ -3517,7 +3908,7 @@ module OneM2M_Templates {
 			activityPatternElements := omit,//O
 			choice := omit//O
 		};
-
+		
 		/**
 		 * @desc Base primitiveContent for CREATE operation for RemoteCSEAnnc resource
 		 * @param p_name Resource name
@@ -3564,7 +3955,7 @@ module OneM2M_Templates {
 			labels := *,//MA O
 			accessControlPolicyIDs := ?,//MA O
 			expirationTime := ?,//MA M
-			link := ?,//M
+			link := ?, //M
 			dynamicAuthorizationConsultationIDs := *,//OA O
 			stateTag := *,//OA M
 			maxNrOfInstances := *,//OA O
@@ -3695,40 +4086,13 @@ module OneM2M_Templates {
 		  trackingID2 := omit
     	};
     			
-		/**
-		 * @desc 	Base primitiveContent for CREATE operation for SemanticDescriptor resource
-		 */
-		template SemanticDescriptor_optional mw_contentCreateSemanticDescriptor := {			
-			resourceName := *,                              //O
-			resourceType := omit,                           //NP
-			resourceID := omit,                             //NP
-			parentID := omit,                               //NP
-			creationTime := omit,                           //NP
-			lastModifiedTime := omit,                       //NP
-			labels := *,                                    //O
-			accessControlPolicyIDs := *,                    //O
-			expirationTime := *,                            //O
-			dynamicAuthorizationConsultationIDs := *,       //?
-			announceTo := *,                                //O
-			announcedAttribute := *,                        //O
-			creator := *,                                   //O
-			descriptorRepresentation := ?,                  //M
-			semanticOpExec := omit,                         //NP
-			descriptor := ?,                                //M
-			ontologyRef := *,                               //O
-			relatedSemantics := *,                          //O
-			semanticValidated := *,                         //O
-			validationEnable := *,                          //O
-			choice := *                                     //?
-		} 
-		
 		/**
 		 * @desc  primitiveContent for CREATE operation for SemanticDescriptor resource, with specific OntologyRef
 		 * @param p_ontologyRef  Expected OntologyRef value
 		 */
-		template SemanticDescriptor_optional mw_contentCreateSemanticDescriptor_ontologyRef(template XSD.AnyURI p_ontologyRef) modifies mw_contentCreateSemanticDescriptor := {
-			ontologyRef := p_ontologyRef
-		}  
+		//template SemanticDescriptor_optional mw_contentCreateSemanticDescriptor_ontologyRef(template XSD.AnyURI p_ontologyRef) modifies mw_contentCreateSemanticDescriptor := {
+		//	ontologyRef := p_ontologyRef
+		//}  
 		
 		/**
 			 * @desc Base primitiveContent for CREATE operation for StatConfig resource
@@ -3834,6 +4198,9 @@ module OneM2M_Templates {
 			choice 					:= omit //O
 		};
 		
+		
+		
+		
 		/**
 		 * @desc Base primitiveContent for CREATE operation for timeSeries resource 
 		 * @param p_name Resource name
@@ -4080,7 +4447,7 @@ module OneM2M_Templates {
 			contentSize  := omit,//NP
 			choice := omit//NP
 		};
-		
+
 		/**
 		 * @desc Base primitiveContent for CREATE operation for TimeSeriesInstanceAnnc resource
 		 * @param p_name Resource name
@@ -4106,7 +4473,7 @@ module OneM2M_Templates {
 			number := p_number,
 			duration := p_duration
 		};
-		
+	
 		/**
 		 * @desc Base primitiveContent for CREATE operation for Role resource
 		 * @param p_name Resource name
@@ -5328,6 +5695,34 @@ module OneM2M_Templates {
 		  	choice := omit
 		};	
 		
+    			
+		/**
+		 * @desc 	Base primitiveContent for UPDATE operation for SemanticDescriptor resource
+		 */
+		template (value) SemanticDescriptor_optional m_contentUpdateSemanticDescriptor := {			
+			resourceName := omit,                              //O
+			resourceType := omit,                           //NP
+			resourceID := omit,                             //NP
+			parentID := omit,                               //NP
+			accessControlPolicyIDs := omit,                 //O
+			creationTime := omit,                           //NP
+			expirationTime := omit,                         //O
+			lastModifiedTime := omit,                       //NP
+			labels := omit,                                 //O
+			announceTo := omit,                             //O
+			announcedAttribute := omit,                     //O
+			dynamicAuthorizationConsultationIDs := omit,    //O
+			creator := omit,                                //O
+			descriptorRepresentation := omit,               //M
+			semanticOpExec := omit,                         //NP
+			descriptor := omit,                             //M
+			ontologyRef := omit,                            //O
+			relatedSemantics := omit,                       //O
+			semanticValidated := omit,                      //NP
+			validationEnable := omit,                       //O
+			choice := omit//O
+		} 
+		
 		/**
 		 * @desc Base primitiveContent for UPDATE operation for TimeSeries resource
 		 */
@@ -5405,8 +5800,54 @@ module OneM2M_Templates {
 			tokenLink := omit,
 			choice := omit
 		};
+		/**
+		 * @desc Base primitiveContent for CREATE operation for SemanticMashupJobProfile resource
+		 */   	
+		template (value) SemanticMashupJobProfile_optional m_contentUpdateSemanticMashupJobProfile := {		
+			resourceName := omit,	//O
+			resourceType := omit,	//NP
+			resourceID := omit,	//NP
+			parentID := omit,	//NP
+			creationTime := omit,	//NP
+			lastModifiedTime := omit,	//NP
+			labels := omit,	//O
+			accessControlPolicyIDs := omit,	//O
+			expirationTime := omit,	//O
+			dynamicAuthorizationConsultationIDs := omit,	//O
+			announceTo := omit,	//O
+			announcedAttribute := omit,	//O
+			creator := omit,	//O
+			memberFilter := omit,	//M
+			smiID := omit,	//O
+			inputDescriptor := omit,	//O
+			outputDescriptor := omit,	//O
+			functionDescriptor := omit	//O
+		}
 		
- 		
+		/**
+		 * @desc Base primitiveContent for CREATE operation for SemanticMashupInstance resource
+		 */    	
+		template (value) SemanticMashupInstance_optional m_contentUpdateSemanticMashupInstance := {
+			resourceName := omit,	//O
+			resourceType := omit,	//NP
+			resourceID := omit,	//NP
+			parentID := omit,	//NP
+			creationTime := omit,	//NP
+			lastModifiedTime := omit,	//NP
+			labels := omit,	//O
+			accessControlPolicyIDs := omit,	//O
+			expirationTime := omit,	//O
+			dynamicAuthorizationConsultationIDs := omit,	//O
+			announceTo := omit,	//O
+			announcedAttribute := omit,	//O
+			creator := omit,	//O
+			smjpID := omit,	//O
+			smjpInputParameter := omit,	//O
+			memberStoreType := omit,	//O
+			mashupMember := omit,	//O
+			resultGenType := omit,   //O
+			periodForResultGen := omit	//O
+		} 
 	}//end group ContentUpdate
 	
 	group ContentRetrieve {
@@ -6230,6 +6671,38 @@ module OneM2M_Templates {
 			choice := omit//M
 		}
 		
+		//Ontology Repository Internal resource at CSE as per TS-001
+		template SemanticMashupInstance_optional m_contentSemanticMashupInstance (XSD.ID resourceID := "NotInitialized",
+																				  ResourceName p_resourceName := "NotInitialized",
+																				  NhURI p_parentID := "NotInitialized",
+																				  Timestamp p_expirationTime := "20301231T012345",
+																				  Timestamp p_creationTime := "21001231T012345",
+																				  Timestamp p_lastModifiedTime := "21001231T012345",
+																				  XSD.AnyURI p_smjpID := "NotInitialized",
+		                                                                          MashupMemberStoreType p_memberStoreType := int1,
+																				  MashupResultGenType p_resultGenType := int1 ) := {  //when SMI is created
+
+			resourceType := int41, //M
+			resourceID := omit, //M
+			resourceName := p_resourceName, //M
+			parentID := p_parentID, //M
+			expirationTime := p_expirationTime, //M
+			accessControlPolicyIDs := omit, //O
+			labels := omit, //O
+			creationTime := p_creationTime, //M
+			lastModifiedTime := p_lastModifiedTime, //M
+			announceTo := omit, //O
+			announcedAttribute := omit, //O
+			creator := omit, //O
+			dynamicAuthorizationConsultationIDs := omit, //O
+			smjpID := p_smjpID, //M
+			smjpInputParameter := omit,//O
+			memberStoreType := p_memberStoreType, //M
+			mashupMember := omit, //O
+			resultGenType := p_resultGenType, //M
+			periodForResultGen :=  omit//O
+		};
+		
 		template (value) StatsConfig_optional m_contentStatsConfig_allOmit := {
 			resourceName := omit,//M
 			resourceType := omit,//M
@@ -6832,7 +7305,7 @@ module OneM2M_Templates {
 		template TimeSeries_optional mw_contentTimeSeries_rc8 modifies mw_contentTimeSeries_allOmit := {
 			choice := {choice_list := ?}	//O
 		}
-		
+
 		template TimeSeriesInstance_optional mw_contentTimeSeriesInstanceBase := {
 			resourceName := ?,//M
 			resourceType := ?,//M
@@ -6850,7 +7323,7 @@ module OneM2M_Templates {
 			contentSize  := ?,//M
 			choice := *//O
 		};
-		
+
 		template (value) Role_optional mw_contentRole_allOmit := {
 			resourceName := omit,//O
 			resourceType := omit,//NP
@@ -6896,7 +7369,7 @@ module OneM2M_Templates {
 			extension_ := omit,//O
 			choice := omit//O
 		}
-		template FlexContainerResource_optional m_contentFlexContainer_allOmit := {
+		template (value) FlexContainerResource_optional m_contentFlexContainer_allOmit := {
 			resourceName := omit,//O
 			resourceType := omit,//NP
 			resourceID := omit,//NP
@@ -6917,7 +7390,7 @@ module OneM2M_Templates {
 			nodeLink := omit //O
 		}
 		
-		template DeviceAirConditioner_optional m_contentDeviceAirConditioner_allOmit := {
+		template (value) DeviceAirConditioner_optional m_contentDeviceAirConditioner_allOmit := {
 			resourceName := omit,//O
 			resourceType := omit,//NP
 			resourceID := omit,//NP
@@ -6939,7 +7412,7 @@ module OneM2M_Templates {
 			choice := omit //NP
 		}
 		
-		template DeviceClothesWasherDryer_optional m_contentDeviceClothesWasherDryer_allOmit := {
+		template (value) DeviceClothesWasherDryer_optional m_contentDeviceClothesWasherDryer_allOmit := {
 			resourceName := omit,//O
 			resourceType := omit,//NP
 			resourceID := omit,//NP
@@ -6961,7 +7434,7 @@ module OneM2M_Templates {
 			choice := omit //NP
 		}
 		
-		template DeviceElectricVehicleCharger_optional m_contentDeviceElectricVehicleCharger_allOmit := {
+		template (value) DeviceElectricVehicleCharger_optional m_contentDeviceElectricVehicleCharger_allOmit := {
 			resourceName := omit,//O
 			resourceType := omit,//NP
 			resourceID := omit,//NP
@@ -6983,7 +7456,7 @@ module OneM2M_Templates {
 			choice := omit //NP
 		}
 		
-		template DeviceLight_optional m_contentDeviceLight_allOmit := {
+		template (value) DeviceLight_optional m_contentDeviceLight_allOmit := {
 			resourceName := omit,//O
 			resourceType := omit,//NP
 			resourceID := omit,//NP
@@ -7005,7 +7478,7 @@ module OneM2M_Templates {
 			choice := omit //NP
 		}
 		
-		template DeviceMicrogeneration_optional m_contentDeviceMicrogeneration_allOmit := {
+		template (value) DeviceMicrogeneration_optional m_contentDeviceMicrogeneration_allOmit := {
 			resourceName := omit,//O
 			resourceType := omit,//NP
 			resourceID := omit,//NP
@@ -7027,7 +7500,7 @@ module OneM2M_Templates {
 			choice := omit //NP
 		}
 		
-		template DeviceOven_optional m_contentDeviceOven_allOmit := {
+		template (value) DeviceOven_optional m_contentDeviceOven_allOmit := {
 			resourceName := omit,//O
 			resourceType := omit,//NP
 			resourceID := omit,//NP
@@ -7049,7 +7522,7 @@ module OneM2M_Templates {
 			choice := omit //NP
 		}
 		
-		template DeviceRefrigerator_optional m_contentDeviceRefrigerator_allOmit := {
+		template (value) DeviceRefrigerator_optional m_contentDeviceRefrigerator_allOmit := {
 			resourceName := omit,//O
 			resourceType := omit,//NP
 			resourceID := omit,//NP
@@ -7071,7 +7544,7 @@ module OneM2M_Templates {
 			choice := omit //NP
 		}
 		
-		template DeviceRobotCleaner_optional m_contentDeviceRobotCleaner_allOmit := {
+		template (value) DeviceRobotCleaner_optional m_contentDeviceRobotCleaner_allOmit := {
 			resourceName := omit,//O
 			resourceType := omit,//NP
 			resourceID := omit,//NP
@@ -7093,7 +7566,7 @@ module OneM2M_Templates {
 			choice := omit //NP
 		}
 		
-		template DeviceSmartElectricMeter_optional m_contentDeviceSmartElectricMeter_allOmit := {
+		template (value) DeviceSmartElectricMeter_optional m_contentDeviceSmartElectricMeter_allOmit := {
 			resourceName := omit,//O
 			resourceType := omit,//NP
 			resourceID := omit,//NP
@@ -7115,7 +7588,7 @@ module OneM2M_Templates {
 			choice := omit //NP
 		}
 		
-		template DeviceStorageBattery_optional m_contentDeviceStorageBattery_allOmit := {
+		template (value) DeviceStorageBattery_optional m_contentDeviceStorageBattery_allOmit := {
 			resourceName := omit,//O
 			resourceType := omit,//NP
 			resourceID := omit,//NP
@@ -7137,7 +7610,7 @@ module OneM2M_Templates {
 			choice := omit //NP
 		}
 		
-		template DeviceTelevision_optional m_contentDeviceTelevision_allOmit := {
+		template (value) DeviceTelevision_optional m_contentDeviceTelevision_allOmit := {
 			resourceName := omit,//O
 			resourceType := omit,//NP
 			resourceID := omit,//NP
@@ -7159,7 +7632,7 @@ module OneM2M_Templates {
 			choice := omit //NP
 		}
 		
-		template DeviceThermostat_optional m_contentDeviceThermostat_allOmit := {
+		template (value) DeviceThermostat_optional m_contentDeviceThermostat_allOmit := {
 			resourceName := omit,//O
 			resourceType := omit,//NP
 			resourceID := omit,//NP
@@ -7181,7 +7654,7 @@ module OneM2M_Templates {
 			choice := omit //NP
 		}
 		
-		template DeviceWaterHeater_optional m_contentDeviceWaterHeater_allOmit := {
+		template (value) DeviceWaterHeater_optional m_contentDeviceWaterHeater_allOmit := {
 			resourceName := omit,//O
 			resourceType := omit,//NP
 			resourceID := omit,//NP
@@ -7678,6 +8151,80 @@ module OneM2M_Templates {
 			vendorInformation := *
 		};
 		
+		/**
+		 * @desc Base primitiveContent for RETRIEVE operation for SemanticMashupResult resource
+		 */
+		template SemanticMashupResult_optional mw_retrievSemanticMashupResult :=
+		{
+			resourceName := ?,
+			resourceType := int42,
+			resourceID := ?,
+			parentID := ?,
+			creationTime := ?,
+			lastModifiedTime := ?,
+			labels := *,
+			accessControlPolicyIDs := *,
+			expirationTime := ?,
+			dynamicAuthorizationConsultationIDs := *,
+			announceTo := *,
+			announcedAttribute := *,
+			creator := *,
+			smjpInputParameter := *,
+			mashupResultFormat := ?,
+			mashupResult := ?
+		}
+			
+		/**
+		 * @desc Base primitiveContent for RETRIEVE operation for SemanticMashupInstance resource
+		 */
+		template SemanticMashupInstance_optional mw_retrievSemanticMashupInstance :=
+		{
+			resourceName := ?,
+			resourceType := int41,
+			resourceID := ?,
+			parentID := ?,
+			creationTime := ?,
+			lastModifiedTime := ?,
+			labels := *,
+			accessControlPolicyIDs := *,
+			expirationTime := ?,
+			dynamicAuthorizationConsultationIDs := *,
+			announceTo := *,
+			announcedAttribute := *,
+			creator := *,
+			smjpID := ?,
+			smjpInputParameter := *,
+			memberStoreType := ?,
+			mashupMember := *,
+			resultGenType := ?,
+			periodForResultGen := *
+		}
+			
+		/**
+		 * @desc Base primitiveContent for RETRIEVE operation for SemanticMashupJobProfile resource
+		 */
+		template SemanticMashupJobProfile_optional mw_retrievSemanticMashupJobProfile :=
+		{
+			resourceName := ?,
+			resourceType := int40,
+			resourceID := ?,
+			parentID := ?,
+			creationTime := ?,
+			lastModifiedTime := ?,
+			labels := *,
+			accessControlPolicyIDs := *,
+			expirationTime := ?,
+			dynamicAuthorizationConsultationIDs := *,
+			announceTo := *,
+			announcedAttribute := *,
+			creator := *,
+			memberFilter := ?,
+			smiID := *,
+			inputDescriptor := *,
+			outputDescriptor := ?,
+			functionDescriptor := ?
+		}
+    	
 		template ResponsePrimitive mw_responseNotifySecurityInfo(ResponseStatusCode p_statusCode, template SecurityInfo p_securityInfo) := {
 			responseStatusCode := p_statusCode,
 			requestIdentifier := ?,
@@ -8001,9 +8548,9 @@ module OneM2M_Templates {
 				requestIdentifier := testcasename() & "-m_utCreateRole" & f_rnd(1, 1000000),
 				resourceType := int31,
 				primitiveContent := {role := valueof(mw_contentRole_allOmit)}
-			}
+	 }	
 		}
-		
+	
 		template (value) UtTriggerPrimitive m_utCreateToken modifies m_utCreate := {
 			requestPrimitive := {
 				requestIdentifier := testcasename() & "-m_utCreateToken" & f_rnd(1, 1000000),
diff --git a/LibOneM2M/OneM2M_Types.ttcn b/LibOneM2M/OneM2M_Types.ttcn
index 4d5df9c460ef997820e93f4f05d24e15240d3285..3c7cff7f7dfcd78609129a7864c8ebb4dc08d0e6 100644
--- a/LibOneM2M/OneM2M_Types.ttcn
+++ b/LibOneM2M/OneM2M_Types.ttcn
@@ -8303,8 +8303,8 @@ with {
   variant (choice.choice_list[-]) "untagged";
 };
 
-}
-with {
+	}
+	with {
   encode "XML";
   //variant "namespace as 'http://www.onem2m.org/xml/protocols' prefix 'm2m'";
   //variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'";
diff --git a/LibOneM2M/OneM2M_TypesAndValues.ttcn b/LibOneM2M/OneM2M_TypesAndValues.ttcn
index d3acc84ff4d8024a2f216aa09622e59397a607dc..c4fdaae74362dd86fc2b4a8e09c1b35aa84d6fe5 100644
--- a/LibOneM2M/OneM2M_TypesAndValues.ttcn
+++ b/LibOneM2M/OneM2M_TypesAndValues.ttcn
@@ -16,48 +16,52 @@ module OneM2M_TypesAndValues {
 	import from OneM2M_Types_homeDevice all;
 
 	group ResourceNames {
-	/* Constants */	
-	const XSD.String c_defaultResourceName := "MyResource";
-	const XSD.String c_defaultGroupResourceName := "MyGroupResource";
-	const XSD.String c_defaultGroupAnncResourceName := "MyGroupAnncResource";
-	const XSD.String c_defaultAccessControlPolicyResourceName := "MyAccessControlPolicyResource";
-	const XSD.String c_defaultAccessControlPolicyAnncResourceName := "MyAccessControlPolicyAnncResource";
-	const XSD.String c_defaultScheduleResourceName := "MyScheduleResource";
-	const XSD.String c_defaultPollingChannelResourceName := "MyPollingChannelResource";
-	const XSD.String c_defaultSubscriptionResourceName := "MySubscriptionResource";
-	const XSD.String c_defaultContentInstanceResourceName := "MyContentInstanceResource";
-	const XSD.String c_defaultContainerResourceName := "MyContainerResource";
-	const XSD.String c_defaultContainerAnncResourceName := "MyContainerAnncResource";
-	const XSD.String c_defaultDeliveryResourceName := "MyDeliveryResource";
-	const XSD.String c_defaultRemoteCSEResourceName := "MyRemoteCSEResource";
-	const XSD.String c_defaultRemoteCSEAnncResourceName := "MyRemoteCSEAnncResource";
-	const XSD.String c_defaultMgmtObjResourceName := "MyMgmtObjResource";
-	const XSD.String c_defaultMgmtCmdResourceName := "MyMgmtCmdResource";
-	const XSD.String c_defaultAeResourceName := "MyAeResource";
-	const XSD.String c_defaultLocationPolicyResourceName := "MyLocationPolicyResource";
-	const XSD.String c_defaultNodeResourceName := "MyNodeResource";
-	const XSD.String c_defaultNodeID := "MyNodeId";
-	const XSD.String c_defaultRequestResourceName := "MyRequestResource";
-	const XSD.String c_dynamicAuthorizationConsultationName := "MyDynamicAuthorizationConsultation";
-	const XSD.String c_defaultStatsConfigResourceName := "MyStatsConfigResource";
-	const XSD.String c_defaultStatsCollectResourceName := "MyStatsCollectResource";
-	const XSD.String c_defaultm2mServiceSubscriptionProfileResourceName := "Mym2mServiceSubscriptionProfileResource";
-	const XSD.String c_defaultServiceSubscribedAppRuleResourceName := "MyServiceSubscribedAppRuleResource";
-	const XSD.String c_defaultTimeSeriesResourceName := "MyTimeSeriesResource";
-	const XSD.String c_defaultTimeSeriesAnncResourceName := "MyTimeSeriesAnncResource";
-	const XSD.String c_defaultTimeSeriesInstanceResourceName := "MyTimeSeriesInstanceResource";
-	const XSD.String c_defaultTimeSeriesInstanceAnncResourceName := "MyTimeSeriesInstanceAnncResource";
-	const XSD.String c_defaultRoleResourceName := "MyRoleResource";
-	const XSD.String c_defaultTokenResourceName := "MyTokenResource";
-	const XSD.String c_defaultGenericInterworkingServiceResourceName := "MyGenericInterworkingServiceResource"; //<genericInterworkingService>
-	const XSD.ID c_aeAuxName := "MyAe";
-	const XSD.String c_defaultAE2Name := "MyAe2";
-	const XSD.String c_acpAuxName := "MyAcp";
-	const charstring c_invalid_location_update_period	:= "-PT30M10S" ;//duration set to invalid value  (minus value)
-	const XSD.ID c_resourceShortNameLatest := "la";		//<latest>
-	const XSD.ID c_resourceShortNameOldest := "ol";		//<oldest>
-	const XSD.ID c_resourceShortNameFanOutPoint := "fopt"; //<fanOutPoint>
-	const XSD.ID c_resourceShortNamePollingChannelUri := "pcu"; //<pollingChannelUri>
+		/* Constants */	
+		const XSD.String c_defaultResourceName := "MyResource";
+		const XSD.String c_defaultGroupResourceName := "MyGroupResource";
+		const XSD.String c_defaultGroupAnncResourceName := "MyGroupAnncResource";
+		const XSD.String c_defaultAccessControlPolicyResourceName := "MyAccessControlPolicyResource";
+		const XSD.String c_defaultAccessControlPolicyAnncResourceName := "MyAccessControlPolicyAnncResource";
+		const XSD.String c_defaultScheduleResourceName := "MyScheduleResource";
+		const XSD.String c_defaultPollingChannelResourceName := "MyPollingChannelResource";
+		const XSD.String c_defaultSubscriptionResourceName := "MySubscriptionResource";
+		const XSD.String c_defaultContentInstanceResourceName := "MyContentInstanceResource";
+		const XSD.String c_defaultContainerResourceName := "MyContainerResource";
+		const XSD.String c_defaultContainerAnncResourceName := "MyContainerAnncResource";
+		const XSD.String c_defaultDeliveryResourceName := "MyDeliveryResource";
+		const XSD.String c_defaultRemoteCSEResourceName := "MyRemoteCSEResource";
+		const XSD.String c_defaultRemoteCSEAnncResourceName := "MyRemoteCSEAnncResource";
+		const XSD.String c_defaultMgmtObjResourceName := "MyMgmtObjResource";
+		const XSD.String c_defaultMgmtCmdResourceName := "MyMgmtCmdResource";
+		const XSD.String c_defaultAeResourceName := "MyAeResource";
+		const XSD.String c_defaultLocationPolicyResourceName := "MyLocationPolicyResource";
+		const XSD.String c_defaultNodeResourceName := "MyNodeResource";
+		const XSD.String c_defaultNodeID := "MyNodeId";
+		const XSD.String c_defaultRequestResourceName := "MyRequestResource";
+		const XSD.String c_dynamicAuthorizationConsultationName := "MyDynamicAuthorizationConsultation";
+		const XSD.String c_defaultStatsConfigResourceName := "MyStatsConfigResource";
+		const XSD.String c_defaultStatsCollectResourceName := "MyStatsCollectResource";
+		const XSD.String c_defaultm2mServiceSubscriptionProfileResourceName := "Mym2mServiceSubscriptionProfileResource";
+		const XSD.String c_defaultServiceSubscribedAppRuleResourceName := "MyServiceSubscribedAppRuleResource";
+		const XSD.String c_defaultTimeSeriesResourceName := "MyTimeSeriesResource";
+		const XSD.String c_defaultTimeSeriesAnncResourceName := "MyTimeSeriesAnncResource";
+		const XSD.String c_defaultTimeSeriesInstanceResourceName := "MyTimeSeriesInstanceResource";
+		const XSD.String c_defaultTimeSeriesInstanceAnncResourceName := "MyTimeSeriesInstanceAnncResource";
+		const XSD.String c_defaultRoleResourceName := "MyRoleResource";
+		const XSD.String c_defaultTokenResourceName := "MyTokenResource";
+		const XSD.String c_defaultGenericInterworkingServiceResourceName := "MyGenericInterworkingServiceResource"; //<genericInterworkingService>
+		const XSD.ID c_aeAuxName := "MyAe";
+		const XSD.String c_defaultAE2Name := "MyAe2";
+		const XSD.String c_acpAuxName := "MyAcp";
+		const charstring c_invalid_location_update_period	:= "-PT30M10S" ;//duration set to invalid value  (minus value)
+		const XSD.ID c_resourceShortNameLatest := "la";		//<latest>
+		const XSD.ID c_resourceShortNameOldest := "ol";		//<oldest>
+		const XSD.ID c_resourceShortNameFanOutPoint := "fopt"; //<fanOutPoint>
+		const XSD.ID c_resourceShortNamePollingChannelUri := "pcu"; //<pollingChannelUri>
+		const XSD.ID c_resourceShortNameMashup := "msp"; //<mashup>
+		const XSD.ID c_resourceShortNameSemanticFanOutPoint := "sfop"; //<semanticFanOutPoint>
+		const XSD.ID c_resourceShortNameSemanticValidation := "smv"; //<semanticValidation>
+		const XSD.String c_defaultMmemberFilter := " PREFIX foaf:  <http://xmlns.com/foaf/0.1/> SELECT ?name WHERE { ?person foaf:name ?name . }"; // <semanticMashupJobProfile>
 	}
 	
 	group AccessControlOperations {
@@ -1286,6 +1290,82 @@ group OptionalResourceTypes {
 	  variant (choice.choice_list[-]) "untagged";
 	};
 
+	type record OntologyRepository_optional
+	{
+		ResourceName resourceName optional,
+		ResourceType resourceType optional,
+		XSD.ID resourceID optional,
+		NhURI parentID optional,
+		Timestamp creationTime optional,
+		Timestamp lastModifiedTime optional,
+		Labels labels optional,
+		AcpType accessControlPolicyIDs optional,
+		Timestamp expirationTime optional,
+		ListOfURIs dynamicAuthorizationConsultationIDs optional,
+		ListOfURIs announceTo optional,
+		record length(1 .. infinity) of XSD.NCName announcedAttribute optional,
+		XSD.NonNegativeInteger stateTag optional,
+		XSD.ID creator optional,
+		union {
+			record length(1 .. infinity) of ChildResourceRef childResource_list,
+			record length(1 .. infinity) of union {
+				Subscription subscription,
+				Ontology ontology,
+				Transaction transaction
+			} choice_list
+		} choice optional
+	}
+	with {
+	  variant "name as uncapitalized";
+	  variant "element";
+	  variant (resourceName) "attribute";
+	  variant (announcedAttribute) "list";
+	  variant (choice) "untagged";
+	  variant (choice.childResource_list) "untagged";
+	  variant (choice.childResource_list[-]) "name as 'childResource'";
+	  variant (choice.choice_list) "untagged";
+	  variant (choice.choice_list[-]) "untagged";
+	};
+	
+	type record Ontology_optional
+	{
+		ResourceName resourceName optional,
+		ResourceType resourceType optional,
+		XSD.ID resourceID optional,
+		NhURI parentID optional,
+		Timestamp creationTime optional,
+		Timestamp lastModifiedTime optional,
+		Labels labels optional,
+		AcpType accessControlPolicyIDs optional,
+		Timestamp expirationTime optional,
+		ListOfURIs dynamicAuthorizationConsultationIDs optional,
+		ListOfURIs announceTo optional,
+		record length(1 .. infinity) of XSD.NCName announcedAttribute optional,
+		XSD.ID creator optional,
+		XSD.String description optional,
+		SemanticFormat ontologyFormat optional,
+		XSD.AnySimpleType ontologyContent optional,//FIXME Use AnySimpleType instead
+		Sparql semanticOpExec optional,
+		union {
+			record length(1 .. infinity) of ChildResourceRef childResource_list,
+			record length(1 .. infinity) of union {
+				Subscription subscription,
+				Transaction transaction
+			} choice_list
+		} choice optional
+	}
+	with {
+	  variant "name as uncapitalized";
+	  variant "element";
+	  variant (resourceName) "attribute";
+	  variant (announcedAttribute) "list";
+	  variant (choice) "untagged";
+	  variant (choice.childResource_list) "untagged";
+	  variant (choice.childResource_list[-]) "name as 'childResource'";
+	  variant (choice.choice_list) "untagged";
+	  variant (choice.choice_list[-]) "untagged";
+	};
+
 	type record PollingChannel_optional
 	{
 		ResourceName resourceName optional,
@@ -1646,6 +1726,85 @@ group OptionalResourceTypes {
 	  variant (choice.choice_list[-]) "untagged";
 	};
 
+	type record SemanticMashupJobProfile_optional
+	{
+		ResourceName resourceName optional,
+		ResourceType resourceType optional,
+		XSD.ID resourceID optional,
+		NhURI parentID optional,
+		Timestamp creationTime optional,
+		Timestamp lastModifiedTime optional,
+		Labels labels optional,
+		AcpType accessControlPolicyIDs optional,
+		Timestamp expirationTime optional,
+		ListOfURIs dynamicAuthorizationConsultationIDs optional,
+		ListOfURIs announceTo optional,
+		record length(1 .. infinity) of XSD.NCName announcedAttribute optional,
+		XSD.ID creator optional,
+		Sparql memberFilter optional,
+		ListOfURIs smiID optional,
+		XSD.Base64Binary inputDescriptor optional,
+		XSD.Base64Binary outputDescriptor optional,
+		XSD.Base64Binary functionDescriptor optional
+	}
+	with {
+	  variant "name as uncapitalized";
+	  variant "element";
+	};
+
+	type record SemanticMashupInstance_optional
+	{
+		ResourceName resourceName optional,
+		ResourceType resourceType optional,
+		XSD.ID resourceID optional,
+		NhURI parentID optional,
+		Timestamp creationTime optional,
+		Timestamp lastModifiedTime optional,
+		Labels labels optional,
+		AcpType accessControlPolicyIDs optional,
+		Timestamp expirationTime optional,
+		ListOfURIs dynamicAuthorizationConsultationIDs optional,
+		ListOfURIs announceTo optional,
+		record length(1 .. infinity) of XSD.NCName announcedAttribute optional,
+		XSD.ID creator optional,
+		XSD.AnyURI smjpID optional,
+		XSD.Base64Binary smjpInputParameter optional,
+		MashupMemberStoreType memberStoreType optional,
+		MashupMembers mashupMember optional,
+		MashupResultGenType resultGenType optional,
+		XSD.Duration periodForResultGen optional
+	}
+	with {
+	  variant "name as uncapitalized";
+	  variant "element";
+	};
+
+
+
+	type record SemanticMashupResult_optional
+	{
+		ResourceName resourceName optional,
+		ResourceType resourceType optional,
+		XSD.ID resourceID optional,
+		NhURI parentID optional,
+		Timestamp creationTime optional,
+		Timestamp lastModifiedTime optional,
+		Labels labels optional,
+		AcpType accessControlPolicyIDs optional,
+		Timestamp expirationTime optional,
+		ListOfURIs dynamicAuthorizationConsultationIDs optional,
+		ListOfURIs announceTo optional,
+		record length(1 .. infinity) of XSD.NCName announcedAttribute optional,		
+		XSD.ID creator optional,
+		XSD.Base64Binary smjpInputParameter optional,
+		Serializations mashupResultFormat optional,
+		XSD.Base64Binary mashupResult optional
+	}
+	with {
+	  variant "name as uncapitalized";
+	  variant "element";
+	};
+
 	type record ServiceSubscribedAppRule_optional
 	{
 		ResourceName resourceName optional,
@@ -3927,6 +4086,8 @@ group InvalidTypes {
 }//end group invalidTypes
 
 group OtherTypes {
+	
+	type set of charstring SetOfCharstring;
 		
 	type enumerated SyncPoints {
 	   e_done  (0),
@@ -4037,6 +4198,8 @@ group OtherTypes {
 	AnnouncedMgmtResource_optional announcedMgmtResource,//AnnouncedMgmtResource
 	Node_optional node,
 	NodeAnnc_optional nodeAnnc,
+	OntologyRepository_optional ontologyRepository,
+	Ontology_optional ontology,
 	PollingChannel_optional pollingChannel,
 	Request_optional request, 
 	RemoteCSE_optional remoteCSE,
@@ -4050,6 +4213,9 @@ group OtherTypes {
 	ServiceSubscribedNode_optional serviceSubscribedNode,
 	Subscription_optional subscription,
 	SemanticDescriptor_optional semanticDescriptor,
+	SemanticMashupInstance_optional semanticMashupInstance,
+	SemanticMashupJobProfile_optional semanticMashupJobProfile,
+	SemanticMashupResult_optional semanticMashupResult,
 	TimeSeries_optional timeSeries,
 	TimeSeriesInstance_optional timeSeriesInstance,
 	TimeSeriesAnnc_optional timeSeriesAnnc,
diff --git a/OneM2M_PermutationFunctions.ttcn b/OneM2M_PermutationFunctions.ttcn
index d5293a6f5f09ab9fbd7d629d049a077222a6a470..81fe3edea9cd070336a11b1fad5155ed6343b87b 100644
--- a/OneM2M_PermutationFunctions.ttcn
+++ b/OneM2M_PermutationFunctions.ttcn
@@ -731,7 +731,7 @@ module OneM2M_PermutationFunctions {
 			
 			group Create {
 
-				function f_AE_HAIM_CRE_001(in universal charstring p_action, in template UtTriggerPrimitive p_utRequest, in template RequestPrimitive p_requestPrimitive) runs on CseSimu {
+				function f_AE_HAIM_CRE_001(in universal charstring p_action, in template UtTriggerPrimitive p_utRequest, in template RequestPrimitive p_requestPrimitive) runs on CseSimu system AeSystem {
 					
 					var integer v_resourceIndex := -1;					
 						
@@ -769,7 +769,7 @@ module OneM2M_PermutationFunctions {
 					f_cf03Down();
 				}	
 				
-				function f_AE_HAIM_CRE_002(in universal charstring p_action, in template UtTriggerPrimitive p_utRequest, in template RequestPrimitive p_requestPrimitive1, in template RequestPrimitive p_requestPrimitive2) runs on CseSimu {
+				function f_AE_HAIM_CRE_002(in universal charstring p_action, in template UtTriggerPrimitive p_utRequest, in template RequestPrimitive p_requestPrimitive1, in template RequestPrimitive p_requestPrimitive2) runs on CseSimu system AeSystem {
 					
 					var integer v_resourceIndex := -1;	
 					var integer v_parentResourceIndex := -1;
@@ -814,7 +814,7 @@ module OneM2M_PermutationFunctions {
 					f_cf03Down();
 				}	
 
-				function f_AE_HAIM_CRE_003(in universal charstring p_action, in template UtTriggerPrimitive p_utRequest, in template RequestPrimitive p_requestPrimitive) runs on CseSimu {
+				function f_AE_HAIM_CRE_003(in universal charstring p_action, in template UtTriggerPrimitive p_utRequest, in template RequestPrimitive p_requestPrimitive) runs on CseSimu system AeSystem {
 					
 					var integer v_resourceIndex := -1;		
 					var integer v_resourceIndexNode := -1;	
@@ -888,7 +888,7 @@ module OneM2M_PermutationFunctions {
 					f_cf03Down();
 				}	
 
-				function f_AE_HAIM_CRE_004(in universal charstring p_action, in template UtTriggerPrimitive p_utRequest, in template RequestPrimitive p_requestPrimitive1, in template RequestPrimitive p_requestPrimitive2) runs on CseSimu {
+				function f_AE_HAIM_CRE_004(in universal charstring p_action, in template UtTriggerPrimitive p_utRequest, in template RequestPrimitive p_requestPrimitive1, in template RequestPrimitive p_requestPrimitive2) runs on CseSimu system AeSystem {
 					
 					var integer v_resourceIndex := -1;	
 					var integer v_parentResourceIndex := -1;
@@ -933,7 +933,7 @@ module OneM2M_PermutationFunctions {
 					f_cf03Down();
 				}	
 				
-				function f_AE_HAIM_CRE_005(in universal charstring p_action, in template UtTriggerPrimitive p_utRequest, in template RequestPrimitive p_requestPrimitive1, in template RequestPrimitive p_requestPrimitive2) runs on CseSimu {
+				function f_AE_HAIM_CRE_005(in universal charstring p_action, in template UtTriggerPrimitive p_utRequest, in template RequestPrimitive p_requestPrimitive1, in template RequestPrimitive p_requestPrimitive2) runs on CseSimu system AeSystem {
 					
 					var integer v_resourceIndex := -1;	
 					var integer v_parentResourceIndex := -1;
@@ -1179,7 +1179,7 @@ module OneM2M_PermutationFunctions {
     				
 						// Local variables
 						var RequestPrimitive v_request;
-						var RequestPrimitive v_groupRequest := m_createGroupBase;
+						var template RequestPrimitive v_groupRequest := m_createGroupBase;
 						var integer v_aeIndex := -1;
 						var integer v_groupIndex := -1;
 						var integer v_resourceIndex := -1;
@@ -1423,8 +1423,8 @@ module OneM2M_PermutationFunctions {
 						var integer v_groupIndex := -1;
 						var integer v_resourceIndex := -1;
 						var AddressingMethod v_addressingMethod;
-						var RequestPrimitive v_request;
-						var RequestPrimitive v_groupRequest := m_createGroupBase;
+						var template RequestPrimitive v_request;
+						var template RequestPrimitive v_groupRequest := m_createGroupBase;
 											   
 						// Test control
 						if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
@@ -1452,7 +1452,7 @@ module OneM2M_PermutationFunctions {
 						v_request := m_retrieve(f_getResourceAddress(v_groupIndex, v_addressingMethod, p_primitiveScope), f_getOriginator(v_groupIndex));
 						v_request.to_ := v_request.to_ & "/fopt"; 
 						
-						f_send(e_mcaPort, m_request(v_request));
+						f_send(e_mcaPort, m_request(valueof(v_request)));
 						tc_ac.start;
 						alt {
 							[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response {
@@ -1676,7 +1676,7 @@ module OneM2M_PermutationFunctions {
 					function f_CSE_GEN_UPD_004(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem {
     				
 						// Local variables
-						var RequestPrimitive v_groupRequest := m_createGroupBase;
+						var template RequestPrimitive v_groupRequest := m_createGroupBase;
 						var RequestPrimitive v_updateRequest := valueof(m_updateContainerBase);
 						var integer v_aeIndex := -1;
 						var integer v_groupIndex := -1;
@@ -1927,7 +1927,7 @@ module OneM2M_PermutationFunctions {
     				
 						// Local variables
 						var RequestPrimitive v_request;
-						var RequestPrimitive v_groupRequest := m_createGroupBase;
+						var template RequestPrimitive v_groupRequest := m_createGroupBase;
 						var integer v_aeIndex := -1;
 						var integer v_groupIndex := -1;
 						var integer v_resourceIndex := -1;
@@ -9277,7 +9277,7 @@ module OneM2M_PermutationFunctions {
 				function f_CSE_ANNC_RET_002(ResourceType p_resourceType, template PrimitiveContent p_originalResource, template RequestPrimitive p_createRequestAnnc) runs on AeSimu system CseSystem {
 					
 					//Local variables
-					var RequestPrimitive v_request;
+					var template RequestPrimitive v_request;
 					var integer v_cseBaseIndex := -1;
 					var integer v_aeIndex := -1;
 					var integer v_remoteCSEIndex := -1;
@@ -9336,7 +9336,7 @@ module OneM2M_PermutationFunctions {
 					v_request.resultContent := int7;
 					// Test Body
 					vc_cse1.start(f_cse_retrieveResourceHandler(v_originalLocalResourceIndex, -, -));
-					f_send(e_mcaPort, m_request(v_request));
+					f_send(e_mcaPort, m_request(valueof(v_request)));
 					tc_ac.start;
 					alt {
 						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, vc_resourcesList[v_originalResourceIndex].resource))) -> value vc_response {
@@ -10083,7 +10083,7 @@ module OneM2M_PermutationFunctions {
 
 				}//end f_CSE_ANNC_UPD_011
 				
-				function f_CSE_ANNC_UPD_012(ResourceType p_resourceType, template RequestPrimitive p_requestCreatePrimitive, template RequestPrimitive p_createRequestAnnc, template RequestPrimitive p_requestUpdatePrimitive, template RequestPrimitive p_updateRequestAnnc, template (omit) AttributeAux_list p_nullFields := omit, template charstring p_attributeToDeannounce) runs on CseSimu system CseSystem {
+				function f_CSE_ANNC_UPD_012(ResourceType p_resourceType, template RequestPrimitive p_requestCreatePrimitive, template RequestPrimitive p_createRequestAnnc, template RequestPrimitive p_requestUpdatePrimitive, template RequestPrimitive p_updateRequestAnnc, template (omit) AttributeAux_list p_nullFields := omit, charstring p_attributeToDeannounce) runs on CseSimu system CseSystem {
 
 					// Local variables
 					var integer v_announcedResourceIndex := -1;
@@ -10116,7 +10116,7 @@ module OneM2M_PermutationFunctions {
 					
 					tc_ac.start;
 					alt {
-						[] mccPortIn.receive(mw_request(p_updateRequestAnnc, superset(p_attributeToDeannounce))) -> value vc_request {
+						[] mccPortIn.receive(mw_request(p_updateRequestAnnc, {*, p_attributeToDeannounce, *})) -> value vc_request {
 							tc_ac.stop;
 							setverdict(pass, __SCOPE__ & ":INFO: Announcement received");
 			
diff --git a/OneM2M_Testcases_AE_Release_1.ttcn b/OneM2M_Testcases_AE_Release_1.ttcn
index c637be595608462b480cde692091e54dab184da6..2610d3d2d08ad2820b0d2442944bae4a41976297 100644
--- a/OneM2M_Testcases_AE_Release_1.ttcn
+++ b/OneM2M_Testcases_AE_Release_1.ttcn
@@ -1266,7 +1266,7 @@ module OneM2M_Testcases_AE_Release_1 {
 						
 						var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
 						var universal charstring v_action :=  __SCOPE__ & ": Please, send a valid RETRIEVE Request for AE to ";
-						v_cse1.start(f_AE_DMR_RET_001(int2, m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit)),v_action));
+						v_cse1.start(f_AE_DMR_RET_001(int2, m_primitiveContentAe(m_contentCreateAe(omit, omit, -, omit)),v_action));
 						v_cse1.done;
 					}
 	
diff --git a/OneM2M_Testcases_AE_Release_3.ttcn b/OneM2M_Testcases_AE_Release_3.ttcn
index 56c2d7a731b9966388414b3a38645886fdae3897..aa94949f8f36a733c155e630ef1f6bbbcd674da6 100644
--- a/OneM2M_Testcases_AE_Release_3.ttcn
+++ b/OneM2M_Testcases_AE_Release_3.ttcn
@@ -1405,7 +1405,7 @@ module OneM2M_Testcases_AE_Release_3 {
 						var XSD.ID v_targetResourceAddress;
 						var integer v_receiverRemoteCseIndex;
 						var template RequestPrimitive v_notifyRequest;
-						var PrimitiveContent v_receiverrRemoteCseResource;
+						var template PrimitiveContent v_receiverRemoteCseResource;
 						var charstring v_poa;
 						var octetstring v_pairwiseESPrimKey;
 		    										   
@@ -1428,8 +1428,8 @@ module OneM2M_Testcases_AE_Release_3 {
 						myAbsRelTimestamp.alt_ := "20331231T012345";
 						var E2eSecInfo v_myE2eSecInfo := {{int11},omit,{"1","24",myAbsRelTimestamp,{int1},{int10}}}; //expired sharedReceiverESPrimRandObject 
 						v_poa:= f_getCompletePoA(PX_TS_CSE1.mccPortIn, "");
-						v_receiverrRemoteCseResource := m_primitiveContentRemoteCSE(m_contentRemoteCSE_e2eSecInfo(v_myE2eSecInfo, v_poa, PX_TS_CSE1));
-						v_receiverRemoteCseIndex := f_generateAndSetLocalResource(valueof(v_receiverrRemoteCseResource), -, int16);
+						v_receiverRemoteCseResource := m_primitiveContentRemoteCSE(m_contentRemoteCSE_e2eSecInfo(v_myE2eSecInfo, v_poa, PX_TS_CSE1));
+						v_receiverRemoteCseIndex := f_generateAndSetLocalResource(valueof(v_receiverRemoteCseResource), -, int16);
 						
 						// Test Body
 						var template UtTriggerPrimitive v_utRequest := m_utRetrieveRemoteCSE(f_getResourceAddress(v_receiverRemoteCseIndex));
@@ -1501,7 +1501,7 @@ module OneM2M_Testcases_AE_Release_3 {
 						var XSD.ID v_targetResourceAddress;
 						var integer v_receiverRemoteCseIndex;
 						var template RequestPrimitive v_notifyRequest;
-						var PrimitiveContent v_receiverRemoteCseResource;
+						var template PrimitiveContent v_receiverRemoteCseResource;
 						var charstring v_poa;
 						var octetstring v_pairwiseESPrimKey;
 		    										   
@@ -1589,7 +1589,7 @@ module OneM2M_Testcases_AE_Release_3 {
 						var XSD.ID v_targetResourceAddress;
 						var integer v_receiverRemoteCseIndex;
 						var template RequestPrimitive v_notifyRequest;
-						var PrimitiveContent v_receiverRemoteCseResource;
+						var template PrimitiveContent v_receiverRemoteCseResource;
 						var charstring v_poa;
 						var octetstring v_pairwiseESPrimKey;
 		    										   
diff --git a/OneM2M_Testcases_CSE_Release_3.ttcn b/OneM2M_Testcases_CSE_Release_3.ttcn
index 20e9db21e87660b0563d188884936f2d39fe69c6..5c8f4372d60547c89eb4eb9effaf47a5c98ac107 100644
--- a/OneM2M_Testcases_CSE_Release_3.ttcn
+++ b/OneM2M_Testcases_CSE_Release_3.ttcn
@@ -303,7 +303,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 							if(not ispresent(v_responsePrimitive.primitiveContent.schedule.resourceName)){
 								setverdict(fail, __SCOPE__ & ": Error, resourceName attribute not provided");
 							}
-						}  
+						}
 						
 					}
 					
@@ -1115,7 +1115,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 						v_ae1.done;
 						
 					}
-					
+										
 					testcase TC_CSE_DMR_CRE_012_TS_ACPI() runs on Tester system CseSystem {
 						// Local variables
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
@@ -2008,7 +2008,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 					
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						
-						
+													
 						v_ae1.start(f_CSE_DMR_RET_002());
 										  	  	
 						v_ae1.done;
@@ -2033,7 +2033,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 						// Test adapter configuration
     				
 						// Preamble
-						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); 		
+						v_aeIndex := f_cse_preamble_registerAe(); 		
 						
 						// Test Body
 						if((PX_ADDRESSING_METHOD == e_nonHierarchical) and (PX_PRIMITIVE_SCOPE == e_cseRelative)) {
@@ -2575,7 +2575,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 						// Test adapter configuration
 	
 						// Preamble
-						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+						v_aeIndex := f_cse_preamble_registerAe();
 		
 						v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); 	
 		
@@ -2641,7 +2641,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 						// Test adapter configuration
 	
 						// Preamble
-						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+						v_aeIndex := f_cse_preamble_registerAe();
 		
 						v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); 	
 		
@@ -5960,7 +5960,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 						// Test adapter configuration
                 
 						// Preamble
-						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); 				
+						v_aeIndex := f_cse_preamble_registerAe(); 				
                 												
 						// Test Body
 						if(PX_ADDRESSING_METHOD == e_nonHierarchical and (PX_PRIMITIVE_SCOPE == e_cseRelative)) {
@@ -6112,7 +6112,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 						// Test adapter configuration
             
 						// Preamble
-						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+						v_aeIndex := f_cse_preamble_registerAe();
 						
 						v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); 
 							
@@ -6181,7 +6181,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 						// Test adapter configuration
             
 						// Preamble
-						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+						v_aeIndex := f_cse_preamble_registerAe();
 						
 						v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); 
 							
@@ -6756,7 +6756,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 																
 			function f_CSE_LOC_007() runs on AeSimu system CseSystem {
 		     
-				var integer v_aeAuxIndex 					:= -1;	
+			   var integer v_aeAuxIndex 					:= -1;	
 			   	var ListOfDuration locationUpdatePeriod 	:= PX_LOCATION_UPDATE_PERIOD;
 				var RequestPrimitive v_request;
 				var MsgIn v_response;
@@ -6913,13 +6913,13 @@ module OneM2M_Testcases_CSE_Release_3 {
                    v_ae1.done;
               }
 																	
-              function f_CSE_LOC_009() runs on AeSimu {
+              function f_CSE_LOC_009() runs on AeSimu system CseSystem {
 														  	  	
                 var integer v_aeIndex               := -1;
                 var RequestPrimitive v_request;
                 var MsgIn v_response;
                 var LocationSource v_locationSource := int1;//Network-based
-                
+														  	  		
                 //Test component configuration
                 f_cf01Up();
                 
@@ -6936,7 +6936,7 @@ module OneM2M_Testcases_CSE_Release_3 {
                   [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value v_response { //BAD REQUEST
                     tc_ac.stop;
                     setverdict(pass, __SCOPE__ & "Resource <locationPolicy> create request is rejected due to invalid request body message!!");                     
-                  }
+			}
                   [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
                     tc_ac.stop;
                     setverdict(fail, __SCOPE__ & ": Wrong response status code");                   
@@ -6948,9 +6948,9 @@ module OneM2M_Testcases_CSE_Release_3 {
                   [] tc_ac.timeout {
                         setverdict(fail, __SCOPE__ & ": Timeout due to no response received from requested server!");
                   }
-                  
+																
                 }
-                
+		     
                 f_checkAeSimuStatus();
                 
                 //Check to see if the resource is NOT present
@@ -6989,34 +6989,34 @@ module OneM2M_Testcases_CSE_Release_3 {
 				v_ae1.done;
               }
 														  	  		
-              function f_CSE_LOC_010() runs on AeSimu {//reject an invalid update request with invalid attribtue locationUpdatePeriod
-                 var integer v_aeAuxIndex                        := -1;
-                 var integer v_locPolicyResourceIndex            := -1;
-                 var LocationSource v_locationSource             := int1;//Netwok-based  
+              function f_CSE_LOC_010() runs on AeSimu system CseSystem {//reject an invalid update request with invalid attribtue locationUpdatePeriod
+			  var integer v_aeAuxIndex					:=	-1;
+			  var integer v_locPolicyResourceIndex		:= 	-1;
+			  var LocationSource v_locationSource	:= int1;//Netwok-based
                  var ListOfDuration locationUpdatePeriod           := PX_LOCATION_UPDATE_PERIOD;
                  var XSD.Duration locationUpdatePeriod_invalid   := c_invalid_location_update_period;
-                 var LocationTargetID locationTargetID           := PX_LOCATION_TARGET_ID;
-                 var XSD.AnyURI locationServerAddress            := PX_LOCATION_SERVER_ADDRESS;
+			  var LocationTargetID locationTargetID			:= PX_LOCATION_TARGET_ID;
+			  var XSD.AnyURI locationServerAddress	    := PX_LOCATION_SERVER_ADDRESS;
                  var RequestPrimitive v_request;
-                 var RequestPrimitive v_locpolicy_request_preamble;
-                 var MsgIn v_response;
-                 
-                 //Test component configuration
-                 f_cf01Up();
-                 
-                 //Preamble - register AE
-                 v_aeAuxIndex                := f_cse_preamble_registerAe();
+			  var RequestPrimitive v_locpolicy_request_preamble;
+			  var MsgIn v_response;
+		      		      
+			  //Test component configuration
+			  f_cf01Up();
+		 	  
+			  //Preamble - register AE
+				v_aeAuxIndex						:= f_cse_preamble_registerAe();
                  //Preamble - create a valid locationPolicy resource for later update use
-                 v_locpolicy_request_preamble:= valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress));
+				v_locpolicy_request_preamble		:= valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress));
                  v_locPolicyResourceIndex    := f_cse_createResource(int10, v_locpolicy_request_preamble, v_aeAuxIndex);                 
-                 
+		 	  	
                  //Set requestPrimitive
                  v_request                   := f_getUpdateRequestPrimitive(int10, v_locPolicyResourceIndex, m_updateLocationPolicy(f_getResourceAddress(v_locPolicyResourceIndex), omit, locationUpdatePeriod_invalid));
-                 
+				
                  // Test Body
 				f_send(e_mcaPort, m_request(v_request));
-                 tc_ac.start;
-                 alt {
+			  tc_ac.start;
+			  alt{
                       [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value v_response {
                           tc_ac.stop;
                           setverdict(pass, __SCOPE__ & ": Update locationPolicy resource is rejected!!");
@@ -7025,8 +7025,8 @@ module OneM2M_Testcases_CSE_Release_3 {
                           tc_ac.stop;
                           setverdict(fail, __SCOPE__ & ": Wrong response status code");
                       }
-                      [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
-                          tc_ac.stop;
+				[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response{
+				  tc_ac.stop;
                           setverdict(fail, __SCOPE__ & ": Error occurrs with response status code: "& int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)) & "due to IUT failed to handle an invalid locationPolicy update request");
                       }
                       [] tc_ac.timeout {
@@ -7039,10 +7039,10 @@ module OneM2M_Testcases_CSE_Release_3 {
                  //Check to see if the resource is NOT present
                  if(f_cse_isResourceNotPresent(v_aeAuxIndex, f_getResourceName(v_request.primitiveContent))){
                    setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
-                 } else {
+				  }else{
                    setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
-                 }
-                 
+				  }		          
+		          
                  // Postamble
                  f_cse_postamble_deleteResources();   
                  
@@ -7070,9 +7070,9 @@ module OneM2M_Testcases_CSE_Release_3 {
                 
                 v_ae1.start(f_CSE_LOC_011());
                 v_ae1.done;
-              }
+				}
               
-              function f_CSE_LOC_011() runs on AeSimu {
+              function f_CSE_LOC_011() runs on AeSimu system CseSystem {
 			  	var integer v_aeAuxIndex					:=	-1;
 			  	var integer v_locPolicyResourceIndex		:= 	-1;
 			  	var integer v_locContainerResourceIndex	:=	-1;
@@ -7107,33 +7107,33 @@ module OneM2M_Testcases_CSE_Release_3 {
                           setverdict(pass, __SCOPE__ & "Container resource associated with locationPolicy resource is successfully retrieved with locationID included in the response!");                 
                     }
                   }
-                  [] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response{
-                          tc_ac.stop;
-                          setverdict(fail, __SCOPE__ & "Requested container resource is not found!");
-                  }
-                  [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
-                          tc_ac.stop;
-                          setverdict(fail, __SCOPE__ & ": Error while retrieving resource!");
-                  }
-                  [] tc_ac.timeout {
-                          setverdict(fail, __SCOPE__ & ": No answer while retrieving resource!");
-                  }
-                }
-                
+				[] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response{
+						tc_ac.stop;
+						setverdict(fail, __SCOPE__ & "Requested container resource is not found!");
+				}
+				[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+						tc_ac.stop;
+						setverdict(fail, __SCOPE__ & ": Error while retrieving resource!");
+				}
+				[] tc_ac.timeout {
+						setverdict(fail, __SCOPE__ & ": No answer while retrieving resource!");
+				}		        
+			  }
+		      
                 f_checkAeSimuStatus();
                 
-                // Postamble
-                f_cse_postamble_deleteResources();
-                
-                // Tear down
-                f_cf01Down();
-                
+			  // Postamble
+			  f_cse_postamble_deleteResources();	 
+    			
+			  // Tear down
+			  f_cf01Down(); 		      
+		      
               } // End of testcase TC_CSE_LOC_011          
-              
+		    
             } // End of group g_CSE_LOC_011
-            
+					
            group g_CSE_LOC_012 {
-              
+						
               /**
                * @desc Check that the IUT sends a notification message including the location Information to the originator when the originator sends a retrieve request target to the <latest> resource of CONTAINER_ADDRESS container  associated with a <locationPolicy> resource 
                *       Network based
@@ -7141,33 +7141,33 @@ module OneM2M_Testcases_CSE_Release_3 {
                * @remark TP/oneM2M/CSE/LOC/RET/002
                */
               testcase TC_CSE_LOC_012_01() runs on Tester system CseSystem {
-                
+																	
                 var AeSimu v_ae1 := AeSimu.create("AE1") alive;
-                
+														  	  	
                 v_ae1.start(f_CSE_LOC_012_01());
-                v_ae1.done;
-              }
-              
-              function f_CSE_LOC_012_01() runs on AeSimu {
-                var integer v_aeAuxIndex                  := -1;
-                var integer v_locPolicyResourceIndex      := -1;
-             	var integer v_locContainerResourceIndex   := -1;
-				var integer v_subscriptionResourceIndex	:= 	-1;
+				v_ae1.done;
+			}
+																
+              function f_CSE_LOC_012_01() runs on AeSimu system CseSystem {
+			  var integer v_aeAuxIndex					:=	-1;
+			  var integer v_locPolicyResourceIndex		:= 	-1;
+			  var integer v_locContainerResourceIndex	:=	-1;
+			  var integer v_subscriptionResourceIndex	:= 	-1;
 				var LocationSource v_locationSource	:= int1;//Netwok-based
 				var ListOfDuration locationUpdatePeriod 	:= PX_LOCATION_UPDATE_PERIOD;  
 				var LocationTargetID locationTargetID			:= PX_LOCATION_TARGET_ID;
 				var XSD.AnyURI locationServerAddress	    := PX_LOCATION_SERVER_ADDRESS;
-				var RequestPrimitive v_locpolicy_request_preamble;
-				var RequestPrimitive v_container_request_preamble;
-				var RequestPrimitive v_subscription_request_preamble;
-				var MsgIn v_response;
-			    		      
-				//Test component configuration
-				f_cf01Up();
+			  var RequestPrimitive v_locpolicy_request_preamble;
+			  var RequestPrimitive v_container_request_preamble;
+			  var RequestPrimitive v_subscription_request_preamble;
+			  var MsgIn v_response;
+		      		      
+			  //Test component configuration
+			  f_cf01Up();
 		 	  
-			  	//Preamble - register AE
+			  //Preamble - register AE
 				v_aeAuxIndex						:= f_cse_preamble_registerAe();
-				//Preamble - create a valid locationPolicy resource 
+			  //Preamble - create a valid locationPolicy resource
 				v_locpolicy_request_preamble		:= valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress));
 				v_container_request_preamble		:= valueof(m_createContainer(f_getResourceAddress(v_aeAuxIndex), omit));//no location-container name provided?
 		 	  	
@@ -7222,7 +7222,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 				v_ae1.done;
 			}
 																
-              function f_CSE_LOC_012_02() runs on AeSimu {
+              function f_CSE_LOC_012_02() runs on AeSimu system CseSystem {
 			  var integer v_aeAuxIndex					:=	-1;
 			  var integer v_locPolicyResourceIndex		:= 	-1;
 			  var integer v_locContainerResourceIndex	:=	-1;
@@ -7285,7 +7285,7 @@ module OneM2M_Testcases_CSE_Release_3 {
                *       Sharing based
                * @see TS-0001 [1], clause 8.5.2,clause 10.2.10.1.1 and clause 10.2.10.2.2, TS-0004 [2], clause 7.4.11.2 
                * @remark TP/oneM2M/CSE/LOC/RET/003
-               */
+		  */
               testcase TC_CSE_LOC_012_03() runs on Tester system CseSystem {
 				var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						
@@ -7293,46 +7293,114 @@ module OneM2M_Testcases_CSE_Release_3 {
 				v_ae1.done;
 			}
 																
-              function f_CSE_LOC_012_03() runs on AeSimu {
-			  var integer v_aeAuxIndex					:=	-1;
-			  var integer v_locPolicyResourceIndex		:= 	-1;
-			  var integer v_locContainerResourceIndex	:=	-1;
+              function f_CSE_LOC_012_03() runs on AeSimu system CseSystem {
+				  var integer v_aeAuxIndex					:=	-1;
+				  var integer v_locPolicyResourceIndex		:= 	-1;
+				  var integer v_locContainerResourceIndex	:=	-1;
 			  var integer v_subscriptionResourceIndex	:= 	-1;
 			  var LocationSource v_locationSource	:= int3;//Sharing-based
+				  var RequestPrimitive v_locpolicy_request_preamble;
+				  var RequestPrimitive v_container_request_preamble;
+				  var RequestPrimitive v_subscription_request_preamble;
+				  var MsgIn v_response;
+    		      		      
+				  //Test component configuration
+				  f_cf01Up();
+    		 	  
+				  //Preamble - register AE
+					v_aeAuxIndex						:= f_cse_preamble_registerAe();
+				  //Preamble - create a valid locationPolicy resource 
+				v_locpolicy_request_preamble		:= valueof(m_createLocationPolicy(v_locationSource, omit, omit, omit, omit));
+					v_container_request_preamble		:= valueof(m_createContainer(f_getResourceAddress(v_aeAuxIndex), omit));//no location-container name provided?
+					v_locPolicyResourceIndex			:= f_cse_createResource(int10, v_locpolicy_request_preamble, v_aeAuxIndex);//created locationpolicy index
+					v_locContainerResourceIndex		:= f_cse_createResource(int3, v_container_request_preamble, v_locPolicyResourceIndex);//created container index
+					v_subscription_request_preamble	:= valueof(m_createSubscription(f_getResourceAddress(v_locContainerResourceIndex), c_defaultResourceName, -));
+				v_subscriptionResourceIndex		:= f_cse_createResource(int23, v_subscription_request_preamble, v_locContainerResourceIndex);
+    				    				
+			  //Test Body - retrieve the <latest> resource of the created container resource linked with the locationPolicy resource
+			  f_send(e_mcaPort, m_request(valueof(m_retrieve(f_getResourceAddress(v_locContainerResourceIndex) & "/" & "latest", f_getOriginator(v_locContainerResourceIndex)))));
+				  tc_ac.start;
+				  alt{
+					[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response{
+					  tc_ac.stop;    		         
+				  if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.notification.notificationEvent)){		            
+						setverdict(fail, __SCOPE__ & "No NotificationEvent is included in the response!");
+				  }else{
+						setverdict(pass, __SCOPE__ & "Location information is successfully sent!");		            
+					}
+		          
+					}
+				[] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response{
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & "Requested container resource is not found!");
+					}    		        
+				[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+						tc_ac.stop;
+						setverdict(fail, __SCOPE__ & ": Error while retrieving resource!");
+				}
+					[] tc_ac.timeout {
+						setverdict(fail, __SCOPE__ & ": No answer while retrieving resource!");
+					}		        
+				  }
+    		      
+				  // Postamble
+				  f_cse_postamble_deleteResources();	 
+        			
+				  // Tear down
+				  f_cf01Down(); 		
+    		    
+              } // End of testcase TC_CSE_LOC_012_03 
+		
+            } // End of group TC_CSE_LOC_012
+		  
+		  group g_CSE_LOC_013 {
+		    
+              /**
+               * @desc Check that the IUT responds with a <locationPolicy> resource containing attribute locationContainerID set to resourceID of the associated <container> resource
+               * @see TS-0001 [1], clause 10.2.10.1.1, TS-0004 [2], clause 7.4.11.2.1
+               * @remark TP/oneM2M/CSE/LOC/RET/003
+		  */
+			testcase TC_CSE_LOC_013() runs on Tester system CseSystem {
+				var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+						
+				v_ae1.start(f_CSE_LOC_013());
+				v_ae1.done;
+			}
+																
+			function f_CSE_LOC_013() runs on AeSimu system CseSystem {
+			  var integer v_aeAuxIndex				:=	-1;
+			  var integer v_locPolicyResourceIndex	:= 	-1;
 			  var RequestPrimitive v_locpolicy_request_preamble;
-			  var RequestPrimitive v_container_request_preamble;
-			  var RequestPrimitive v_subscription_request_preamble;
 			  var MsgIn v_response;
-		      		      
+			  var LocationSource v_locationSource	:= int1;//Netwok-based
+                var ListOfDuration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD;
+			  var LocationTargetID locationTargetID		:= PX_LOCATION_TARGET_ID;
+			  var XSD.AnyURI locationServerAddress	:= PX_LOCATION_SERVER_ADDRESS;
+		      
 			  //Test component configuration
 			  f_cf01Up();
 		 	  
 			  //Preamble - register AE
-				v_aeAuxIndex						:= f_cse_preamble_registerAe();
-			  //Preamble - create a valid locationPolicy resource
-				v_locpolicy_request_preamble		:= valueof(m_createLocationPolicy(v_locationSource, omit, omit, omit, omit));
-				v_container_request_preamble		:= valueof(m_createContainer(f_getResourceAddress(v_aeAuxIndex), omit));//no location-container name provided?
-				v_locPolicyResourceIndex			:= f_cse_createResource(int10, v_locpolicy_request_preamble, v_aeAuxIndex);//created locationpolicy index
-				v_locContainerResourceIndex		:= f_cse_createResource(int3, v_container_request_preamble, v_locPolicyResourceIndex);//created container index
-				v_subscription_request_preamble	:= valueof(m_createSubscription(f_getResourceAddress(v_locContainerResourceIndex), c_defaultResourceName, -));
-				v_subscriptionResourceIndex		:= f_cse_createResource(int23, v_subscription_request_preamble, v_locContainerResourceIndex);
+			  v_aeAuxIndex				:= f_cse_preamble_registerAe();
+			  //Preamble - create a valid locationPolicy resource for later container resource creation
+			  v_locpolicy_request_preamble		:= valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress));
+			  v_locPolicyResourceIndex	:= f_cse_createResource(int10, v_locpolicy_request_preamble, v_aeAuxIndex);//created locationpolicy index
 				
-			  //Test Body - retrieve the <latest> resource of the created container resource linked with the locationPolicy resource
-			  f_send(e_mcaPort, m_request(valueof(m_retrieve(f_getResourceAddress(v_locContainerResourceIndex) & "/" & "latest", f_getOriginator(v_locContainerResourceIndex)))));
+			  //Test Body - retrieve the created locationpolicy resource
+				f_send(e_mcaPort, m_request(valueof(m_retrieve(f_getResourceAddress(v_locPolicyResourceIndex), f_getOriginator(v_locPolicyResourceIndex))))); 
 			  tc_ac.start;
 			  alt{
-                  [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response{
+                  [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value v_response{
 				  tc_ac.stop;
-				  if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.notification.notificationEvent)){		            
-						setverdict(fail, __SCOPE__ & "No NotificationEvent is included in the response!");
+				  if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.locationPolicy.locationContainerID)){		            
+						setverdict(fail, __SCOPE__ & "No locationContainerID is included in the response!");
 				  }else{
-						setverdict(pass, __SCOPE__ & "Location information is successfully sent!");		            
+						setverdict(pass, __SCOPE__ & "LocationPolicy resource is successfully retrieved with locationContainerID included in the response!");		            
 				  }		          
-		          
 				}
 				[] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response{
 						tc_ac.stop;
-						setverdict(fail, __SCOPE__ & "Requested container resource is not found!");
+						setverdict(fail, __SCOPE__ & "Requested locationPolicy is not found!");
 				}
 				[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
 						tc_ac.stop;
@@ -7340,7 +7408,8 @@ module OneM2M_Testcases_CSE_Release_3 {
 				}
 				[] tc_ac.timeout {
 						setverdict(fail, __SCOPE__ & ": No answer while retrieving resource!");
-				}		        
+				}
+		        
 			  }
 		      
 			  // Postamble
@@ -7349,110 +7418,41 @@ module OneM2M_Testcases_CSE_Release_3 {
 			  // Tear down
 			  f_cf01Down(); 		      
 		      
-              } // End of testcase TC_CSE_LOC_012_03 
+              } // End of testcase TC_CSE_LOC_013
+		    
+            } // End of group g_CSE_LOC_013
 		  
-            } // End of group TC_CSE_LOC_012
+            group g_CSE_LOC_014 {
 		  
-            group g_CSE_LOC_013 {
-              
               /**
-               * @desc Check that the IUT responds with a <locationPolicy> resource containing attribute locationContainerID set to resourceID of the associated <container> resource
-               * @see TS-0001 [1], clause 10.2.10.1.1, TS-0004 [2], clause 7.4.11.2.1
-               * @remark TP/oneM2M/CSE/LOC/RET/003
-		  */
-              testcase TC_CSE_LOC_013() runs on Tester system CseSystem {
+               * @desc Check that the IUT sets the locationStatus attribute with the error status code in the locationPolicy resource when the location information of the requested node is failed to be retrieved due to NSE.
+               * @see TS-0001 [1], clause 8.5.2 and clause 10.2.10.1.1, TS-0004 [2], clause 7.4.11.2.1
+               * @remark TP/oneM2M/CSE/LOC/RET/004
+               */
+              testcase TC_CSE_LOC_014() runs on Tester system CseSystem {
                 var AeSimu v_ae1 := AeSimu.create("AE1") alive;
-
-                v_ae1.start(f_CSE_LOC_013());
+		
+                v_ae1.start(f_CSE_LOC_014());
                 v_ae1.done;
               }
-					
-			function f_CSE_LOC_013() runs on AeSimu system CseSystem {
-                var integer v_aeAuxIndex              :=  -1;
-                var integer v_locPolicyResourceIndex  :=  -1;
-                var RequestPrimitive v_locpolicy_request_preamble;
-                var MsgIn v_response;
-                var LocationSource v_locationSource   := int1;//Netwok-based
-                var ListOfDuration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD;
-                var LocationTargetID locationTargetID := PX_LOCATION_TARGET_ID;
-                var XSD.AnyURI locationServerAddress  := PX_LOCATION_SERVER_ADDRESS;
-						
-                //Test component configuration
-                f_cf01Up();
-																	
-                //Preamble - register AE
-                v_aeAuxIndex                 := f_cse_preamble_registerAe();
-                //Preamble - create a valid locationPolicy resource for later container resource creation
-                v_locpolicy_request_preamble := valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress));
-                v_locPolicyResourceIndex     := f_cse_createResource(int10, v_locpolicy_request_preamble, v_aeAuxIndex);//created locationpolicy index
-														  	  	
-                //Test Body - retrieve the created locationpolicy resource
-				f_send(e_mcaPort, m_request(valueof(m_retrieve(f_getResourceAddress(v_locPolicyResourceIndex), f_getOriginator(v_locPolicyResourceIndex))))); 
-                tc_ac.start;
-                alt{
-                  [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value v_response{
-                    tc_ac.stop;
-                    if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.locationPolicy.locationContainerID)){                    
-                          setverdict(fail, __SCOPE__ & "No locationContainerID is included in the response!");
-                    }else{
-                          setverdict(pass, __SCOPE__ & "LocationPolicy resource is successfully retrieved with locationContainerID included in the response!");                   
-                    }               
-                  }
-                  [] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response{
-                          tc_ac.stop;
-                          setverdict(fail, __SCOPE__ & "Requested locationPolicy is not found!");
-                  }
-                  [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
-                          tc_ac.stop;
-                          setverdict(fail, __SCOPE__ & ": Error while retrieving resource!");
-                  }
-                  [] tc_ac.timeout {
-                          setverdict(fail, __SCOPE__ & ": No answer while retrieving resource!");
-                  }
-														  	  		
-			}
-																
-                // Postamble
-                f_cse_postamble_deleteResources();
-    		    
-                // Tear down
-                f_cf01Down();
-                
-              } // End of testcase TC_CSE_LOC_013
-              
-            } // End of group g_CSE_LOC_013
-            
-            group g_CSE_LOC_014 {
-              
-              /**
-               * @desc Check that the IUT sets the locationStatus attribute with the error status code in the locationPolicy resource when the location information of the requested node is failed to be retrieved due to NSE.
-               * @see TS-0001 [1], clause 8.5.2 and clause 10.2.10.1.1, TS-0004 [2], clause 7.4.11.2.1
-               * @remark TP/oneM2M/CSE/LOC/RET/004
-               */
-              testcase TC_CSE_LOC_014() runs on Tester system CseSystem {
-                var AeSimu v_ae1 := AeSimu.create("AE1") alive;
-                
-                v_ae1.start(f_CSE_LOC_014());
-                v_ae1.done;
-              }
-                                                                  
-              function f_CSE_LOC_014() runs on AeSimu {
-				var integer v_aeAuxIndex					:=	-1;
-				var integer v_locPolicyResourceIndex		:= 	-1;
-				var integer v_locContainerResourceIndex	:=	-1;
-				var ListOfDuration locationUpdatePeriod 	:= PX_LOCATION_UPDATE_PERIOD;  
-				var LocationTargetID locationTargetID			:= PX_LOCATION_TARGET_ID;
-				var XSD.AnyURI locationServerAddress	    := PX_LOCATION_SERVER_ADDRESS;
-                var RequestPrimitive v_loc_request_preamble;
-				var RequestPrimitive v_container_request_preamble;
-				var MsgIn v_response;
-                var LocationSource v_locationSource       := int1;//Network-based
-    		      		      
-				//Test component configuration
-				f_cf01Up();
-    		 	  
-				//Preamble - register AE
-				v_aeAuxIndex						:= f_cse_preamble_registerAe();
+                                                                  
+              function f_CSE_LOC_014() runs on AeSimu system CseSystem {
+				var integer v_aeAuxIndex					:=	-1;
+				var integer v_locPolicyResourceIndex		:= 	-1;
+				var integer v_locContainerResourceIndex	:=	-1;
+				var ListOfDuration locationUpdatePeriod 	:= PX_LOCATION_UPDATE_PERIOD;  
+				var LocationTargetID locationTargetID			:= PX_LOCATION_TARGET_ID;
+				var XSD.AnyURI locationServerAddress	    := PX_LOCATION_SERVER_ADDRESS;
+                var RequestPrimitive v_loc_request_preamble;
+				var RequestPrimitive v_container_request_preamble;
+				var MsgIn v_response;
+                var LocationSource v_locationSource       := int1;//Network-based
+    		      		      
+				//Test component configuration
+				f_cf01Up();
+    		 	  
+				//Preamble - register AE
+				v_aeAuxIndex						:= f_cse_preamble_registerAe();
                 //Preamble - create a valid locationPolicy resource for later container resource creation
                 v_loc_request_preamble       := valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress));
 					v_container_request_preamble		:= valueof(m_createContainer(f_getResourceAddress(v_aeAuxIndex), omit));//no location-container name provided?
@@ -7510,7 +7510,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 				v_ae1.done;
 			}
 																
-              function f_CSE_LOC_015() runs on AeSimu {
+              function f_CSE_LOC_015() runs on AeSimu system CseSystem {
 			  	var integer v_aeAuxIndex				:=	-1;
 			  	var integer v_locPolicyResourceIndex	:= 	-1;
                 var integer v_locContainerResourceIndex   :=  -1;
@@ -7583,7 +7583,7 @@ module OneM2M_Testcases_CSE_Release_3 {
                   v_ae1.done;
 			  }
 		      
-                function f_CSE_LOC_16() runs on AeSimu {
+                function f_CSE_LOC_16() runs on AeSimu system CseSystem {
                   var integer v_aeAuxIndex                        := -1;
                   var integer v_locPolicyResourceIndex            := -1;
                   var integer v_locChildResourceIndex             := -1;
@@ -7705,7 +7705,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 		}//end group Subscription_And_Notification
 		
 		group Security {
-			
+	
 			group ESPrim {
 				
 				group Notify{
@@ -7962,7 +7962,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 						var integer v_receiverRemoteCseIndex;
 						var XSD.ID v_targetResourceAddress;
 						var template RequestPrimitive v_notifyRequest;
-						var PrimitiveContent v_receiverRemoteCseResource;
+						var template PrimitiveContent v_receiverRemoteCseResource;
 						var charstring v_poa;
 						var octetstring v_pairwiseESPrimKey;
 		    										   
@@ -8055,7 +8055,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 						// Local variables
 						var XSD.ID v_targetResourceAddress;
 						var template RequestPrimitive v_notifyRequest;
-						var PrimitiveContent v_receiverRemoteCseResource;
+						var template PrimitiveContent v_receiverRemoteCseResource;
 						var integer v_receiverRemoteCseIndex;
 						var charstring v_poa;
 						var octetstring v_pairwiseESPrimKey;
@@ -8144,7 +8144,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 						var XSD.ID v_targetResourceAddress;
 						var template RequestPrimitive v_notifyRequest;
 						var charstring v_poa;
-						var PrimitiveContent v_receiverRemoteCseResource;
+						var template PrimitiveContent v_receiverRemoteCseResource;
 						var integer v_receiverRemoteCseIndex;
 						var octetstring v_pairwiseESPrimKey;
 								    										   
@@ -8792,7 +8792,8 @@ module OneM2M_Testcases_CSE_Release_3 {
 						var integer v_aeIndex := -1;
 						var XSD.ID v_tokenResourceID, v_roleResourceID;
 						var integer v_resourceIndex := -1;
-		    										   
+		    			var template RequestPrimitive v_retrieveRequest;
+													   
 						// Test control
 						if(not(PICS_ROL_SUPPORT)) {
 							setverdict(inconc, __SCOPE__ & ": Role Based Access Control Procedure support is required to run this test case");
@@ -8811,11 +8812,10 @@ module OneM2M_Testcases_CSE_Release_3 {
 						v_roleResourceID := fx_assign_originatorRole(); 
 							
 						// Test Body
-						var RequestPrimitive v_retrieveRequest;
 						v_retrieveRequest := m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex));
 						v_retrieveRequest.roleIDs := {v_roleResourceID};
 						v_retrieveRequest.tokenIDs := {v_tokenResourceID};
-						f_send(e_mcaPort, m_request(v_retrieveRequest));
+						f_send(e_mcaPort, m_request(valueof(v_retrieveRequest)));
 						
 						tc_ac.start;
 						alt {
@@ -9573,7 +9573,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 						v_ae1.start(f_CSE_ANNC_CRE_001(int3, v_createRequestAnnc, v_createRequest));//Container
 						v_ae1.done;
 						
-					} //end TC_CSE_A NNC_CRE_001
+					} //end TC_CSE_ANNC_CRE_001
 				} // end group g_CSE_ANNC_CRE_001
 				
 				group g_CSE_ANNC_CRE_002 {
@@ -9657,7 +9657,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 				
 					// Local variables
 					var MsgIn v_response;
-					var RequestPrimitive v_request;
+					var template RequestPrimitive v_request;
 					var integer v_parentIndex := -1;
 					var integer v_aeIndex := -1;
 					var integer v_resourceIndex;
@@ -9691,7 +9691,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 					v_request.primitiveContent.contentInstance.announceTo := {PX_TS_CSE1.cseId};
 					v_request := f_getCreateRequestPrimitive(int4, v_request, v_resourceIndex);
 					vc_cse1.start(f_cse_announcementProcedure_createHandler(mw_createContentInstanceAnnc,int4000, v_containerAnncResourceIndex));	
-					f_send(e_mcaPort, m_request(v_request));
+					f_send(e_mcaPort, m_request(valueof(v_request)));
 
 					tc_ac.start;
 					alt {
@@ -10645,7 +10645,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 
 						v_updateRequest.primitiveContent.accessControlPolicy.announceTo := {PX_TS_CSE1.cseId};
 						v_updateRequest.primitiveContent.accessControlPolicy.announcedAttribute := {"pi"};
-						
+
 						v_ae1.start(f_CSE_ANNC_UPD_004(int1, v_createRequest, v_createRequestAnnc, v_updateRequest));//AccessControlPolicy
 						v_ae1.done;
 					}
@@ -10659,7 +10659,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 
 						v_updateRequest.primitiveContent.container.announceTo := {PX_TS_CSE1.cseId};
 						v_updateRequest.primitiveContent.container.announcedAttribute := {"pi"};
-						
+  
 						v_ae1.start(f_CSE_ANNC_UPD_004(int3, v_createRequest, v_createRequestAnnc, v_updateRequest));//Container
 						v_ae1.done;
 					}
@@ -10674,7 +10674,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 						
 						v_updateRequest.primitiveContent.group_.announceTo := {PX_TS_CSE1.cseId};
 						v_updateRequest.primitiveContent.group_.announcedAttribute := {"pi"};
-						
+  
 						v_ae1.start(f_CSE_ANNC_UPD_004(int9, v_createRequest, v_createRequestAnnc, v_updateRequest));//Group
 						v_ae1.done;
 					}
@@ -10688,7 +10688,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 						
 						v_updateRequest.primitiveContent.timeSeries.announceTo := {PX_TS_CSE1.cseId};
 						v_updateRequest.primitiveContent.timeSeries.announcedAttribute := {"pi"};
-						
+  
 						v_ae1.start(f_CSE_ANNC_UPD_004(int29, v_createRequest, v_createRequestAnnc, v_updateRequest));//TimeSeries
 						v_ae1.done;
 					}
@@ -10880,7 +10880,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 						
 						v_createRequest.primitiveContent.container.announceTo := {PX_TS_CSE1.cseId};
 						v_createRequest.primitiveContent.container.maxByteSize := v_maxByteSize;
-						
+
 						v_updateRequest.primitiveContent.container.announcedAttribute := {"mbs"};
   
 						v_ae1.start(f_CSE_ANNC_UPD_008(int3, v_createRequestAnnc, v_createRequest, v_updateRequest));//Container
@@ -10924,7 +10924,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 						
 						v_createRequest.primitiveContent.group_.announceTo := {PX_TS_CSE1.cseId};
 						v_createRequest.primitiveContent.group_.maxNrOfMembers := v_maxNrOfMembers;
-						
+
 						v_updateRequest.primitiveContent.group_.announcedAttribute := {"mnm"};
   
 						v_ae1.start(f_CSE_ANNC_UPD_008(int9, v_createRequestAnnc, v_createRequest, v_updateRequest));//Group
@@ -10968,7 +10968,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 						
 						v_createRequest.primitiveContent.timeSeries.announceTo := {PX_TS_CSE1.cseId};
 						v_createRequest.primitiveContent.timeSeries.maxByteSize := v_maxByteSize;
-						
+
 						v_updateRequest.primitiveContent.timeSeries.announcedAttribute := {"mbs"};
   
 						v_ae1.start(f_CSE_ANNC_UPD_008(int29, v_createRequestAnnc, v_createRequest, v_updateRequest));//TimeSeries
@@ -11043,7 +11043,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 						v_updateRequest.primitiveContent.group_.announcedAttribute := {"mnm"};
 						
 						v_updateRequestAnnc.primitiveContent.groupAnnc.maxNrOfMembers := v_maxNrOfMembers;
-  
+						
 						v_cse1.start(f_CSE_ANNC_UPD_009(int9, v_createRequest, v_createRequestAnnc, v_updateRequest, v_updateRequestAnnc));//Group
 						v_cse1.done;
 					}
@@ -11451,7 +11451,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 						var ListOfNCNames v_announcedAttribute := {"ToBeDeleted"};
 						var PrimitiveContent v_primitiveContentRetrieveResource;
 						var XSD.PositiveInteger v_maxNrOfMembers_1 := 1;
-						
+	  
 						
 						v_createRequest.primitiveContent.group_.announceTo := {PX_TS_CSE1.cseId};
 						v_createRequest.primitiveContent.group_.maxNrOfMembers := v_maxNrOfMembers_1;
@@ -11969,15 +11969,15 @@ module OneM2M_Testcases_CSE_Release_3 {
 					// Test adapter configuration
 
 					// Preamble
-					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+					v_aeIndex := f_cse_preamble_registerAe();
 					
-					v_timeSeriesIndex := f_cse_createResource(int29, m_createTimeSeries(-, true, 5, -, 2000), v_aeIndex);//TimeSeries
+					v_timeSeriesIndex := f_cse_createResource(int29, m_createTimeSeries(-, true, 5, -, 2000), v_aeIndex);
 	
-					f_cse_preamble_subscriptionVerification(v_ae2Index, v_createRequest, int23);//AE2 registered
+					f_cse_preamble_subscriptionVerification(v_ae2Index, v_createRequest, int23);
 	
 					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_timeSeriesIndex), -, {f_getResourceAddress(v_aeIndex)}, v_eventNotificationCriteria, omit, omit, omit, omit, omit, omit);
 
-					v_subscriptionIndex := f_cse_createResource(int23, v_createRequest, v_timeSeriesIndex);//Subscription under TimeSeries
+					v_subscriptionIndex := f_cse_createResource(int23, v_createRequest, v_timeSeriesIndex);
 	
 					if(vc_ae2.running) {
 						vc_ae2.stop;
@@ -12036,7 +12036,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 					// Test adapter configuration
 
 					// Preamble
-					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+					v_aeIndex := f_cse_preamble_registerAe();
 	
 					v_timeSeriesIndex := f_cse_createResource(int29, m_createTimeSeries(-, true, 5, -, 2000), v_aeIndex);//TimeSeries
 
@@ -12111,7 +12111,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 			}//end group timeSeries
 			
 		}//end group dataManagement
-		
+
 		group Dynamic_Authorization {
 				
 			group Notify {
@@ -12128,7 +12128,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 					v_das.done;			
 				}
 				
-				function f_CSE_DAU_NTF_001() runs on AeSimu {
+				function f_CSE_DAU_NTF_001() runs on AeSimu system CseSystem {
 					
 					//Local variables
 					var ResponsePrimitive v_notificationResponse;
@@ -12229,7 +12229,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 				}
 
 
-				function f_CSE_DAU_NTF_002() runs on AeSimu {
+				function f_CSE_DAU_NTF_002() runs on AeSimu system CseSystem {
 					
 					//Local variables
 					var ResponsePrimitive v_notificationResponse;
@@ -12366,7 +12366,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 					v_ae1.done;																			
 				}
 				
-				function f_CSE_DAU_NTF_003() runs on AeSimu {
+				function f_CSE_DAU_NTF_003() runs on AeSimu system CseSystem {
 					// Local variables
 					var integer v_acpAuxIndex := -1;
 					var integer v_aeIndex := -1;
@@ -12439,7 +12439,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 																					
 				}
 				
-				function f_CSE_DAU_NTF_004() runs on AeSimu {
+				function f_CSE_DAU_NTF_004() runs on AeSimu system CseSystem {
 					// Local variables
 					var integer v_acpAuxIndex := -1;
 					var integer v_aeIndex := -1;
@@ -12516,13 +12516,13 @@ module OneM2M_Testcases_CSE_Release_3 {
 					v_ae1.done;																			
 				}
 
-				function f_CSE_DAU_NTF_005() runs on AeSimu {
+				function f_CSE_DAU_NTF_005() runs on AeSimu system CseSystem {
 					
 					//Local variables
 					var RequestPrimitive v_notificationRequest;
 					var integer v_dasIndex := -1;
 					var integer v_ae1Index := -1;
-					var integer v_containerIndex, v_acpIndex := -1;
+					var integer v_containerIndex := -1, v_acpIndex := -1;
 					var integer v_dynamicAuthorizationConsultationIndex := -1;
 					var template PrimitiveContent v_contentResponse;
 					 
@@ -12596,7 +12596,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 					v_ae1.done;																			
 				}
 				
-				function f_CSE_DAU_NTF_006() runs on AeSimu {
+				function f_CSE_DAU_NTF_006() runs on AeSimu system CseSystem {
 					
 					//Local variables
 					var RequestPrimitive v_notificationRequest, v_request;
@@ -12605,7 +12605,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 					var Timestamp v_privilegesLifetime := "21001231T012345";
 					var integer v_dasIndex := -1;
 					var integer v_ae1Index := -1;
-					var integer v_containerIndex, v_acpIndex := -1;
+					var integer v_containerIndex := -1, v_acpIndex := -1;
 					var integer v_dynamicAuthorizationConsultationIndex := -1;
 					
 					// Test control
@@ -12630,7 +12630,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 					var template RequestPrimitive v_createRequest1 := m_createDynamicAuthorizationConsultationBase(omit, true); //dynamicAuthorizationEnable set to TRUE
 					var template RequestPrimitive v_createRequest2 := m_createContainerBase;
 					f_cse_preamble_dau(v_dasIndex, v_dynamicAuthorizationConsultationIndex, v_containerIndex, v_acpIndex, v_createRequest1, v_createRequest2);
-					vc_das.start(f_cse_notifyProcedure_dynamicAuthorizationHandler(2, null, v_grantedPrivileges, v_privilegesLifetime));	//Dynamic Authorization Response
+					vc_das.start(f_cse_notifyProcedure_dynamicAuthorizationHandler(2, -, v_grantedPrivileges, v_privilegesLifetime));	//Dynamic Authorization Response
 
 					// Test Body
 					f_cse_retrieveResource(v_containerIndex);
@@ -12730,7 +12730,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 					v_ae1.done;																			
 				}
 
-				function f_CSE_DAU_NTF_007() runs on AeSimu {
+				function f_CSE_DAU_NTF_007() runs on AeSimu system CseSystem {
 					
 					//Local variables
 					var RequestPrimitive v_notificationRequest, v_request;
@@ -12738,7 +12738,7 @@ module OneM2M_Testcases_CSE_Release_3 {
 					var DynAuthJWT v_token;
 					var integer v_dasIndex := -1;
 					var integer v_ae1Index := -1;
-					var integer v_containerIndex, v_acpIndex := -1;
+					var integer v_containerIndex := -1, v_acpIndex := -1;
 					var integer v_dynamicAuthorizationConsultationIndex := -1;
 					
 					// Test control
@@ -12813,13 +12813,13 @@ module OneM2M_Testcases_CSE_Release_3 {
 					v_ae1.done;																			
 				}
 	
-				function f_CSE_DAU_NTF_008() runs on AeSimu {
+				function f_CSE_DAU_NTF_008() runs on AeSimu system CseSystem {
 					
 					//Local variables
 					var RequestPrimitive v_notificationRequest;
 					var integer v_dasIndex := -1;
 					var integer v_ae1Index := -1;
-					var integer v_containerIndex, v_acpIndex := -1;
+					var integer v_containerIndex := -1, v_acpIndex := -1;
 					var integer v_dynamicAuthorizationConsultationIndex := -1;
 					 
 					// Test control
@@ -13038,6 +13038,3270 @@ module OneM2M_Testcases_CSE_Release_3 {
 
 		}// end group InitialServiceProvisioning
 	
+		group Semantic {
+			
+			group Create {
+				/**
+				 * @desc Check that the IUT rejects the creation request of a <semanticDescriptor> resource which descriptor attribute does not conform to the RDF/XML syntax as defined in RDF 1.1 XML Syntax
+				 *  
+				 */
+				testcase TC_CSE_SEM_CRE_001() runs on Tester system CseSystem {
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+							
+					v_ae1.start(f_CSE_SEM_CRE_001()); 	
+					v_ae1.done;					
+				}
+				
+				function f_CSE_SEM_CRE_001() runs on AeSimu system CseSystem {
+		    				
+					// Local variables
+					var MsgIn v_response;
+					var template RequestPrimitive v_request;
+					var integer v_aeIndex := -1;
+					var integer v_acpAuxIndex := -1;
+					var ResourceType v_resourceType := int24;	//Semantic Descriptor
+					var template (omit) XSD.Base64Binary invalidDescriptor := '1234'O;
+					
+                    // Test control
+		
+					// Test component configuration
+					f_cf01Up();
+		
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+		
+					// Test Body
+					v_request := f_getCreateRequestPrimitive(v_resourceType, m_createSemanticDescriptorBase, v_aeIndex); 
+					v_request.from_ := f_getOriginator(v_aeIndex);
+					v_request.primitiveContent.semanticDescriptor.descriptor := invalidDescriptor;
+							
+					f_send(e_mcaPort, m_request(valueof(v_request)));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Semantic Descripter creation rejected with expected error code.");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(?))) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while creating semantic descriptor resource type");
+						}
+					}	
+						
+					// Postamble
+					f_cse_postamble_deleteResources();
+		
+					// Tear down
+					f_cf01Down();
+				}//end function f_CSE_SEM_CRE_001
+				
+				/**
+				 * @desc Check that the IUT generates a Response Status Code indicating a “ONTOLOGY_NOT_AVAILABLE” error when referenced ontology cannot be retrieved during a semantic validation process
+				 *  
+				 */
+				testcase TC_CSE_SEM_CRE_002() runs on Tester system CseSystem {	 //Create
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+					
+					v_ae1.start(f_CSE_SEM_CRE_002());
+					v_ae1.done;					
+				}
+				
+				function f_CSE_SEM_CRE_002() runs on AeSimu system CseSystem {
+		
+					//Local variables
+					var template RequestPrimitive v_request;
+					var integer v_aeIndex := -1;
+					var integer v_acpAuxIndex := -1;
+					var ResourceType v_resourceType := int24;	//Semantic Descriptor
+					var template (omit) XSD.Boolean v_validationEnable := true;
+					var template (omit) XSD.AnyURI v_invalidOntologyRef := "http://invalidUri";
+
+                    // Test control
+                    
+					// Test component configuration
+					f_cf01Up();
+					
+                    // Test adapter configuration
+	
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+					
+					// Test body
+					v_request := f_getCreateRequestPrimitive(v_resourceType, m_createSemanticDescriptorBase, v_aeIndex);
+					v_request.primitiveContent.semanticDescriptor.validationEnable := v_validationEnable;
+					v_request.primitiveContent.semanticDescriptor.ontologyRef := v_invalidOntologyRef;
+
+					f_send(e_mcaPort, m_request(valueof(v_request)));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int4118))) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__&":INFO: Received expected response ONTOLOGY_NOT_AVAILABLE.");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(?))) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__&":INFO: No answer while creating semantic descriptor resource type");
+						}
+					}	
+	
+					//Postamble
+					f_cse_postamble_deleteResources();
+			
+					// Tear down
+					f_cf01Down();
+		  	    }//end function f_CSE_SEM_CRE_002
+				
+				
+		        /**
+			     * @desc Check that the IUT generates a Response Status Code indicating a “LINKED_SEMANTICS_NOT_AVAILABLE” error when local linked <semanticDescriptor> resources cannot be retrieved during a semantic validation process
+			     *  
+			     */				
+		        testcase TC_CSE_SEM_CRE_003() runs on Tester system CseSystem {
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+							
+					v_ae1.start(f_CSE_SEM_CRE_003());				  	  	
+					v_ae1.done;
+				}	
+
+				function f_CSE_SEM_CRE_003() runs on AeSimu system CseSystem {
+			
+					//Local variables
+					var integer v_aeIndex := -1;
+					var integer v_acpAuxIndex := -1;
+					var ResourceType v_resourceType := int24;	//Semantic Descriptor
+					var template (omit) ListOfURIs v_relatedSemantics := {"http://invalidUri"};
+					var template (omit) XSD.Boolean v_validationEnable := true;
+					var template RequestPrimitive v_request;
+	
+                    // Test control
+                    
+					// Test component configuration
+					f_cf01Up();
+					
+                    // Test adapter configuration
+
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+					
+					v_request := f_getCreateRequestPrimitive(v_resourceType, m_createSemanticDescriptorBase, v_aeIndex);
+					v_request.primitiveContent.semanticDescriptor.validationEnable := v_validationEnable;
+					v_request.primitiveContent.semanticDescriptor.relatedSemantics := v_relatedSemantics;
+					
+					
+					f_send(e_mcaPort, m_request(valueof(v_request)));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int4119)))  {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__&":INFO: Received expected response LINKED_SEMANTICS_NOT_AVAILABLE.");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(?))) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__&":INFO: No answer while creating semantic descriptor resource type");
+						}
+					}	
+	
+					//Postamble
+					f_cse_postamble_deleteResources();
+			
+					// Tear down
+					f_cf01Down();
+				}//end function f_CSE_SEM_CRE_003
+			 				
+				/**
+				 * @desc Check that the IUT retrieves the referenced ontology from the ontology hosting CSE when performing a semantic validation as a result of a creation of a stand-alone <semanticDescriptor> resource
+				 *  
+				 */	
+				testcase TC_CSE_SEM_CRE_004() runs on Tester system CseSystem {
+					var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
+							
+					v_cse1.start(f_CSE_SEM_CRE_004());				  	  	
+					v_cse1.done;
+				}
+				
+				function f_CSE_SEM_CRE_004() runs on CseSimu system CseSystem {
+			
+					//Local variables
+					var integer v_aeIndex := -1;
+					var integer v_ontologyRepResourceIndex := -1;
+					var integer v_remoteOntologyResourceIndex := -1;
+					var XSD.ID v_RemoteOntologyResourceAddress;
+					var template RequestPrimitive v_requestSd;
+					var MsgIn v_request;
+					var ResponsePrimitive v_response;
+					
+					// Test control
+	
+					// Test component configuration
+					f_cf02UpCseSimuMaster();
+	
+					// Test adapter configuration
+					
+                    //	Preamble 
+                    // AE registration
+					vc_ae1.start(f_cse_preamble_registerAe());              
+					vc_ae1.done;
+					v_aeIndex := f_getLatestResource(vc_ae1);
+					f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
+					// CSE registraion
+					f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, {f_getCompletePoA()}));
+					
+					// Create ontology resource at CSE1
+					v_ontologyRepResourceIndex := f_generateAndSetLocalResource(valueof(m_primitiveContentOntologyRepository(m_contentCreateOntologyRepository)), vc_cSEBaseIndex, int38);
+					v_remoteOntologyResourceIndex := f_generateAndSetLocalResource(valueof(m_primitiveContentOntology(m_contentCreateOntology)), v_ontologyRepResourceIndex, int39);
+					v_RemoteOntologyResourceAddress := f_getResourceAddress(v_remoteOntologyResourceIndex);
+					
+					v_requestSd := m_createSemanticDescriptorBase;
+					// ontologyRef points to ontology resource in another CSE
+					v_requestSd.primitiveContent.semanticDescriptor.ontologyRef := v_RemoteOntologyResourceAddress;
+					v_requestSd.primitiveContent.semanticDescriptor.validationEnable := true;
+					vc_ae1.start(f_cse_createResource(int24, v_requestSd, v_aeIndex));
+
+					tc_ac.start;
+					alt {
+						[] mccPortIn.receive(mw_request(mw_retrieve(v_RemoteOntologyResourceAddress))) -> value v_request {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Retrieve request for Reference Ontology received.");
+							v_response := valueof(m_responsePrimitive(int2000,v_request.primitive.requestPrimitive.requestIdentifier));
+							v_response.primitiveContent := vc_localResourcesList[v_remoteOntologyResourceIndex].resource;
+							v_response.from_ := PX_TS_CSE1.cseId;
+							v_response.to_ := v_request.primitive.requestPrimitive.from_;
+							f_send(e_mccPortIn, m_response(v_response));
+						}
+						[] mccPortIn.receive(mw_request(mw_retrieve(?))) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Wrong Retrieve request received");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while retargeting request");
+						}
+					}   
+					
+					f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
+                    
+					vc_ae1.done;
+					
+					// Postamble
+					f_cse_postamble_deleteResourcesCSE();
+	
+					// Tear down
+					f_cf02DownCseSimuMaster();
+				}//end function f_CSE_SEM_CRE_004			
+				
+				/**
+				 * @desc Check that the IUT sends a valid response when performing a semantic validation as a result of a creation of a stand-alone <semanticDescriptor> resource
+				 *  
+				 */					
+				testcase TC_CSE_SEM_CRE_005() runs on Tester system CseSystem {
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+					
+					v_ae1.start(f_CSE_SEM_CRE_005());
+                                                
+					v_ae1.done;
+				}
+				
+				function f_CSE_SEM_CRE_005() runs on AeSimu system CseSystem {
+					var integer v_aeIndex := -1;
+					var integer v_cseBaseIndex := -1;
+					var integer v_remoteOntologyRepoIndex := -1;
+					var integer v_remoteOntologyIndex := -1;
+					var XSD.ID v_remoteOntologyRepoAddress;
+					var XSD.ID v_remoteOntologyAddress;
+					var RequestPrimitive v_requestSd;
+					// Test control
+        
+					// Test component configuration
+					f_cf02Up();
+    
+					// Test adapter configuration
+        
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();
+					v_cseBaseIndex := f_getLatestLocalResourceIndex(vc_cse1);
+                    
+					vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, {f_getCompletePoA()})));
+					f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
+
+					vc_cse1.start(f_generateAndSetLocalResource(valueof(m_primitiveContentOntologyRepository(m_contentCreateOntologyRepository)), v_cseBaseIndex, int38));
+					f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
+					v_remoteOntologyRepoAddress := f_getLatestLocalResourceAddress(vc_cse1, e_nonHierarchical, e_cseRelative);
+					v_remoteOntologyRepoIndex := f_getLatestLocalResourceIndex(vc_cse1);
+					
+					vc_cse1.start(f_generateAndSetLocalResource(valueof(m_primitiveContentOntology(m_contentCreateOntology)), v_remoteOntologyRepoIndex, int39));
+					f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
+					v_remoteOntologyAddress := f_getLatestLocalResourceAddress(vc_cse1, e_nonHierarchical, e_cseRelative);
+					v_remoteOntologyIndex := f_getLatestLocalResourceIndex(vc_cse1);
+					
+					//Handle Retrieve Request in CSE
+					vc_cse1.start(f_cse_retrieveResourceHandler(v_remoteOntologyIndex));
+					
+					//Create Semeantic Descriptor
+					v_requestSd := f_getCreateRequestPrimitive(int24, m_createSemanticDescriptorBase, v_aeIndex);
+					v_requestSd.primitiveContent.semanticDescriptor.ontologyRef := v_remoteOntologyAddress;
+					v_requestSd.primitiveContent.semanticDescriptor.validationEnable := true;
+					f_send(e_mcaPort, m_request(v_requestSd));
+					
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Rejected the creation request of Semantic Mashup Instance resource with expected status code BAD_REQUEST");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Wrong status code in Response Primitive.");
+						}
+                        [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+                            tc_ac.stop;
+                            setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+                        }
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while creating Semantic Mashup Instance resource");
+						}
+					}	
+					
+					f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);	
+
+					// Postamble
+					f_cse_postamble_deleteResources();
+	            		
+					// Tear down
+					f_cf01Down();
+				}
+					
+				/**
+				 * @desc Check that the IUT rejects the creation request of a <semanticMashupInstance> resource, indicating a "NOT_ACCEPTABLE" error,  when the <semanticMashupJobProfile> resource referenced in its smjpID attribute does not exist
+				 *  
+				 */									
+				testcase TC_CSE_SEM_CRE_006() runs on Tester system CseSystem {
+					// Local variables
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+									                
+					v_ae1.start(f_CSE_SEM_CRE_006());
+					v_ae1.done;														
+				}
+				
+				function f_CSE_SEM_CRE_006() runs on AeSimu system CseSystem {
+					// Local variables
+					var integer v_aeIndex := -1;
+					var integer v_acpAuxIndex := -1;
+					var XSD.AnyURI v_invalidSmjpID := "Invlid_AnyURI";
+					var RequestPrimitive v_request;
+					var integer v_resourceIndexJobProfile := -1;
+								
+	                // Test control	
+	                		   
+					// Test component configuration
+					f_cf01Up(true);
+					
+	                // Test adapter configuration
+	
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+					
+					// semanticMashupJobProfile
+					v_resourceIndexJobProfile := f_cse_createResource(int40, m_createSemanticMashupJobProfileBase, v_aeIndex); 
+	
+					v_request := f_getCreateRequestPrimitive(int41, m_createSemanticMashupInstanceBase, v_aeIndex);
+					v_request.primitiveContent.semanticMashupInstance.smjpID := v_invalidSmjpID;
+	
+					f_send(e_mcaPort, m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Rejected the creation request of Semantic Mashup Instance resource with reason BAD_REQUEST");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(?))) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while creating Semantic Mashup Instance resource");
+						}
+					}		
+	            					
+					// Postamble
+					f_cse_postamble_deleteResources();
+	            		
+					// Tear down
+					f_cf01Down();
+	            						
+				}//end function f_CSE_SEM_CRE_006
+
+					
+				/**
+				 * @desc Check that the IUT rejects the creation request of a <semanticMashupInstance> resource, indicating a "NOT_ACCEPTABLE" error, when its smjpInputParameter attribute value does not conform to the RDF/XML syntax as defined in RDF 1.1 XML Syntax
+				 *  
+				 */													
+				testcase TC_CSE_SEM_CRE_007() runs on Tester system CseSystem {
+					// Local variables
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+									                
+					v_ae1.start(f_CSE_SEM_CRE_007(int41, m_createSemanticMashupInstanceBase));
+					v_ae1.done;														
+				}
+						
+				function f_CSE_SEM_CRE_007(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive) runs on AeSimu system CseSystem {
+					// Local variables
+					var MsgIn v_response;
+					var integer v_acpAuxIndex := -1;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+					var integer v_resourceIndexJobProfile := -1;
+					const octetstring v_invalidSmjpInputParameter := int2oct(0,65537);
+					var RequestPrimitive v_request;
+					
+	                // Test control
+											   
+					// Test component configuration
+					f_cf01Up();
+					
+	                // Test adapter configuration
+	
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+					
+	                // semanticMashupJobProfile
+					v_resourceIndexJobProfile := f_cse_createResource(int40, m_createSemanticMashupJobProfileBase, v_aeIndex); 
+	
+	                // semanticMashupInstance
+					v_request := f_getCreateRequestPrimitive(int41, m_createSemanticMashupInstanceBase, v_aeIndex);
+					v_request.to_ := f_getResourceAddress(v_resourceIndexJobProfile);
+					v_request.from_ := f_getOriginator(v_aeIndex);
+					v_request.primitiveContent.semanticMashupInstance.smjpID := f_getResourceAddress(v_resourceIndexJobProfile);
+					v_request.primitiveContent.semanticMashupInstance.smjpInputParameter := v_invalidSmjpInputParameter;
+	
+					f_send(e_mcaPort, m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Rejected the creation request of with expected status code BAD_REQUEST.");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(?))) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while creating Semantic Mashup Instance resource");
+						}
+					}		
+	            					
+					// Postamble
+					f_cse_postamble_deleteResources();
+	            		
+					// Tear down
+					f_cf01Down();
+	            						
+				}//end function f_CSE_SEM_CRE_007
+						
+					
+				/**
+				 * @desc Check that the IUT rejects the creation request of a <semanticMashupInstance> resource, indicating a "NOT_ACCEPTABLE" error, when its smjpInputParameter attribute value does not meet the input parameter requirement specified by the inputDescriptor attribute of the corresponding <semanticMashupJobProfile> resource
+				 *  
+				 */																	
+				testcase TC_CSE_SEM_CRE_008() runs on Tester system CseSystem {
+					// Local variables
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+									                
+					v_ae1.start(f_CSE_SEM_CRE_008());
+					v_ae1.done;														
+				}
+					
+				function f_CSE_SEM_CRE_008() runs on AeSimu system CseSystem {
+					// Local variables
+					var MsgIn v_response;
+					var integer v_acpAuxIndex := -1;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndexJobProfile := -1;
+					const octetstring v_invalidSmjpInputParameter := int2oct(0,76584);
+					var XSD.Base64Binary v_validInputDescriptor:= int2oct(0,65000); //TO DO
+					var RequestPrimitive v_MashupInstancerequest;
+	
+	                // Test control
+	                
+					// Test component configuration
+					f_cf01Up();
+					
+	                // Test adapter configuration
+	
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+	
+	                //Create JobProfile resource
+					v_resourceIndexJobProfile := f_cse_createResource(int40, m_createSemanticMashupJobProfileBase, v_aeIndex);
+	
+	                //Create Mashup Instance
+					v_MashupInstancerequest := f_getCreateRequestPrimitive(int41, m_createSemanticMashupInstanceBase, v_aeIndex);
+					//smjpID set to reference to <semanticMashupJobProfile> resource 
+					v_MashupInstancerequest.primitiveContent.semanticMashupInstance.smjpID := f_getOriginator(v_resourceIndexJobProfile);
+					v_MashupInstancerequest.primitiveContent.semanticMashupInstance.smjpInputParameter := v_invalidSmjpInputParameter;						
+					v_MashupInstancerequest.to_ := f_getResourceAddress(v_resourceIndexJobProfile);
+					v_MashupInstancerequest.from_ := f_getOriginator(v_aeIndex);	
+					
+					f_send(e_mcaPort, m_request(v_MashupInstancerequest));
+					
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Rejected the creation request of Semantic Mashup Instance resource with expected status code BAD_REQUEST");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(?))) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while creating Semantic Mashup Instance resource");
+						}
+					}		
+	            					
+					// Postamble
+					f_cse_postamble_deleteResources();
+	            		
+					// Tear down
+					f_cf01Down();
+	            						
+				}//end function f_CSE_SEM_CRE_008
+					
+				/**
+				 * @desc Check that the IUT returns a "MASHUP_MEMBER_NOT_FOUND" error when creating a <semanticMashupInstance> when a required mashup member resource cannot be identified
+				 *  
+				 */																					
+				testcase TC_CSE_SEM_CRE_009() runs on Tester system CseSystem {
+					// Local variables
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+									                
+					v_ae1.start(f_CSE_SEM_CRE_009());
+					v_ae1.done;														
+				}
+	
+				function f_CSE_SEM_CRE_009() runs on AeSimu system CseSystem {
+					// Local variables
+					// Local variables
+					var MsgIn v_response;
+					var integer v_acpAuxIndex := -1;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndexJobProfile := -1;
+					var RequestPrimitive v_MashupInstancerequest;
+					//member filter query to identify a non existing member
+					var XSD.String v_memberFilter := "SELECT \?name WHERE { \?x foaf:name  \?name FILTER regex(\?name, \^mem\, \i\ }"; 
+					var template RequestPrimitive v_createRequestJobProfile := m_createSemanticMashupJobProfileBase;
+				   
+					// Test control
+	            
+					// Test component configuration
+					f_cf01Up();
+	            
+					// Test adapter configuration
+	            
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+					
+					// Create JobProfile resource
+	                //	member filter query to identify a non existing member
+					v_createRequestJobProfile.primitiveContent.semanticMashupJobProfile.memberFilter := v_memberFilter;
+					v_resourceIndexJobProfile := f_cse_createResource(int40, v_createRequestJobProfile, v_aeIndex); 
+					
+					//Create Mashup Instance
+					v_MashupInstancerequest := f_getCreateRequestPrimitive(int41, m_createSemanticMashupInstanceBase, v_aeIndex);
+					//smjpID set to reference to <semanticMashupJobProfile> resource 
+					v_MashupInstancerequest.primitiveContent.semanticMashupInstance.smjpID := f_getOriginator(v_resourceIndexJobProfile);
+					//v_MashupInstancerequest.primitiveContent.semanticMashupInstance.smjpInputParameter := v_smjpInputParameter;						
+					v_MashupInstancerequest.to_ := f_getResourceAddress(v_resourceIndexJobProfile);
+					v_MashupInstancerequest.from_ := f_getOriginator(v_aeIndex);	
+					
+					f_send(e_mcaPort, m_request(v_MashupInstancerequest));
+					
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int4121))) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Response with expected Status Code: MASHUP_MEMBER_NOT_FOUND");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(?))) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while creating Semantic Mashup Instance resource");
+						}
+					}		
+	            					
+					// Postamble
+					f_cse_postamble_deleteResources();
+	            		
+					// Tear down
+					f_cf01Down();
+	            						
+				}//end function f_CSE_SEM_CRE_009
+				
+				/**
+				 * @desc Check that the IUT rejects the creation request of a <semanticMashupInstance> resource, indicating a "NOT_ACCEPTABLE" error, when its its inputDescriptor attribute value does not conform to the RDF/XML syntax as defined in RDF 1.1 XML Syntax.
+				 *  
+				 */													
+				testcase TC_CSE_SEM_CRE_010() runs on Tester system CseSystem {
+					// Local variables
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+									                
+					v_ae1.start(f_CSE_SEM_CRE_010());
+					v_ae1.done;														
+				}
+					
+				function f_CSE_SEM_CRE_010() runs on AeSimu system CseSystem {
+					// Local variables
+					var MsgIn v_response;
+					var integer v_acpAuxIndex := -1;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+					var integer v_resourceIndexJobProfile := -1;
+					const octetstring v_invalidInputDescriptor := int2oct(0,65537);
+					var RequestPrimitive v_request;
+					
+					// Test control
+											   
+					// Test component configuration
+					f_cf01Up();
+					
+					// Test adapter configuration
+	
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+					
+					// semanticMashupJobProfile
+					v_request := f_getCreateRequestPrimitive(int40, m_createSemanticMashupJobProfileBase, v_aeIndex);
+					v_request.primitiveContent.semanticMashupJobProfile.inputDescriptor := v_invalidInputDescriptor;
+					
+					f_send(e_mcaPort, m_request(v_request));
+					
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Rejected the creation request of Semantic Mashup Job Profile with reason BAD_REQUEST");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(?))) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while creating Semantic Mashup Job profile");
+						}
+					}		
+	            					
+					// Postamble
+					f_cse_postamble_deleteResources();
+	            		
+					// Tear down
+					f_cf01Down();
+	            						
+				}//end function f_CSE_SEM_CRE_010
+				
+				/**
+				 * @desc Check that the IUT rejects the creation request of a <semanticMashupJobProfile> resource, indicating a "NOT_ACCEPTABLE" error, when its outputDescriptor attribute value does not conform to the RDF/XML syntax as defined in RDF 1.1 XML Syntax.
+				 *  
+				 */	
+				testcase TC_CSE_SEM_CRE_011() runs on Tester system CseSystem {
+					// Local variables
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+									                
+					v_ae1.start(f_CSE_SEM_CRE_011());
+					v_ae1.done;														
+				}
+				
+				function f_CSE_SEM_CRE_011() runs on AeSimu system CseSystem {
+					// Local variables
+					var MsgIn v_response;
+					var integer v_acpAuxIndex := -1;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+					var integer v_resourceIndexJobProfile := -1;
+					const octetstring v_invalidOutputDescriptor := int2oct(0,65537);
+					var RequestPrimitive v_request;
+					
+					// Test control
+											   
+					// Test component configuration
+					f_cf01Up();
+					
+					// Test adapter configuration
+	
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+					
+					// semanticMashupJobProfile
+					v_request := f_getCreateRequestPrimitive(int40, m_createSemanticMashupJobProfileBase, v_aeIndex);
+					v_request.primitiveContent.semanticMashupJobProfile.outputDescriptor := v_invalidOutputDescriptor;
+					
+					f_send(e_mcaPort, m_request(v_request));
+					
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Rejected the creation request of Semantic Mashup Job Profile with reason NOT_ACCEPTABLE");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(?))) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while creating Semantic Mashup Job profile");
+						}
+					}		
+	            					
+					// Postamble
+					f_cse_postamble_deleteResources();
+	            		
+					// Tear down
+					f_cf01Down();
+	            						
+				}//end function f_CSE_SEM_CRE_011
+					
+				/**
+				 * @desc Check that the IUT rejects the creation request of a <semanticMashupJobProfile> resource, indicating a "NOT_ACCEPTABLE" error, when its functionDescriptor attribute value does not conform to the RDF/XML syntax as defined in RDF 1.1 XML Syntax.
+				 *  
+				 */	
+				testcase TC_CSE_SEM_CRE_012() runs on Tester system CseSystem {
+					// Local variables
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+								                
+					v_ae1.start(f_CSE_SEM_CRE_012());
+					v_ae1.done;														
+				}
+				
+			     function f_CSE_SEM_CRE_012() runs on AeSimu system CseSystem {
+					// Local variables
+					var MsgIn v_response;
+					var integer v_acpAuxIndex := -1;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+					var integer v_resourceIndexJobProfile := -1;
+					var ResourceType v_resourceTypeJobProfile := int40;
+					const octetstring v_invalidFunctionDescriptor := int2oct(0,65537);
+					var RequestPrimitive v_request;
+					
+					// Test control
+											   
+					// Test component configuration
+					f_cf01Up();
+					
+					// Test adapter configuration
+	
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+					
+					// semanticMashupJobProfile
+					v_request := f_getCreateRequestPrimitive(int40, m_createSemanticMashupJobProfileBase, v_aeIndex);
+					v_request.primitiveContent.semanticMashupJobProfile.functionDescriptor := v_invalidFunctionDescriptor;
+					
+					f_send(e_mcaPort, m_request(v_request));
+					
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Rejected the creation request of Semantic Mashup Job Profile with reason BAD_REQUEST");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(?))) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while creating Semantic Mashup Job profile");
+						}
+					}	
+	            					
+					// Postamble
+					f_cse_postamble_deleteResources();
+	            		
+					// Tear down
+					f_cf01Down();
+	            						
+				}//end function f_CSE_SEM_CRE_012
+				
+				/**
+				 * @desc Check that the IUT rejects the creation request of a <semanticMashupJobProfile> resource, indicating a " BAD_REQUEST " error, when its memberFilter attribute value does not conform to a valid SPARQL query request.
+				 *  
+				 */	
+				testcase TC_CSE_SEM_CRE_013() runs on Tester system CseSystem {
+					// Local variables
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+								                
+					v_ae1.start(f_CSE_SEM_CRE_013());
+					v_ae1.done;														
+				}
+					
+				 function f_CSE_SEM_CRE_013() runs on AeSimu system CseSystem {
+					// Local variables
+					var MsgIn v_response;
+					var integer v_acpAuxIndex := -1;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+					var integer v_resourceIndexJobProfile := -1;
+					var ResourceType v_resourceTypeJobProfile := int40;
+					var RequestPrimitive v_request;
+					var Sparql v_invalidMemberFilter := "PREFIX foaf:  <http://xmlns.com/foaf/0.1/> SELECTECTION ?name WHERE { ?person foaf:name ?name . }";
+					
+					// Test control
+											   
+					// Test component configuration
+					f_cf01Up();
+					
+					// Test adapter configuration
+		
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+					
+					// semanticMashupJobProfile
+					v_request := f_getCreateRequestPrimitive(int40, m_createSemanticMashupJobProfileBase, v_aeIndex);
+					v_request.primitiveContent.semanticMashupJobProfile.memberFilter := v_invalidMemberFilter;
+					
+					f_send(e_mcaPort, m_request(v_request));
+					
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Rejected the creation request of Semantic Mashup Job Profile with reason BAD_REQUEST");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(?))) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while creating Semantic Mashup Job profile");
+						}
+					}	
+		        					
+					// Postamble
+					f_cse_postamble_deleteResources();
+		        		
+					// Tear down
+					f_cf01Down();
+		        						
+				}//end function f_CSE_SEM_CRE_013
+					
+				/**
+				 * @desc Check that the IUT creates successfully the  <semanticMashupInstance> resource.
+				 *  
+				 */	
+				testcase TC_CSE_SEM_CRE_014() runs on Tester system CseSystem {
+					// Local variables
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+								                
+					v_ae1.start(f_CSE_SEM_CRE_014());
+					v_ae1.done;														
+				}
+				
+				 function f_CSE_SEM_CRE_014() runs on AeSimu system CseSystem {
+					// Local variables
+					// Local variables
+					var MsgIn v_response;
+					var integer v_acpAuxIndex := -1;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndexJobProfile := -1;
+					var RequestPrimitive v_MashupInstancerequest;
+					var template RequestPrimitive v_createRequestJobProfile := m_createSemanticMashupJobProfileBase;
+				   
+					// Test control
+	            
+					// Test component configuration
+					f_cf01Up();
+	            
+					// Test adapter configuration
+	            
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+					
+					// Create JobProfile resource
+					v_resourceIndexJobProfile := f_cse_createResource(int40, v_createRequestJobProfile, v_aeIndex); 
+					
+					//Create Mashup Instance
+					v_MashupInstancerequest := f_getCreateRequestPrimitive(int41, m_createSemanticMashupInstanceBase, v_aeIndex);
+					//smjpID set to reference to <semanticMashupJobProfile> resource 
+					v_MashupInstancerequest.primitiveContent.semanticMashupInstance.smjpID := f_getOriginator(v_resourceIndexJobProfile);						
+					v_MashupInstancerequest.to_ := f_getResourceAddress(v_resourceIndexJobProfile);
+					v_MashupInstancerequest.from_ := f_getOriginator(v_aeIndex);	
+					
+					f_send(e_mcaPort, m_request(v_MashupInstancerequest));
+					
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Response with expected Status Code: CREATED");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Wrong status code in Response Primitive.");
+						}
+                        [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+                            tc_ac.stop;
+                            setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+                        }
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while creating Semantic Mashup Instance resource");
+						}
+					}		
+	            					
+					// Postamble
+					f_cse_postamble_deleteResources();
+	            		
+					// Tear down
+					f_cf01Down();
+	            						
+				}//end function f_CSE_SEM_CRE_014
+					
+				/**
+				 * @desc Check that the IUT creates successfully the  <semanticMashupInstance> resource with resultGenType set to WHEN_SMI_IS_CREATED.
+				 *  
+				 */	
+				testcase TC_CSE_SEM_CRE_015() runs on Tester system CseSystem {
+					// Local variables
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+	
+					v_ae1.start(f_CSE_SEM_CRE_015());
+					v_ae1.done;														
+				}
+			
+				 function f_CSE_SEM_CRE_015() runs on AeSimu system CseSystem {
+					// Local variables
+					// Local variables
+					var MsgIn v_response;
+					var integer v_acpAuxIndex := -1;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndexJobProfile := -1;
+					var RequestPrimitive v_MashupInstancerequest;
+					var template RequestPrimitive v_createRequestJobProfile := m_createSemanticMashupJobProfileBase;
+		   
+					// Test control
+	    
+					// Test component configuration
+					f_cf01Up();
+	    
+					// Test adapter configuration
+	    
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+			
+					// Create JobProfile resource
+					v_resourceIndexJobProfile := f_cse_createResource(int40, v_createRequestJobProfile, v_aeIndex); 
+			
+					//Create Mashup Instance
+					v_MashupInstancerequest := f_getCreateRequestPrimitive(int41, m_createSemanticMashupInstanceBase, v_aeIndex);
+					//smjpID set to reference to <semanticMashupJobProfile> resource 
+					v_MashupInstancerequest.primitiveContent.semanticMashupInstance.smjpID := f_getOriginator(v_resourceIndexJobProfile);
+					// resultGenType is set to WHEN_SMI_IS_CREATED
+					v_MashupInstancerequest.primitiveContent.semanticMashupInstance.resultGenType := int1;						
+					v_MashupInstancerequest.to_ := f_getResourceAddress(v_resourceIndexJobProfile);
+					v_MashupInstancerequest.from_ := f_getOriginator(v_aeIndex);	
+			
+					f_send(e_mcaPort, m_request(v_MashupInstancerequest));
+			
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Response with expected Status Code: CREATED");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Wrong status code in Response Primitive.");
+						}
+                        [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+                            tc_ac.stop;
+                            setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+                        }
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while creating Semantic Mashup Instance resource");
+						}
+					}		
+	    					
+					// Postamble
+					f_cse_postamble_deleteResources();
+	    		
+					// Tear down
+					f_cf01Down();
+	    						
+				}//end function f_CSE_SEM_CRE_015
+					
+		        /**
+				 * @desc Check that the IUT creates successfully the  <semanticMashupInstance> resource with resultGenType set to PERIODICALLY.
+				 *
+				 */	
+				testcase TC_CSE_SEM_CRE_016() runs on Tester system CseSystem {
+					// Local variables
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+	
+					v_ae1.start(f_CSE_SEM_CRE_016());
+					v_ae1.done;														
+				}
+	
+				function f_CSE_SEM_CRE_016() runs on AeSimu system CseSystem {
+					// Local variables
+					// Local variables
+					var MsgIn v_response;
+					var integer v_acpAuxIndex := -1;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndexJobProfile := -1;
+					var RequestPrimitive v_MashupInstancerequest;
+					var template RequestPrimitive v_createRequestJobProfile := m_createSemanticMashupJobProfileBase;
+					// 5sec nw delay assumed.
+					timer t_resultPerdiod := 15.0;
+					var integer v_reponseCount := 0;
+		   
+							// Test control
+		
+					// Test component configuration
+					f_cf01Up();
+		
+					// Test adapter configuration
+		
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+		
+					// Create JobProfile resource
+					v_resourceIndexJobProfile := f_cse_createResource(int40, v_createRequestJobProfile, v_aeIndex); 
+		
+					//Create Mashup Instance
+					v_MashupInstancerequest := f_getCreateRequestPrimitive(int41, m_createSemanticMashupInstanceBase, v_aeIndex);
+					//smjpID set to reference to <semanticMashupJobProfile> resource 
+					v_MashupInstancerequest.primitiveContent.semanticMashupInstance.smjpID := f_getOriginator(v_resourceIndexJobProfile);
+					// resultGenType is set to PERIODICALLY 
+					v_MashupInstancerequest.primitiveContent.semanticMashupInstance.resultGenType := int3;
+					// timer set to 5sec
+					v_MashupInstancerequest.primitiveContent.semanticMashupInstance.periodForResultGen := "PT10S";		
+					v_MashupInstancerequest.to_ := f_getResourceAddress(v_resourceIndexJobProfile);
+					v_MashupInstancerequest.from_ := f_getOriginator(v_aeIndex);	
+		
+					f_send(e_mcaPort, m_request(v_MashupInstancerequest));
+		
+					// t_resultPerdiod.start;
+					
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) {
+							setverdict(pass, __SCOPE__ & ": SMR created periodically");
+							log("Response with expected Status Code: CREATED");
+							
+//							t_resultPerdiod.stop;
+//
+//							v_reponseCount := v_reponseCount + 1;
+//		
+//							if(v_reponseCount == 4) {
+//								setverdict(pass, __SCOPE__ & ": SMR created periodically");
+//							} else {
+//								repeat;
+//							}
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
+							t_resultPerdiod.stop;
+							setverdict(fail, __SCOPE__ & ": Wrong return code received.");
+						}
+                        [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+                            t_resultPerdiod.stop;
+                            setverdict(fail, __SCOPE__ & ": Unexpected message received.");
+                        }
+						[] t_resultPerdiod.timeout {
+							setverdict(fail, __SCOPE__ & ": No response even after time out period of 15sec");
+						}
+					}
+
+					// Postamble
+					f_cse_postamble_deleteResources();
+		
+					// Tear down
+					f_cf01Down();
+						
+				}//end function f_CSE_SEM_CRE_016
+			} // end of group Create
+			
+			group Update {
+				
+				/**
+				 * @desc Check that the IUT rejects the update request of a <semanticDescriptor> resource indicating a "NOT_ACCEPTABLE" error when the request contains both semanticOpExec and descriptor attributes
+				 *  
+				 */
+				testcase TC_CSE_SEM_UPD_001() runs on Tester system CseSystem {
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+
+					v_ae1.start(f_CSE_SEM_UPD_001());
+					v_ae1.done;					
+				}
+				
+				function f_CSE_SEM_UPD_001() runs on AeSimu system CseSystem {		
+					// Local variables
+					var MsgIn v_response;
+					var integer v_acpAuxIndex := -1;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+					var integer v_resourceIndex1 := -1;					
+					var RequestPrimitive v_request;
+					var template RequestPrimitive p_createRequestPrimitive := m_createSemanticDescriptorBase;
+					var template RequestPrimitive p_updateRequestPrimitive := m_updateSemanticDescriptorBase;				
+					var ResourceType p_resourceType := int24;	//Semantic Descriptor
+					const octetstring v_descriptor := int2oct(0,65000);
+					var XSD.String v_semanticOpExec := "SELECT \?name WHERE { \?x foaf:name  \?name FILTER regex(\?name, \^semD\, \i\ }";							
+								   
+					// Test control
+		
+					// Test component configuration
+					f_cf01Up();
+		
+					// Test adapter configuration
+		
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+					
+					//Create Semantic Descritor 
+					v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_aeIndex);
+		
+					// Test Body
+					p_updateRequestPrimitive.primitiveContent.semanticDescriptor.semanticOpExec := v_semanticOpExec;
+					p_updateRequestPrimitive.primitiveContent.semanticDescriptor.descriptor := v_descriptor;
+                							               											
+					
+					v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive);
+					f_send(e_mcaPort, m_request(v_request));
+					
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int5207))) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Update request rejected with error NOT ACCEPTABLE, as request contains both semanticOpExec and descriptor attributes");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(?))) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while updating semantic descriptor resource type");
+						}
+					}	
+						
+					// Postamble
+					f_cse_postamble_deleteResources();
+		
+					// Tear down
+					f_cf01Down();
+				}//end function f_CSE_SEM_UPD_001
+				
+								
+				/**
+				 * @desc Check that the IUT rejects the update request of a <semanticDescriptor> resource indicating a "NOT_ACCEPTABLE" error when the request contains a semanticOpExec attribute which does not contain a valid SPARQL query request
+				 *  
+				 */				
+				testcase TC_CSE_SEM_UPD_002() runs on Tester system CseSystem {
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+
+					v_ae1.start(f_CSE_SEM_UPD_002());
+					v_ae1.done;
+				}
+				
+				function f_CSE_SEM_UPD_002() runs on AeSimu system CseSystem {		
+					// Local variables
+					var MsgIn v_response;
+					var integer v_acpAuxIndex := -1;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+					var RequestPrimitive v_request;
+					var template RequestPrimitive p_createRequestPrimitive := m_createSemanticDescriptorBase;
+					var template RequestPrimitive p_updateRequestPrimitive := m_updateSemanticDescriptorBase;				
+					var ResourceType p_resourceType := int24;	//Semantic Descriptor
+					var XSD.String v_semanticOpExec := "SELECT WHERE FILTER name";
+
+					// Test control
+
+					// Test component configuration
+					f_cf01Up();
+
+					// Test adapter configuration
+		
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+		
+					// Test Body
+					v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_aeIndex);
+
+					p_updateRequestPrimitive.primitiveContent.semanticDescriptor.semanticOpExec := v_semanticOpExec;
+                							               												
+					p_updateRequestPrimitive.to_ := f_getResourceAddress(v_resourceIndex);
+					p_updateRequestPrimitive.from_ := f_getOriginator(v_aeIndex);	
+					v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive);
+
+					f_send(e_mcaPort, m_request(v_request));
+					
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int5207))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Update request rejected with error NOT ACCEPTABLE, as attribute semanticOpExec doesnot content valid SPARQL query");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(?))) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while updating semantic descriptor resource type");
+						}
+					}	
+						
+					// Postamble
+					f_cse_postamble_deleteResources();
+		
+					// Tear down
+					f_cf01Down();
+				}//end function f_CSE_SEM_UPD_002
+				
+				/**
+				 * @desc Check that the IUT rejects the update request of a <semanticDescriptor> resource when the request contains a descriptor attribute which does not conform to the RDF/XML syntax as defined in RDF 1.1 XML Syntax
+				 *  
+				 */
+				testcase TC_CSE_SEM_UPD_003() runs on Tester system CseSystem {
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+
+					v_ae1.start(f_CSE_SEM_UPD_003());
+					v_ae1.done;
+				}
+				
+				function f_CSE_SEM_UPD_003() runs on AeSimu system CseSystem {		
+					// Local variables
+					var MsgIn v_response;
+					var integer v_acpAuxIndex := -1;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+					var RequestPrimitive v_request;
+					var template RequestPrimitive p_createRequestPrimitive := m_createSemanticDescriptorBase;
+					var template RequestPrimitive p_updateRequestPrimitive := m_updateSemanticDescriptorBase;				
+					var ResourceType p_resourceType := int24;	//Semantic Descriptor
+					const octetstring v_descriptor := int2oct(0,870009); //Base64Binary
+					
+
+					// Test control
+
+					// Test component configuration
+					f_cf01Up();
+
+					// Test adapter configuration
+		
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+		
+					// Test Body
+					v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_aeIndex);
+
+					p_updateRequestPrimitive.primitiveContent.semanticDescriptor.descriptor := v_descriptor;
+					                							               												
+					p_updateRequestPrimitive.to_ := f_getResourceAddress(v_resourceIndex);
+					p_updateRequestPrimitive.from_ := f_getOriginator(v_aeIndex);	
+					v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive);
+
+					f_send(e_mcaPort, m_request(v_request));
+					
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int5207))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Update request rejected with error NOT ACCEPTABLE, as descriptor attribute which does not conform to the RDF/XML syntax as defined in RDF 1.1 XML Syntax");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(?))) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while updating semantic descriptor resource type");
+						}
+					}	
+						
+					// Postamble
+					f_cse_postamble_deleteResources();
+		
+					// Tear down
+					f_cf01Down();
+				}//end function f_CSE_SEM_UPD_003
+								
+				/**
+				 * @desc Check that the IUT retrieves the referenced ontology from the ontology hosting CSE when performing a semantic validation as a result of an update of a stand-alone <semanticDescriptor> resource
+				 *  
+				 */
+				testcase TC_CSE_SEM_UPD_004() runs on Tester system CseSystem {
+					// Local variables
+					var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
+			
+					v_cse1.start(f_CSE_SEM_UPD_004()); //Create SemanticDescriptor
+					v_cse1.done;					
+				}
+				
+				function f_CSE_SEM_UPD_004() runs on CseSimu system CseSystem {
+	    				
+					// Local variables
+					var integer v_aeIndex, v_remoteCseIndex, v_targetResourceIndex := -1;
+					var integer v_acpAuxIndex := -1;
+					var integer v_resourceIndex := -1;					
+					var template RequestPrimitive p_updateRequestPrimitive := m_updateSemanticDescriptorBase;
+					var RequestPrimitive v_request;
+					var ResourceType p_resourceType := int24;	//Semantic Descriptor
+					var boolean v_validationEnable := true;
+					const octetstring v_descriptor := int2oct(0,65000); //Base64Binary
+					var XSD.AnyURI v_ontologyRef := "NotInitialized";
+					var XSD.ID v_targetResourceAddress := "NotInitialized";
+					
+					// Test control
+	
+					// Test component configuration
+					f_cf02UpCseSimuMaster();
+	
+					// Test adapter configuration
+					
+					// Preamble
+					vc_ae1.start(f_cse_preamble_registerAe());				
+					vc_ae1.done;
+					f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
+					v_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, {f_getCompletePoA()}));
+										
+					// Test Body
+					v_aeIndex := f_getLatestResource(vc_ae1);
+					v_targetResourceIndex := f_generateAndSetLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), v_aeIndex, int24);
+
+					p_updateRequestPrimitive.primitiveContent.semanticDescriptor.validationEnable := v_validationEnable;
+					p_updateRequestPrimitive.primitiveContent.semanticDescriptor.descriptor := v_descriptor;
+					p_updateRequestPrimitive.primitiveContent.semanticDescriptor.ontologyRef := v_ontologyRef;
+
+									                							               												
+					p_updateRequestPrimitive.to_ := f_getResourceAddress(v_resourceIndex);
+					p_updateRequestPrimitive.from_ := f_getOriginator(v_aeIndex);	
+					
+					v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive);
+
+					vc_ae1.start(f_cse_operationResource(v_request));	
+					
+					tc_ac.start;
+					alt {
+						[] mccPortIn.receive(mw_request(mw_retrieve(v_targetResourceAddress))) -> value vc_request {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Retrieved the referenced ontology successfully.");
+							f_processRetrieveRequestPrimitive(vc_request.primitive.requestPrimitive);
+							f_send(e_mccPortIn, m_response(vc_response.primitive.responsePrimitive));
+						}
+						[] mccPortIn.receive(mw_request(?)) -> value vc_request {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Wrong request received");
+							f_send(e_mccPortIn, m_response(m_responsePrimitive(int4000, vc_request.primitive.requestPrimitive.requestIdentifier)));
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while retargeting request");
+						}
+					}	
+					
+					f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
+	
+					// Postamble
+					f_cse_postamble_deleteResourcesCSE();
+	
+					// Tear down
+					f_cf02DownCseSimuMaster();
+					
+				}//end f_CSE_SEM_UPD_004
+				
+				
+				/**
+				 * @desc Check that the IUT sends a valid response when performing a semantic validation as a result of an update of a stand-alone <semanticDescriptor> resource
+				 *  
+				 */
+				testcase TC_CSE_SEM_UPD_005() runs on Tester system CseSystem {
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+
+					v_ae1.start(f_CSE_SEM_UPD_005());
+					v_ae1.done;					
+				}
+				
+				function f_CSE_SEM_UPD_005() runs on AeSimu system CseSystem {
+					var integer v_aeIndex := -1;
+					var integer v_cseBaseIndex := -1;
+					var integer v_resourceIndexSd := -1;
+					var XSD.ID v_remoteOntologyRepoAddress;
+					var XSD.ID v_remoteOntologyAddress;
+					var integer v_remoteOntologyRepoIndex := -1;
+					var integer v_remoteOntologyIndex := -1;
+					var RequestPrimitive v_updateRequest;
+					var template RequestPrimitive p_updateSdRequestPrimitive := m_updateSemanticDescriptorBase;
+					
+					// Test control
+        
+					// Test component configuration
+					f_cf02Up();
+    
+					// Test adapter configuration
+        
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();
+					v_cseBaseIndex := f_getLatestLocalResourceIndex(vc_cse1);
+                    
+					vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, {f_getCompletePoA()})));
+					f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
+
+					vc_cse1.start(f_generateAndSetLocalResource(valueof(m_primitiveContentOntologyRepository(m_contentCreateOntologyRepository)), v_cseBaseIndex, int38));
+					f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
+					v_remoteOntologyRepoAddress := f_getLatestLocalResourceAddress(vc_cse1, e_nonHierarchical, e_cseRelative);
+					v_remoteOntologyRepoIndex := f_getLatestLocalResourceIndex(vc_cse1);
+					
+					// Ontology resource in remote CSE
+					vc_cse1.start(f_generateAndSetLocalResource(valueof(m_primitiveContentOntology(m_contentCreateOntology)), v_remoteOntologyRepoIndex, int39));
+					f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
+					v_remoteOntologyAddress := f_getLatestLocalResourceAddress(vc_cse1, e_nonHierarchical, e_cseRelative);
+					v_remoteOntologyIndex := f_getLatestLocalResourceIndex(vc_cse1);
+					
+					// first create Semantic Descriptor without ontologyRef
+					v_resourceIndexSd := f_cse_createResource(int24, m_createSemanticDescriptorBase, v_aeIndex);
+					
+
+					//Handle Retrieve Request of ontologRef in CSE
+					vc_cse1.start(f_cse_retrieveResourceHandler(v_remoteOntologyIndex));
+					
+					// Update the Semantic Descriptor including ontologyRef
+					p_updateSdRequestPrimitive.primitiveContent.semanticDescriptor.ontologyRef := v_remoteOntologyAddress;
+					p_updateSdRequestPrimitive.primitiveContent.semanticDescriptor.validationEnable := true;
+					v_updateRequest := f_getUpdateRequestPrimitive(int24, v_resourceIndexSd, p_updateSdRequestPrimitive);
+					f_send(e_mcaPort, m_request(v_updateRequest));
+					
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Response received with status UPDATED");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": wrong status code in Response Primitive.");
+						}
+                        [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+                            tc_ac.stop;
+                            setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+                        }
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while updating semantic descriptor resource type");
+						}
+					}
+					f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
+					vc_cse1.done;
+					
+							
+					// Postamble
+					f_cse_postamble_deleteResources();
+		
+					// Tear down
+					f_cf01Down();
+				}//end function f_CSE_SEM_UPD_005
+				
+				
+				
+				/**
+				 * @desc Check that the IUT retrieves the linked <semanticDescriptor> resource from the hosting CSE when performing a semantic validation as a result of an update of the <semanticValidation> virtual resource
+				 *  
+				 */
+				testcase TC_CSE_SEM_UPD_006() runs on Tester system CseSystem {
+					var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
+			
+					v_cse1.start(f_CSE_SEM_UPD_006()); //SemanticDescriptor
+					v_cse1.done;					
+				}
+				
+				function f_CSE_SEM_UPD_006() runs on CseSimu system CseSystem {
+	    				
+					// Local variables
+					var integer v_aeIndex, v_remoteCseIndex, v_targetResourceIndex := -1;
+					var integer v_acpAuxIndex := -1;
+					var integer v_resourceIndex := -1;					
+					var template RequestPrimitive p_updateRequestPrimitive := m_updateSemanticDescriptorBase;
+					var RequestPrimitive v_request;
+					var ResourceType p_resourceType := int24;	//Semantic Descriptor
+					var boolean v_validationEnable := true;
+					const octetstring v_descriptor := int2oct(0,65000); //Base64Binary
+					var XSD.AnyURI v_ontologyRef := "NotInitialized";
+					var ListOfURIs v_relatedSemantics := {"NotInitilized"};
+					var XSD.ID v_targetResourceAddress;
+					
+					// Test control
+	
+					// Test component configuration
+					f_cf02UpCseSimuMaster();
+	
+					// Test adapter configuration
+					
+					// Preamble
+					vc_ae1.start(f_cse_preamble_registerAe());				
+					vc_ae1.done;
+					f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
+					v_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, {f_getCompletePoA()}));
+										
+					// Test Body
+					v_aeIndex := f_getLatestResource(vc_ae1);
+					v_targetResourceIndex := f_generateAndSetLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), v_aeIndex, int24);
+
+					p_updateRequestPrimitive.primitiveContent.semanticDescriptor.validationEnable := v_validationEnable;
+					p_updateRequestPrimitive.primitiveContent.semanticDescriptor.descriptor := v_descriptor;
+					p_updateRequestPrimitive.primitiveContent.semanticDescriptor.ontologyRef := v_ontologyRef;
+					p_updateRequestPrimitive.primitiveContent.semanticDescriptor.relatedSemantics := v_relatedSemantics; //linked semantic descriptor
+
+									                							               												
+					p_updateRequestPrimitive.to_ := f_getResourceAddress(v_resourceIndex);
+					p_updateRequestPrimitive.from_ := f_getOriginator(v_aeIndex);	
+					
+					v_targetResourceAddress := f_getResourceAddress(v_resourceIndex) & "/" & c_resourceShortNameSemanticValidation;
+
+					v_request := f_getUpdateRequestPrimitive(p_resourceType, v_targetResourceIndex, p_updateRequestPrimitive);
+					
+					vc_ae1.start(f_cse_operationResource(v_request));	
+					
+					tc_ac.start;
+					alt {
+						[] mccPortIn.receive(mw_request(mw_retrieve(v_targetResourceAddress))) -> value vc_request {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Retrieved the linked semantic descriptor resource ontology successfully.");
+							f_processRetrieveRequestPrimitive(vc_request.primitive.requestPrimitive);
+							f_send(e_mccPortIn, m_response(vc_response.primitive.responsePrimitive));
+						}
+						[] mccPortIn.receive(mw_request(?)) -> value vc_request {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Wrong request received");
+							f_send(e_mccPortIn, m_response(m_responsePrimitive(int4000, vc_request.primitive.requestPrimitive.requestIdentifier)));
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while retargeting request");
+						}
+					}	
+					
+					f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
+	
+					// Postamble
+					f_cse_postamble_deleteResourcesCSE();
+	
+					// Tear down
+					f_cf02DownCseSimuMaster();
+					
+				}//end f_CSE_SEM_UPD_006				
+				
+				
+				/**
+				 * @desc Check that the IUT sends a valid response when performing a semantic validation a semantic validation as a result of an update of the <semanticValidation> virtual resource
+				 *  
+				 */
+				testcase TC_CSE_SEM_UPD_007() runs on Tester system CseSystem {
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+
+					v_ae1.start(f_CSE_SEM_UPD_007());
+					v_ae1.done;										
+				}
+				
+				function f_CSE_SEM_UPD_007() runs on AeSimu system CseSystem {
+					var integer v_aeIndex := -1;
+					var integer v_ontologyRepoIndex := -1;
+					var integer v_ontologyIndex := -1;
+					var integer v_semanticDescriptorCse1Index := -1;
+					var XSD.AnyURI v_ontologyRef;
+					var XSD.AnyURI v_uriSemanticDescriptorCse1;
+					var XSD.AnyURI v_semanticValidationAddress;
+					var template RequestPrimitive p_updateRequestPrimitive := m_updateSemanticDescriptorBase;
+					var RequestPrimitive v_updateRequest;
+			
+					// Test control
+        
+					// Test component configuration
+					f_cf02Up();
+    
+					// Test adapter configuration
+        
+					// Preamble - register AE
+					v_aeIndex := f_cse_preamble_registerAe();
+                    
+                    // Preamble - register remoteCSE
+					vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, {f_getCompletePoA()})));
+					f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
+					
+					//Create ontology Repository and ontology resource in CSE
+					v_ontologyRepoIndex := f_cse_createResource(int38, m_createOntologyRepositoryBase, v_aeIndex);
+					v_ontologyIndex := f_cse_createResource(int39, m_createOntologyBase, v_ontologyRepoIndex);
+					v_ontologyRef := f_getResourceAddress(v_ontologyIndex);
+					
+					//Create Semantic descriptor in remoteCSE
+					vc_cse1.start(f_generateAndSetLocalResource(valueof(m_primitiveContentSemanticDescriptor(m_contentCreateSemanticDescriptor)), -, int24));
+					f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
+					v_uriSemanticDescriptorCse1 := f_getLatestLocalResourceAddress(vc_cse1, e_nonHierarchical, e_cseRelative);
+					v_semanticDescriptorCse1Index := f_getLatestLocalResourceIndex(vc_cse1);
+					
+					//Compose Semantic Descriptor resource with link to Semantic Descriptor in remoteCSE
+					p_updateRequestPrimitive.primitiveContent.semanticDescriptor.validationEnable := true;
+					p_updateRequestPrimitive.primitiveContent.semanticDescriptor.ontologyRef := v_ontologyRef; 
+					p_updateRequestPrimitive.primitiveContent.semanticDescriptor.relatedSemantics := {v_uriSemanticDescriptorCse1}; 
+					
+					// Handle IUT retrive request of linked semantics from remoteCSE
+					vc_cse1.start(f_cse_retrieveResourceHandler(v_semanticDescriptorCse1Index));
+					
+					// Send UPDATE request to virtual resource <semanticValidation>
+					v_semanticValidationAddress := f_getResourceAddress(v_ontologyRepoIndex) & "/" & c_resourceShortNameSemanticValidation;
+					p_updateRequestPrimitive.to_ := v_semanticValidationAddress;
+					v_updateRequest := f_getUpdateRequestPrimitive(int24, v_ontologyRepoIndex, p_updateRequestPrimitive);
+					
+					f_send(e_mcaPort, m_request(v_updateRequest));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": received response with status UPDATED");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Wrong status code in Response Primitive.");
+						}
+                        [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+                            tc_ac.stop;
+                            setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+                        }
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while updating semantic descriptor resource type");
+						}
+					}
+
+					f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
+					vc_cse1.done;
+
+					// Postamble
+					f_cse_postamble_deleteResources();
+		
+					// Tear down
+					f_cf01Down();
+				}; // end f_CSE_SEM_UPD_007		
+				
+				/**
+				 * @desc Check that the IUT rejects the update request of a <semanticMashupJobProfile> resource, indicating a "NOT_ACCEPTABLE" error, when its inputDescriptor attribute value does not conform to the RDF/XML syntax as defined in RDF 1.1 XML Syntax.
+				 *  
+				 */
+				testcase TC_CSE_SEM_UPD_008() runs on Tester system CseSystem {
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+
+					v_ae1.start(f_CSE_SEM_UPD_008());
+					v_ae1.done;					
+				}
+				
+				function f_CSE_SEM_UPD_008() runs on AeSimu system CseSystem {
+					// Local variables
+					var integer v_acpAuxIndex := -1;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndexJobProfile := -1;
+					var RequestPrimitive v_updateRequest;
+					var XSD.Base64Binary v_invalidInputDescriptor := int2oct(0,65537);
+											   
+					// Test control
+                
+					// Test component configuration
+					f_cf01Up();
+                
+					// Test adapter configuration
+                
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+					
+					// Create JobProfile resource
+					v_resourceIndexJobProfile := f_cse_createResource(int40, m_createSemanticMashupJobProfileBase, v_aeIndex); 
+					
+					// Update semanticMashupJobProfile
+					v_updateRequest := f_getCreateRequestPrimitive(int40, m_updateSemanticMashupJobProfileBase, v_resourceIndexJobProfile);
+					v_updateRequest.primitiveContent.semanticMashupJobProfile.inputDescriptor := v_invalidInputDescriptor;
+					
+					f_send(e_mcaPort, m_request(v_updateRequest));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int5207))) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Rejected the creation request of Semantic Mashup Job Profile with reason NOT_ACCEPTABLE");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(?))) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while creating Semantic Mashup Job profile");
+						}
+					}		
+                					
+					// Postamble
+					f_cse_postamble_deleteResources();
+                		
+					// Tear down
+					f_cf01Down();
+					
+				}; // end TC_CSE_SEM_UPD_008	
+				
+				/**
+				 * @desc Check that the IUT rejects the update request of a <semanticMashupJobProfile> resource, indicating a "NOT_ACCEPTABLE" error, when its outputDescriptor attribute value does not conform to the RDF/XML syntax as defined in RDF 1.1 XML Syntax.
+				 *  
+				 */
+				testcase TC_CSE_SEM_UPD_009() runs on Tester system CseSystem {
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+
+					v_ae1.start(f_CSE_SEM_UPD_009());
+					v_ae1.done;					
+				}
+				
+				function f_CSE_SEM_UPD_009() runs on AeSimu system CseSystem {
+					// Local variables
+					var integer v_acpAuxIndex := -1;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndexJobProfile := -1;
+					var RequestPrimitive v_updateRequest;
+					var XSD.Base64Binary v_invalidOutputDescriptor := int2oct(0,65537);
+											   
+					// Test control
+                
+					// Test component configuration
+					f_cf01Up();
+                
+					// Test adapter configuration
+                
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+					
+					// Create JobProfile resource
+					v_resourceIndexJobProfile := f_cse_createResource(int40, m_createSemanticMashupJobProfileBase, v_aeIndex); 
+					
+					// Update semanticMashupJobProfile
+					v_updateRequest := f_getCreateRequestPrimitive(int40, m_updateSemanticMashupJobProfileBase, v_resourceIndexJobProfile);
+					v_updateRequest.primitiveContent.semanticMashupJobProfile.outputDescriptor := v_invalidOutputDescriptor;
+					
+					f_send(e_mcaPort, m_request(v_updateRequest));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int5207))) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Rejected the creation request of Semantic Mashup Job Profile with reason NOT_ACCEPTABLE");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(?))) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while creating Semantic Mashup Job profile");
+						}
+					}		
+                					
+					// Postamble
+					f_cse_postamble_deleteResources();
+                		
+					// Tear down
+					f_cf01Down();
+					
+				}; // end TC_CSE_SEM_UPD_009	
+				
+				/**
+				 * @desc Check that the IUT rejects the update request of a <semanticMashupJobProfile> resource, indicating a "NOT_ACCEPTABLE" error, when its functionDescriptor attribute value does not conform to the RDF/XML syntax as defined in RDF 1.1 XML Syntax.
+				 *  
+				 */
+				testcase TC_CSE_SEM_UPD_010() runs on Tester system CseSystem {
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+
+					v_ae1.start(f_CSE_SEM_UPD_010());
+					v_ae1.done;					
+				}
+				
+				function f_CSE_SEM_UPD_010() runs on AeSimu system CseSystem {
+					// Local variables
+					var integer v_acpAuxIndex := -1;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndexJobProfile := -1;
+					var RequestPrimitive v_updateRequest;
+					var XSD.Base64Binary v_invalidFunctionDescriptor := int2oct(0,65537);
+											   
+					// Test control
+                
+					// Test component configuration
+					f_cf01Up();
+                
+					// Test adapter configuration
+                
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+					
+					// Create JobProfile resource
+					v_resourceIndexJobProfile := f_cse_createResource(int40, m_createSemanticMashupJobProfileBase, v_aeIndex); 
+					
+					// Update semanticMashupJobProfile
+					v_updateRequest := f_getCreateRequestPrimitive(int40, m_updateSemanticMashupJobProfileBase, v_resourceIndexJobProfile);
+					v_updateRequest.primitiveContent.semanticMashupJobProfile.functionDescriptor := v_invalidFunctionDescriptor;
+					
+					f_send(e_mcaPort, m_request(v_updateRequest));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int5207))) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Rejected the creation request of Semantic Mashup Job Profile with reason NOT_ACCEPTABLE");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(?))) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while creating Semantic Mashup Job profile");
+						}
+					}		
+                					
+					// Postamble
+					f_cse_postamble_deleteResources();
+                		
+					// Tear down
+					f_cf01Down();
+					
+				}; // end TC_CSE_SEM_UPD_010	
+				
+				/**
+				 * @desc Check that the IUT rejects the creation request of a <semanticMashupJobProfile> resource, indicating a "NOT_ACCEPTABLE" error, when its memberFilter attribute value does not conform to a valid SPARQL query request.
+				 *  
+				 */
+				testcase TC_CSE_SEM_UPD_011() runs on Tester system CseSystem {
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+
+					v_ae1.start(f_CSE_SEM_UPD_011());
+					v_ae1.done;					
+				}
+				
+				function f_CSE_SEM_UPD_011() runs on AeSimu system CseSystem {
+					// Local variables
+					var integer v_acpAuxIndex := -1;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndexJobProfile := -1;
+					var RequestPrimitive v_updateRequest;
+					var Sparql v_invalidMemberFilter := "{SELECT \?name WHERE { \?x foaf:name  \?name FILTER regex(\?name, \^mem\, \i\ }";
+											   
+					// Test control
+                
+					// Test component configuration
+					f_cf01Up();
+                
+					// Test adapter configuration
+                
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+					
+					// Create JobProfile resource
+					v_resourceIndexJobProfile := f_cse_createResource(int40, m_createSemanticMashupJobProfileBase, v_aeIndex); 
+					
+					// Update semanticMashupJobProfile
+					v_updateRequest := f_getCreateRequestPrimitive(int40, m_updateSemanticMashupJobProfileBase, v_resourceIndexJobProfile);
+					v_updateRequest.primitiveContent.semanticMashupJobProfile.memberFilter := v_invalidMemberFilter;
+					
+					f_send(e_mcaPort, m_request(v_updateRequest));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int5207))) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Rejected the creation request of Semantic Mashup Job Profile with reason NOT_ACCEPTABLE");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(?))) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while creating Semantic Mashup Job profile");
+						}
+					}		
+                					
+					// Postamble
+					f_cse_postamble_deleteResources();
+                		
+					// Tear down
+					f_cf01Down();
+					
+				}; // end TC_CSE_SEM_UPD_011	
+				
+			    /**
+				 * @desc Check that the IUT creates a new sematicMashupResult when the parameter smjpInputParameter is updated.
+				 *  
+				 */
+				testcase TC_CSE_SEM_UPD_012() runs on Tester system CseSystem {
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+
+					v_ae1.start(f_CSE_SEM_UPD_012());
+					v_ae1.done;					
+				}
+				
+				function f_CSE_SEM_UPD_012() runs on AeSimu system CseSystem {
+					// Local variables
+					var integer v_acpAuxIndex := -1;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndexJobProfile := -1;
+					var RequestPrimitive v_createReqSmi;
+					var RequestPrimitive v_updateReqSmi;
+
+					// Test control
+											   
+					// Test component configuration
+					f_cf01Up();
+					
+					// Test adapter configuration
+
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+					
+					// semanticMashupJobProfile
+					v_resourceIndexJobProfile := f_cse_createResource(int40, m_createSemanticMashupJobProfileBase, v_aeIndex); 
+
+					// create semanticMashupInstance template with default mandatory values.
+					v_createReqSmi := f_getCreateRequestPrimitive(int41, m_createSemanticMashupInstanceBase, v_aeIndex);
+					// link semanticMashupInstance with semanticMashupJobProfile
+					v_createReqSmi.primitiveContent.semanticMashupInstance.smjpID := f_getResourceAddress(v_resourceIndexJobProfile);
+					
+					// create semanticMashupInstance resource
+					f_cse_createResource(int41, v_createReqSmi, v_aeIndex);
+
+					// Update semanticMashupInstance resource
+					v_updateReqSmi := f_getCreateRequestPrimitive(int41, m_updateSemanticMashupInstanceBase, v_aeIndex);
+					v_updateReqSmi.primitiveContent.semanticMashupInstance.smjpInputParameter := '5678'O; //TO DO 
+				
+					f_send(e_mcaPort, m_request(v_updateReqSmi));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": semanticMashupInstance Updated.");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Wrong status code in Response Primitive.");
+						}
+                        [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+                            tc_ac.stop;
+                            setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+                        }
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while updating Semantic Mashup Instance resource");
+						}
+					}		
+                					
+					// Postamble
+					f_cse_postamble_deleteResources();
+                		
+					// Tear down
+					f_cf01Down();
+				
+				}; // end TC_CSE_SEM_UPD_012	
+				
+				/**
+				 * @desc Check that the IUT changes the mashupMember attribute of sematicMashupInstance when the parameter memberStoreType is updated.
+				 *  
+				 */
+				testcase TC_CSE_SEM_UPD_013() runs on Tester system CseSystem {
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+
+					v_ae1.start(f_CSE_SEM_UPD_013());
+					v_ae1.done;					
+				}
+				
+				function f_CSE_SEM_UPD_013() runs on AeSimu system CseSystem {
+					// Local variables
+					var integer v_acpAuxIndex := -1;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndexJobProfile := -1;
+					var RequestPrimitive v_createReqSmi;
+					var RequestPrimitive v_updateReqSmi;
+					
+					
+					// Test control
+											   
+					// Test component configuration
+					f_cf01Up();
+					
+					// Test adapter configuration
+
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+					
+					// semanticMashupJobProfile
+					v_resourceIndexJobProfile := f_cse_createResource(int40, m_createSemanticMashupJobProfileBase, v_aeIndex); 
+
+					// create semanticMashupInstance template with default mandatory values.
+					v_createReqSmi := f_getCreateRequestPrimitive(int41, m_createSemanticMashupInstanceBase, v_aeIndex);
+					// link semanticMashupInstance with semanticMashupJobProfile
+					v_createReqSmi.primitiveContent.semanticMashupInstance.smjpID := f_getResourceAddress(v_resourceIndexJobProfile);
+					
+					// create semanticMashupInstance resource
+					f_cse_createResource(int41, v_createReqSmi, v_aeIndex);
+
+					// Update semanticMashupInstance resource
+					v_updateReqSmi := f_getCreateRequestPrimitive(int41, m_updateSemanticMashupInstanceBase, v_aeIndex);
+                    // default in created resource using m_createSemanticMashupInstanceBase is int1, change to int2 in update
+					v_updateReqSmi.primitiveContent.semanticMashupInstance.memberStoreType := int2; 
+				
+					f_send(e_mcaPort, m_request(v_updateReqSmi));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": semanticMashupInstance Updated.");
+						}
+                        [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
+                            tc_ac.stop;
+                            setverdict(fail, __SCOPE__ & ": Wrong status code in Response Primitive.");
+                        }
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while updating Semantic Mashup Instance resource");
+						}
+					}		
+                					
+					// Postamble
+					f_cse_postamble_deleteResources();
+                		
+					// Tear down
+					f_cf01Down();
+				
+				}; // end TC_CSE_SEM_UPD_013	
+			} // end of group Update
+			
+			group Retrieve {
+				
+				/**
+				 * @desc Check that the IUT generates a Response Status Code indicating a “NOT_ACCEPTABLE” error to a retrieve request of a <semanticFanOutPoint> resource when the request contains a semanticsFilter condition set to a non-valid SPARQL query request
+				 *  
+				 */
+				testcase TC_CSE_SEM_RET_001() runs on Tester system CseSystem {
+					// Local variables
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+									                
+					v_ae1.start(f_CSE_SEM_RET_001());
+					v_ae1.done;														
+														
+				}
+				
+				function f_CSE_SEM_RET_001() runs on AeSimu system CseSystem {
+
+					// Local variables
+					var MsgIn v_response;
+					var integer v_aeIndex := -1;
+					var integer v_acpIndex;
+					var ListOfURIs v_memberIDs;
+					var ListOfURIs v_membersAcpIds;
+					var template RequestPrimitive v_createAcp := m_createAcp("NotInitialized", "MyACP", -, -);
+					var template PrimitiveContent v_contentResponse;
+					var XSD.AnyURI v_fanoutPointAddress;
+					var RequestPrimitive v_containerRequestPrimitive := valueof(m_createContainer_noResourceName);					
+					var integer v_resourceIndex := -1;
+					var integer v_childResourceIndex1 := -1;
+					var integer v_groupIndex := -1;
+					var FilterCriteria v_filterCriteria := valueof(m_filterCriteria);
+
+					// Test control
+					if(not(PICS_ACP_SUPPORT)) {
+						setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case");
+						stop;
+					}
+                
+					// Test component configuration
+					f_cf01Up();
+                
+					// Test adapter configuration
+                
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();					
+					v_acpIndex := f_cse_createResource(int1, v_createAcp, -1); // AE child resource
+					v_memberIDs := {f_getResourceId(vc_resourcesList[v_aeIndex].resource)};
+					v_membersAcpIds := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)};				
+					v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int2, -, v_membersAcpIds,-), -1);
+					v_fanoutPointAddress := f_getResourceAddress(v_groupIndex) & "/" & c_resourceShortNameSemanticFanOutPoint;
+                		
+					// Test Body
+					v_filterCriteria.semanticsFilter_list[0] := "INVALID FILTER";
+					f_send(e_mcaPort, m_request(m_retrieveFilterCriteria(v_fanoutPointAddress, f_getOriginator(v_groupIndex), v_filterCriteria)));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int5207))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Error NOT_ACCEPTABLE while creating <semanticFanOutPoint> resource");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(?))) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Wrong response status code");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while creating resource");
+						}
+					}		
+                					
+					// Postamble
+					f_cse_postamble_deleteResources();
+                		
+					// Tear down
+					f_cf01Down();
+                						
+				};
+				
+				
+				/**
+				 * @desc Check that the IUT generates a <semanticMashupResult> resource as a child of a <semanticMashupInstance> when a retrieve operation is sent to its <mashup> virtual resource
+				 *  
+				 */				
+				testcase TC_CSE_SEM_RET_002() runs on Tester system CseSystem {
+					// Local variables
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+									                
+					v_ae1.start(f_CSE_SEM_RET_002());
+					v_ae1.done;														
+				}
+				
+				function f_CSE_SEM_RET_002() runs on AeSimu system CseSystem {
+
+					// Local variables
+					var MsgIn v_response;
+					var integer v_aeIndex := -1;
+					var integer v_semMiresourceIndex := -1;
+					var integer v_resourceIndexJobProfile := -1;
+					var template RequestPrimitive v_createRequestPrimitive := m_createSemanticMashupInstanceBase;
+											   
+					// Test control
+                
+					// Test component configuration
+					f_cf01Up();
+                
+					// Test adapter configuration
+                
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();					
+					f_checkAeSimuStatus();
+					
+					// semanticMashupJobProfile
+					v_resourceIndexJobProfile := f_cse_createResource(int40, m_createSemanticMashupJobProfileBase, v_aeIndex); 
+					f_checkAeSimuStatus();
+					
+                    // semanticMashupInstance
+					v_createRequestPrimitive.primitiveContent.semanticMashupInstance.smjpID := f_getResourceAddress(v_resourceIndexJobProfile);
+					v_semMiresourceIndex := f_cse_createResource(int41, v_createRequestPrimitive, v_aeIndex); 
+                		
+					// Test Body
+					f_send(e_mcaPort, m_request(m_retrieve((f_getResourceAddress(v_semMiresourceIndex) & "/" & c_resourceShortNameMashup), f_getOriginator(v_aeIndex))));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": semanticMashupResult resource is generated");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Unexpected Response Status code");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": wrong Response Status code");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer to Retrieve request");
+						}
+					}		
+                					
+					// Postamble
+					f_cse_postamble_deleteResources();
+                		
+					// Tear down
+					f_cf01Down();
+                						
+				};
+				
+				
+				/**
+				 * Check that the IUT generates a Response Status Code indicating a “NOT_ACCEPTABLE” error to a retrieve request of a <semanticFanOutPoint> resource when the request addresses a group resource with semanticSupportIndicator attribute set to “False”
+				 */
+				testcase TC_CSE_SEM_RET_003() runs on Tester system CseSystem {
+					// Local variables
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+									                
+					v_ae1.start(f_CSE_SEM_RET_003());
+					v_ae1.done;
+														
+				}
+				
+				function f_CSE_SEM_RET_003() runs on AeSimu system CseSystem {
+
+					// Local variables
+					var MsgIn v_response;
+					var XSD.AnyURI v_fanoutPointAddress;
+					var integer v_groupIndex := -1;
+					var integer v_aeIndex := -1;
+					var integer v_acpIndex;
+					var integer v_resourceIndex := -1;
+					var ListOfURIs v_memberIDs;
+					var ListOfURIs v_membersAcpIds;
+					var ResourceType p_resourceType := int9;
+					var RequestPrimitive v_containerRequestPrimitive := valueof(m_createContainer_noResourceName);
+					var template RequestPrimitive v_createAcp := m_createAcp("NotInitialized", "MyACP", -, -);
+					var template RequestPrimitive v_groupRequest;
+					var FilterCriteria v_filterCriteria := valueof(m_filterCriteria);
+					
+					// Test component configuration
+					f_cf01Up();
+                
+					// Test adapter configuration
+                
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();
+					v_acpIndex := f_cse_createResource(int1, v_createAcp, -1); // AE child resource
+					
+					v_memberIDs := {f_getResourceId(vc_resourcesList[v_aeIndex].resource)};
+					v_membersAcpIds := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)};
+					v_groupRequest := m_createGroup(2, v_memberIDs, omit, int2, -, v_membersAcpIds,-);
+					
+                    // create group ressource with semanticSupportIndicator FALSE
+					v_groupRequest.primitiveContent.group_.semanticSupportIndicator := false; 
+					v_groupIndex := f_cse_createResource(int9, v_groupRequest, -1);
+					v_fanoutPointAddress := f_getResourceAddress(v_groupIndex) & "/" & c_resourceShortNameSemanticFanOutPoint;
+										
+					// Test Body
+					v_filterCriteria.semanticsFilter_list[0] := "SELECT DISTINCT * WHERE { ?s ?p ?o } LIMIT 1";
+					f_send(e_mcaPort, m_request(m_retrieveFilterCriteria(v_fanoutPointAddress, f_getOriginator(v_groupIndex), v_filterCriteria)));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int5207))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Error NOT_ACCEPTABLE while retrieving <semanticFanOutPoint> resource");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(?))) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while creating resource");
+						}
+					}
+									
+					// Postamble
+					f_cse_postamble_deleteResources();
+                		
+					// Tear down
+					f_cf01Down();
+				};
+				
+				
+				/**
+				 * Check that the IUT accepts a valid semantic discovery request for target resource other than <semanticFanOutPoint>
+				 */
+				testcase TC_CSE_SEM_RET_004() runs on Tester system CseSystem {
+					// Local variables
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+									                
+					v_ae1.start(f_CSE_SEM_RET_004());
+					v_ae1.done;
+														
+				}
+				
+				function f_CSE_SEM_RET_004() runs on AeSimu system CseSystem {
+
+					// Local variables
+					var MsgIn v_response;
+					var XSD.AnyURI v_fanoutPointAddress;
+					var integer v_aeIndex := -1; 
+					var integer v_acpAuxIndex := -1; 
+					var integer v_acpIndex;
+					var integer v_resourceIndex := -1;
+					var template RequestPrimitive v_retrieveRequest;
+					var FilterCriteria v_filterCriteria := valueof(m_filterCriteria);
+					var XSD.AnyURI v_expectedURI := "ADD URI"; // TODO: add expected URI
+					
+					// Test component configuration
+					f_cf01Up();
+                
+					// Test adapter configuration
+                
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+		
+					v_resourceIndex := f_cse_createResource(int24, m_createSemanticDescriptorBase, v_aeIndex);
+
+					v_filterCriteria.semanticsFilter_list[0] := "SELECT DISTINCT * WHERE { ?s ?p ?o } LIMIT 1";
+					v_fanoutPointAddress := f_getResourceAddress(v_resourceIndex) & "/" & c_resourceShortNameSemanticFanOutPoint;
+					
+					// Test Body
+					v_retrieveRequest := m_retrieveFilterCriteria(v_fanoutPointAddress, f_getOriginator(v_resourceIndex), v_filterCriteria);
+					v_retrieveRequest.semanticQueryIndicator := false;
+					f_send(e_mcaPort, m_request(valueof(v_retrieveRequest)));
+					
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value v_response {
+							tc_ac.stop;
+
+							if(v_response.primitive.responsePrimitive.primitiveContent.uRI != v_expectedURI){
+								setverdict(fail, __SCOPE__ & ": Error: Value of uRI not as expected");
+							}else{
+								setverdict(pass, __SCOPE__ & ": Value of uRI as expected in response");
+							}
+							
+						}
+                        [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+                            tc_ac.stop;
+                            setverdict(fail, __SCOPE__ & ": Wrong response status code");
+                        }
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Unexpected response status code");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while creating resource");
+						}
+					}
+									
+					// Postamble
+					f_cse_postamble_deleteResources();
+                		
+					// Tear down
+					f_cf01Down();
+				};
+				
+				/**
+				 * Check that the IUT accepts a valid semantic discovery request for group members
+				 */
+				testcase TC_CSE_SEM_RET_005() runs on Tester system CseSystem {
+					// Local variables
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+									                
+					v_ae1.start(f_CSE_SEM_RET_005());
+					v_ae1.done;								
+				}
+				
+				function f_CSE_SEM_RET_005() runs on AeSimu system CseSystem {
+
+					// Local variables
+					var MsgIn v_response;
+					var XSD.AnyURI v_fanoutPointAddress;
+					var integer v_aeIndex := -1; 
+					var integer v_acpIndex;
+					var integer v_SdResourceIndex := -1;
+					var template RequestPrimitive v_createRequestPrimitive := m_createSemanticDescriptorBase;
+					var template RequestPrimitive v_retrieveRequest;
+					var FilterCriteria v_filterCriteria := valueof(m_filterCriteria);
+					var XSD.AnyURI v_expectedURI := "ADD URI"; // TODO: add expected URI
+					const octetstring v_descriptor := int2oct(0,65000);
+					var template RequestPrimitive v_groupRequest;
+					var integer v_groupIndex := -1;
+					var ListOfURIs v_memberIDs;
+					var ListOfURIs v_membersAcpIds;
+					var template RequestPrimitive v_createAcp := m_createAcp("NotInitialized", "MyACP", -, -);
+					
+					// Test component configuration
+					f_cf01Up();
+                
+					// Test adapter configuration
+					
+					//Preamble
+					
+                    // AE child resource
+					v_aeIndex := f_cse_preamble_registerAe();
+					v_acpIndex := f_cse_createResource(int1, v_createAcp, -1); 
+					
+                    //	semanticDescriptor
+					v_SdResourceIndex := f_cse_createResource(int24, v_createRequestPrimitive, v_aeIndex); 
+					
+					//  create group resource
+					v_memberIDs := {f_getResourceId(vc_resourcesList[v_aeIndex].resource), f_getResourceId(vc_resourcesList[v_SdResourceIndex].resource)};
+					v_membersAcpIds := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)};
+					v_groupRequest := m_createGroup(2, v_memberIDs, omit, int2, -, v_membersAcpIds,-);
+					v_groupRequest.primitiveContent.group_.semanticSupportIndicator := true;
+					v_groupIndex := f_cse_createResource(int9, v_groupRequest, -1);
+
+                    // semantic discovery
+					v_filterCriteria.semanticsFilter_list[0] := "SELECT DISTINCT * WHERE { ?s ?p ?o } LIMIT 1";
+					v_fanoutPointAddress := f_getResourceAddress(v_groupIndex) & "/" & c_resourceShortNameSemanticFanOutPoint;
+
+					// Test Body
+					f_send(e_mcaPort, m_request(m_retrieveFilterCriteria(v_fanoutPointAddress, f_getOriginator(v_groupIndex), v_filterCriteria)));
+					
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value v_response {
+							tc_ac.stop;
+							
+							if(v_response.primitive.responsePrimitive.primitiveContent.uRI != v_expectedURI){
+								setverdict(fail, __SCOPE__ & ": Error: Value of uRI not as expected");
+							}else{
+								setverdict(pass, __SCOPE__ & ": Response OK for retrieving and Value of uRI as expected in response");
+							}
+							
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Unexpected response status code");
+						}
+                        [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+                            tc_ac.stop;
+                            setverdict(fail, __SCOPE__ & ": Wrong response status code");
+                        }
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while creating resource");
+						}
+					}
+									
+					// Postamble
+					f_cse_postamble_deleteResources();
+                		
+					// Tear down
+					f_cf01Down();
+				};
+
+
+                /**
+                 * @desc Check that the IUT accepts a valid semantic discovery request for group members hosted at other CSE and sends a discovery request to the remote CSE
+                 *  
+                 */
+                testcase TC_CSE_SEM_RET_006() runs on Tester system CseSystem {
+                    // Local variables
+                    var template RequestPrimitive v_createRequest := m_createSemanticDescriptorBase;
+                    var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
+            
+                    v_cse1.start(f_CSE_SEM_RET_006(v_createRequest)); //Create SemanticDescriptor
+                    v_cse1.done;                    
+                }
+                
+                function f_CSE_SEM_RET_006(template RequestPrimitive p_createRequestPrimitive) runs on CseSimu system CseSystem {
+                        
+                    // Local variables
+                    var integer v_aeIndex, v_remoteCseIndex, v_targetResourceIndex := -1;
+                    var integer v_acpAuxIndex := -1;
+                    var integer v_resourceIndex := -1;                  
+                    var ResponseStatusCode v_responseStatusCode := int2004;
+                    var RequestPrimitive v_request;
+                    var ResourceType p_resourceType := int24;   //Semantic Descriptor
+                    var boolean v_validationEnable := true;
+                    const octetstring v_descriptor := int2oct(0,65000); //Base64Binary
+                    var XSD.AnyURI v_ontologyRef := "NotInitialized";
+                    var XSD.ID v_targetResourceAddress := "NotInitialized";
+                    var XSD.AnyURI v_fanoutPointAddress := "NotInitialized";    
+                    var FilterCriteria v_filterCriteria := valueof(m_filterCriteria);           
+                    var template RequestPrimitive v_retrieveRequestPrimitive := m_retrieveFilterCriteria(v_fanoutPointAddress, f_getOriginator(v_resourceIndex), v_filterCriteria);
+                    
+                    // Test control
+    
+                    // Test component configuration
+                    f_cf02UpCseSimuMaster();
+    
+                    // Test adapter configuration
+                    
+                    // Preamble
+                    vc_ae1.start(f_cse_preamble_registerAe());              
+                    vc_ae1.done;
+					f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
+                    v_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, {f_getCompletePoA()}));
+                                        
+                    // Test Body
+                    v_aeIndex := f_getLatestResource(vc_ae1);
+                    v_targetResourceIndex := f_generateAndSetLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), v_aeIndex, int24);
+
+                    v_retrieveRequestPrimitive.primitiveContent.semanticDescriptor.validationEnable := v_validationEnable;
+                    v_retrieveRequestPrimitive.primitiveContent.semanticDescriptor.descriptor := v_descriptor;
+                    v_retrieveRequestPrimitive.primitiveContent.semanticDescriptor.ontologyRef := v_ontologyRef;
+                                                                                                                                            
+                    v_retrieveRequestPrimitive.to_ := f_getResourceAddress(v_resourceIndex);
+                    v_retrieveRequestPrimitive.from_ := f_getOriginator(v_aeIndex); 
+                    
+                    v_retrieveRequestPrimitive := m_retrieveFilterCriteria(v_fanoutPointAddress, f_getOriginator(v_resourceIndex), v_filterCriteria);
+
+                    vc_ae1.start(f_cse_operationResource(v_retrieveRequestPrimitive));  
+                    
+                    tc_ac.start;
+                    alt {
+                        [] mccPortIn.receive(mw_request(mw_retrieve(v_targetResourceAddress))) -> value vc_request {
+                            tc_ac.stop;
+                            setverdict(pass, __SCOPE__ & ": Retrieved the referenced ontology successfully.");
+							f_processRetrieveRequestPrimitive(vc_request.primitive.requestPrimitive);
+							f_send(e_mccPortIn, m_response(vc_response.primitive.responsePrimitive));
+						}
+						[] mccPortIn.receive(mw_request(?)) -> value vc_request {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Wrong request received");
+							f_send(e_mccPortIn, m_response(m_responsePrimitive(int4000, vc_request.primitive.requestPrimitive.requestIdentifier)));
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while retargeting request");
+						}
+					}
+                    
+                    f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
+    
+                    // Postamble
+                    f_cse_postamble_deleteResourcesCSE();
+    
+                    // Tear down
+                    f_cf02DownCseSimuMaster();
+                    
+                }//end f_CSE_SEM_RET_006
+
+               /**
+                 * @desc Check that the IUT accepts a valid semantic discovery response for group members hosted at other CSE and sends a discovery response to the originating AE
+                 * 
+                 */
+                testcase TC_CSE_SEM_RET_007() runs on Tester system CseSystem {
+                    
+                    var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+                                                    
+                    v_ae1.start(f_CSE_SEM_RET_007());
+                                                
+                    v_ae1.done;
+                                                    
+                }
+                                                
+                function f_CSE_SEM_RET_007() runs on AeSimu system CseSystem {
+                    //Local constants
+                    const integer c_maxNrOfMembers := 2;
+                    const ResourceType c_ResourceTypeGroup := int9;  
+                    
+                    // Local variables
+                    var MsgIn v_response;
+                    var RequestPrimitive v_request;
+                    var integer v_aeIndex := -1;
+                    var integer v_groupIndex := -1;
+                    var integer v_containerIndex_1 := -1;
+                    var XSD.ID v_remoteContainerAddress, v_remoteGroupAddress;
+                    var XSD.AnyURI v_memberId_1;
+                    var template RequestPrimitive v_createRequest := m_createGroupBase;
+                    var PrimitiveContent v_primitiveContentRetrievedResource;
+
+                    var XSD.AnyURI v_fanoutPointAddress := "NotInitialized";
+                    var integer v_resourceIndex := -1;                           
+                    var FilterCriteria v_filterCriteria := valueof(m_filterCriteria);           
+                    var template RequestPrimitive v_retrieveRequestPrimitive := m_retrieveFilterCriteria(v_fanoutPointAddress, f_getOriginator(v_resourceIndex), v_filterCriteria);
+         
+                    // Test control
+        
+                    // Test component configuration
+                    f_cf02Up();
+    
+                    // Test adapter configuration
+        
+                    // Preamble
+                    v_aeIndex := f_cse_preamble_registerAe();
+                    
+                    vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSEBase()));
+                    f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
+                    
+                    vc_cse1.start(f_generateAndSetLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), -, int3));
+                    f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
+                    
+                    v_remoteContainerAddress := f_getLatestLocalResourceAddress(vc_cse1, e_nonHierarchical, e_cseRelative);
+                    
+                    vc_cse1.start(f_generateAndSetLocalResource(m_primitiveContentGroup(m_contentCreateGroup(1, {v_remoteContainerAddress}, omit, int3, -, -, -)), -, int9));
+                    f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
+                    
+                    v_remoteGroupAddress := f_getLatestLocalResourceAddress(vc_cse1, e_nonHierarchical, e_spRelative);
+                    
+                    v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource
+                    
+                    v_memberId_1 := f_getResourceId(vc_resourcesList[v_containerIndex_1].resource);
+                    
+                    v_createRequest := valueof(m_createGroup(c_maxNrOfMembers, {v_memberId_1}, omit, int3));
+                    
+                    v_groupIndex :=  f_cse_createResource(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
+        
+                    //Test Body
+                    v_retrieveRequestPrimitive := m_retrieveFilterCriteria(v_fanoutPointAddress, f_getOriginator(v_resourceIndex), v_filterCriteria);
+
+                    f_send(e_mcaPort, m_request(valueof(v_retrieveRequestPrimitive)));
+                    tc_ac.start;
+                    alt {
+                        [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value v_response {
+                            tc_ac.stop;
+                            
+                            if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.group_.memberTypeValidated)) {
+                                setverdict(fail, __SCOPE__ & ": Error, memberTypeValidated attribute not provided");    
+                             } else {
+                                if(v_response.primitive.responsePrimitive.primitiveContent.group_.memberTypeValidated == false) {
+                                    if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.group_.memberIDs) != 2) {
+                                        setverdict(fail, __SCOPE__ & ": Error, wrong number of memberIDs attribute"); 
+                                    } else {
+                                        if(v_response.primitive.responsePrimitive.primitiveContent.group_.memberIDs[0] == v_memberId_1 and v_response.primitive.responsePrimitive.primitiveContent.group_.memberIDs[1] == v_remoteGroupAddress & "/" & "fopt") {
+                                            setverdict(pass, __SCOPE__ & ": update successful");       
+                                        } else {
+                                            setverdict(fail, __SCOPE__ & ": Error, wrong memberIDs");   
+                                        }
+                                    }
+                                } else {
+                                    setverdict(fail, __SCOPE__ & ": Error, memberTypeValidated must be set to FALSE");  
+                                }   
+                            }                            
+                        }
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": wrong status code in Response Primitive.");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+						}                         [] tc_ac.timeout {
+                             setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
+                         }
+                     }
+        
+                    v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_groupIndex);
+                    if(getverdict == pass){ 
+                         if(ischosen(v_primitiveContentRetrievedResource.group_)){
+                            if(v_primitiveContentRetrievedResource.group_.memberTypeValidated != false){
+                                setverdict(fail, __SCOPE__ & ": Error,  memberTypeValidated attribute not updated");
+                            }
+
+                            if((v_primitiveContentRetrievedResource.group_.memberIDs[0] != v_memberId_1) and (v_primitiveContentRetrievedResource.group_.memberIDs[1] != v_remoteGroupAddress & "/" & "fopt")){
+                                setverdict(fail, __SCOPE__ & ": Error,  memberIDs attribute not correct");
+                            }
+                          }
+                     }
+        
+                    //Postamble
+                    f_cse_postamble_deleteResources();
+    
+                    // Tear down
+                    f_cf02Down();
+                } 
+                
+				/*
+				 * Check that the IUT retrieves relatedSemantics in a valid semantic discovery request
+				 */
+				testcase TC_CSE_SEM_RET_008() runs on Tester system CseSystem {
+					// Local variables
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+									                
+					v_ae1.start(f_CSE_SEM_RET_008());
+					v_ae1.done;
+														
+				}
+				
+				function f_CSE_SEM_RET_008() runs on AeSimu system CseSystem {
+			
+					//Local variables
+					var integer v_aeIndex := -1;
+					var integer v_remoteCseIndex := -1;
+					var integer v_targetResourceIndex := -1;
+					var XSD.AnyURI v_uriSemanticDescriptorCse1 := "NotInitialized"; 
+					var template (omit) ListOfURIs v_relatedSemantics := {"NotInitialized"};
+					var template RequestPrimitive v_requestSdAe;
+					var integer v_SdAeResourceIndex := -1;
+					var template (omit) ListOfURIs uRIList := {"NotInitialized"};
+					var FilterCriteria v_filterCriteria := valueof(m_filterCriteria);
+					var integer v_ae2LocalIndex;
+					
+					// Test control
+        
+					// Test component configuration
+					f_cf02Up();
+    
+					// Test adapter configuration
+        
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();
+					// Register remote CSE
+					vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSEBase()));
+					f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
+					v_remoteCseIndex := f_getLatestResourceIndex(vc_cse1);
+                    
+					// Create Semantic Descriptor in CSE1.
+					vc_cse1.start(f_generateAndSetLocalResource(valueof(m_primitiveContentSemanticDescriptor(m_contentCreateSemanticDescriptor)), -, int24));
+					f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
+					v_uriSemanticDescriptorCse1 := f_getLatestLocalResourceAddress(vc_cse1, e_nonHierarchical, e_cseRelative);
+                    
+					//	Create Semantic Descriptor under AE1 with Related Semantics pointing to Semantic Descriptor in CSE1.
+					v_relatedSemantics := {v_uriSemanticDescriptorCse1};
+					v_requestSdAe := m_createSemanticDescriptorBase;
+					v_requestSdAe.primitiveContent.semanticDescriptor.relatedSemantics := v_relatedSemantics;
+					v_SdAeResourceIndex := f_cse_createResource(int24, v_requestSdAe, v_aeIndex); 
+
+					// TODO: Compose query such a way that result of query is URIs of AE1 and CSE1
+					v_filterCriteria.semanticsFilter_list[0] := "SELECT DISTINCT * WHERE { ?s ?p ?o } LIMIT 1"; 
+					
+					// Start retrive handler in CSE1
+					vc_cse1.start(f_cse_retrieveResourceHandler(v_targetResourceIndex));
+					
+					//Send Semantic Discovery
+					f_send(e_mcaPort, m_request(m_retrieveFilterCriteria(f_getResourceAddress(v_SdAeResourceIndex), f_getOriginator(v_aeIndex), v_filterCriteria)));
+					uRIList := {f_getResourceAddress(v_aeIndex), f_getResourceAddress(v_remoteCseIndex)};
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responseDiscovery(uRIList))) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Response OK received with expected URI list");
+						}
+						[] mcaPort.receive(mw_response(mw_responseDiscovery(?))) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Response with unexpected URI list");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while creating resource");
+						}
+					}
+					
+					f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
+					vc_cse1.done;
+					
+					//Postamble
+					f_cse_postamble_deleteResources();
+    
+					// Tear down
+					f_cf02Down();
+				}//end function f_CSE_SEM_RET_008	
+
+
+				/*
+			 	* Check that the IUT retrieves relatedSemantics in a valid semantic discovery request
+			 	*/
+				testcase TC_CSE_SEM_RET_009() runs on Tester system CseSystem {
+					// Local variables
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+							                
+					v_ae1.start(f_CSE_SEM_RET_009());
+					v_ae1.done;
+												
+				}
+		
+				function f_CSE_SEM_RET_009() runs on AeSimu system CseSystem {
+					//Local Variables
+					var template RequestPrimitive v_createRequestContainer := m_createContainerBase;
+					var template RequestPrimitive v_createRequestContentInstance := m_createContentInstanceBase;
+					var integer v_aeIndex := -1;
+					var integer v_acpAuxIndex := -1;
+					var integer v_containerIndex := -1;
+					var integer v_contentInstanceIndex := -1;
+					var FilterCriteria v_filterCriteria := valueof(m_filterCriteria);
+					var template PrimitiveContent v_responseContent;
+				
+					// Test control
+	
+					// Test component configuration
+					f_cf01Up();
+	
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+				
+					//Create <container>
+					v_containerIndex := f_cse_createResource(int3, v_createRequestContainer, v_aeIndex);
+					v_createRequestContentInstance.primitiveContent.contentInstance.contentInfo := "application/json:1";//base 64 encoding
+					//Create <contentInstance>
+					//  TO DO: to use base64 encoding function
+					v_createRequestContentInstance.primitiveContent.contentInstance.content := "InsgInRhYmxlIjogeyJ2YWx1ZSI6IDMwfSwgfSI=";//"{ "table": {"value": 30}, }" 
+	
+					v_contentInstanceIndex := f_cse_createResource(int4, v_createRequestContentInstance, v_containerIndex);
+				
+					//content based Semantic Discovery 
+					// TODO: Compose a query that returns the URI of the content Instance created. ex: value > 20 
+					v_filterCriteria.contentFilterSyntax := int1; // JSON_PATH_SYNTAX
+					v_filterCriteria.contentFilterQuery := "$..table[?(@.value > 10)]";
+					f_send(e_mcaPort, m_request(m_retrieveFilterCriteria(f_getResourceAddress(v_containerIndex), f_getOriginator(v_aeIndex), v_filterCriteria)));
+				
+					v_responseContent.uRIList := {f_getResourceAddress(v_containerIndex)};
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_responseContent))) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Response OK received with expected URI list");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Wrong status code in Response Primitive.");
+						}
+                        [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+                            tc_ac.stop;
+                            setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+                        }
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while creating resource");
+						}
+					}
+			
+					// Postamble
+					f_cse_postamble_deleteResources();
+	
+					// Tear down
+					f_cf01Down();
+				}	
+
+				/**
+				 * Check that the IUT returns successfully the attributes of the <semanticMashupJobProfile> resource
+				 */
+				testcase TC_CSE_SEM_RET_010() runs on Tester system CseSystem {
+					// Local variables
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+									                
+					v_ae1.start(f_CSE_SEM_RET_010());
+					v_ae1.done;
+														
+				}
+				
+				function f_CSE_SEM_RET_010() runs on AeSimu system CseSystem {
+
+					// Local variables
+					var MsgIn v_response;
+					var template RequestPrimitive v_retrieveRequest;
+					var template RequestPrimitive v_createRequestPrimitive := m_createSemanticMashupJobProfileBase;
+					var integer v_aeIndex := -1; 
+					var integer v_acpAuxIndex := -1; 
+					var integer v_resourceIndex := -1;
+					var template PrimitiveContent v_contentResponse;
+									
+					
+					// Test component configuration
+					f_cf01Up(true);
+            
+					// Test adapter configuration
+            
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63); 
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+					v_resourceIndex := f_cse_createResource(int40, v_createRequestPrimitive, v_aeIndex); //SemanticMashupJobProfile
+					
+					// Test Body
+					v_retrieveRequest := m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex));
+					f_send(e_mcaPort, m_request(valueof(v_retrieveRequest)));
+					v_contentResponse.semanticMashupJobProfile := mw_retrievSemanticMashupJobProfile; // check for attributes of resource representation
+					
+					
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Response OK for retrieving");
+						}
+                        [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, ?))) -> value v_response {
+                            tc_ac.stop;
+                            setverdict(fail, __SCOPE__ & ": Response OK for retrieving, but wrong content");
+                        }
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Wrong status code in Response Primitive.");
+						}
+                        [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+                            tc_ac.stop;
+                            setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+                        }
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while creating resource");
+						}
+					}
+					
+								
+					// Postamble
+					f_cse_postamble_deleteResources();
+            		
+					// Tear down
+					f_cf01Down();
+				};
+				
+				/**
+				 * Check that the IUT returns successfully the attributes of the <semanticMashupInstance> resource
+				 */
+				testcase TC_CSE_SEM_RET_011() runs on Tester system CseSystem {
+					// Local variables
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+									                
+					v_ae1.start(f_CSE_SEM_RET_011());
+					v_ae1.done;
+														
+				}
+				
+				function f_CSE_SEM_RET_011() runs on AeSimu system CseSystem {
+
+					// Local variables
+					var MsgIn v_response;
+					var template RequestPrimitive v_retrieveRequest;
+					var template RequestPrimitive v_createRequestPrimitive := m_createSemanticMashupInstanceBase;
+					var integer v_aeIndex := -1;
+					var integer v_acpAuxIndex := -1;
+					var integer v_resourceIndex := -1;
+					var template PrimitiveContent v_contentResponse;
+									
+					// Test component configuration
+					f_cf01Up(true);
+            
+					// Test adapter configuration
+            
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+					v_resourceIndex := f_cse_createResource(int41, v_createRequestPrimitive, v_aeIndex); //SemanticMashupInstance
+					
+					// Test Body
+					v_retrieveRequest := m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex));
+					f_send(e_mcaPort, m_request(valueof(v_retrieveRequest)));
+					v_contentResponse.semanticMashupInstance := mw_retrievSemanticMashupInstance; // check for attributes of resource representation
+					
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Response OK for retrieving");							
+						}
+                        [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, ?))) -> value v_response {
+                            tc_ac.stop;
+                            setverdict(fail, __SCOPE__ & ": Response OK for retrieving, but wrong content");                           
+                        }
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Wrong status code in Response Primitive.");
+						}
+                        [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+                            tc_ac.stop;
+                            setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+                        }
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while creating resource");
+						}
+					}
+					
+								
+					// Postamble
+					f_cse_postamble_deleteResources();
+            		
+					// Tear down
+					f_cf01Down();
+				};
+								
+				/**
+				 * Check that the IUT returns successfully the attributes of the <semanticMashupResult> resource
+				 */
+				testcase TC_CSE_SEM_RET_012() runs on Tester system CseSystem {
+					// Local variables
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+									                
+					v_ae1.start(f_CSE_SEM_RET_012());
+					v_ae1.done;
+														
+				}
+				
+				function f_CSE_SEM_RET_012() runs on AeSimu system CseSystem {
+
+					// Local variables
+					var MsgIn v_response;
+					var template RequestPrimitive v_retrieveRequest;
+					var ResourceType p_resourceType := int42;	//semanticMashupResult
+					var template RequestPrimitive p_createRequestPrimitive := m_createSemanticMashupResultBase;
+					var integer v_aeIndex := -1;
+					var integer v_acpAuxIndex := -1;
+					var integer v_resourceIndex := -1;
+					var template PrimitiveContent v_contentResponse;
+									
+					// Test component configuration
+					f_cf01Up(true);
+            
+					// Test adapter configuration
+            
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+					v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_aeIndex); //SemanticMashupResult
+					v_contentResponse.semanticMashupResult := mw_retrievSemanticMashupResult; // check for attributes of resource representation	
+					
+					// Test Body
+					v_retrieveRequest := m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex));
+					f_send(e_mcaPort, m_request(valueof(v_retrieveRequest)));
+					
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Response OK for retrieving");
+						}
+                        [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, ?))) -> value v_response {
+                            tc_ac.stop;
+                            setverdict(fail, __SCOPE__ & ": Response OK for retrieving, but wrong content");
+                        }
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Wrong status code in Response Primitive.");
+						}
+                        [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+                            tc_ac.stop;
+                            setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+                        }
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while creating resource");
+						}
+					}
+					
+								
+					// Postamble
+					f_cse_postamble_deleteResources();
+            		
+					// Tear down
+					f_cf01Down();
+				};	
+			} // end of group Retrieve
+			
+			group Delete {
+				
+				/**
+				 * @desc Check that the IUT delete all <semanticMashupInstance> child resources when their parent <semanticMashupJobProfile> receives a delete request
+				 *  
+				 */				
+				testcase TC_CSE_SEM_DEL_001() runs on Tester system CseSystem {
+					// Local variables
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+									                
+					v_ae1.start(f_CSE_SEM_DEL_001());
+					v_ae1.done;													
+				}
+				
+				function f_CSE_SEM_DEL_001() runs on AeSimu system CseSystem {
+
+					// Local variables
+					var MsgIn v_response;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+					var integer v_resourceIndex1 := -1;
+					var integer v_resourceIndex2 := -1;
+					var integer v_childResourceIndex1 := -1;
+					var integer v_childResourceIndex2 := -1;
+					var integer v_ae2Index := -1;
+					var ResourceType v_resourceTypeJobProfile := int40;
+					var ResourceType v_childResourceType1 := int41;
+					var template RequestPrimitive v_createRequestPrimitiveChildResource1 := m_createSemanticMashupInstanceBase;
+					var ResourceType v_childResourceType2 := int41;
+					var template RequestPrimitive v_createRequestPrimitiveChildResource2 := m_createSemanticMashupInstanceBase;
+                							   
+					// Test control
+                
+					// Test component configuration
+					f_cf01Up(true);
+                
+					// Test adapter configuration
+                
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();
+					
+                    //	create semanticMashupJobProfile
+					v_resourceIndex := f_cse_createResource(v_resourceTypeJobProfile, m_createSemanticMashupJobProfileBase, v_aeIndex); 
+                
+					v_createRequestPrimitiveChildResource1.primitiveContent.semanticMashupInstance.smjpID := f_getOriginator(v_resourceIndex);
+					v_createRequestPrimitiveChildResource2.primitiveContent.semanticMashupInstance.smjpID := f_getOriginator(v_resourceIndex);
+                    //	semanticMashupInstance
+					v_childResourceIndex1 := f_cse_createResource(v_childResourceType1, v_createRequestPrimitiveChildResource1, v_resourceIndex); 
+					v_childResourceIndex2 := f_cse_createResource(v_childResourceType2, v_createRequestPrimitiveChildResource2, v_resourceIndex); 
+                												
+					// Test Body
+					f_cse_deleteResource(v_resourceIndex);
+					f_checkAeSimuStatus();               		
+
+
+					f_send(e_mccPortIn, m_request(m_delete(f_getResourceAddress(v_childResourceIndex1), f_getOriginator(v_childResourceIndex2))));
+					
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Delete successful");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Wrong status code in Response Primitive.");
+						}
+                        [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+                            tc_ac.stop;
+                            setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+                        }
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while deleting resource");
+						}
+					}		
+                					
+					// Postamble
+					f_cse_postamble_deleteResources();
+                		
+					// Tear down
+					f_cf01Down();
+                						
+				};
+						
+				/**
+				 * @desc Check that the IUT notifies all <semanticMashupInstance> resources referenced in the smiID attribute when the corresponding <semanticMashupJobProfile> receives a delete request
+				 *  
+				 */				
+				testcase TC_CSE_SEM_DEL_002() runs on Tester system CseSystem {
+					// Local variables
+					var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
+            
+					v_cse1.start(f_CSE_SEM_DEL_002()); 
+					v_cse1.done;  			
+				}
+				
+				function f_CSE_SEM_DEL_002() runs on CseSimu system CseSystem {
+					var integer v_aeIndex := -1;
+					var integer v_remoteCseIndex := -1;
+					var ResponsePrimitive v_response;
+					var template RequestPrimitive v_createRequestJobProfile := m_createSemanticMashupJobProfileBase;
+					var integer v_semanticDescriptorCse1Index := -1;
+					var integer v_resourceIndexJobProfile := -1;
+					var XSD.AnyURI v_uriSemanticMashupInstance;
+					var RequestPrimitive v_deleteRequest;
+			
+					// Test control
+        
+					// Test component configuration
+					f_cf02UpCseSimuMaster();
+    
+					// Test adapter configuration
+        
+					// Preamble - register AE
+					vc_ae1.start(f_cse_preamble_registerAe());              
+					vc_ae1.done;
+					f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
+					v_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, {f_getCompletePoA()}));
+
+					// Create local <semanticMashupInstance> in remote CSE
+					v_semanticDescriptorCse1Index := f_generateAndSetLocalResource(valueof(m_primitiveContentSemanticMashupInstance(m_contentSemanticMashupInstance)), -, int24);
+					v_uriSemanticMashupInstance := f_getResourceAddress(v_semanticDescriptorCse1Index);
+
+					//Create <semanticMashupJobProfile> with link to <semanticMashupInstance> in IUT CSE
+					v_createRequestJobProfile.primitiveContent.semanticMashupJobProfile.smiID := {v_uriSemanticMashupInstance};
+					vc_ae1.start(f_cse_createResource(int40, v_createRequestJobProfile, v_aeIndex));
+					v_resourceIndexJobProfile := f_getLatestResourceIndex(vc_ae1);
+					
+					//Send delete request to <semanticMashupJobProfile>
+					v_deleteRequest := valueof(m_delete(f_getResourceAddress(v_resourceIndexJobProfile), f_getOriginator(v_resourceIndexJobProfile)));
+					vc_ae1.start(f_cse_operationResource(v_deleteRequest));
+					
+					//Expect Notify in remoteCSE
+					tc_ac.start;
+					alt {
+						[] mccPortIn.receive(mw_request(mw_notify)) -> value vc_request {
+							tc_ac.stop;
+							log(__SCOPE__&": Notify received");
+							v_response := valueof(m_responseNotification(int2000, omit));
+							v_response.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier;
+							f_send(e_mccPortIn, m_response(v_response));
+							setverdict(pass, __SCOPE__&":INFO: Notify received successfuly");
+						}
+						[] mccPortIn.receive(mw_request(?)) -> value vc_request {
+							tc_ac.stop;
+							log(__SCOPE__&": Unexpect Request primitive, Notify expected");
+							setverdict(inconc, __SCOPE__&":INFO: Unexpect Request primitive, Notify expected");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, __SCOPE__&":INFO: No answer while performing notification");
+						}
+					}
+					
+					f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);		
+					
+					//Postamble
+					f_cse_postamble_deleteResourcesCSE();
+						
+					// Tear down
+					f_cf02DownCseSimuMaster();
+				};		
+						
+				/**
+				 * @desc Check that the IUT deletes successfully <semanticMashupResult> resource
+				 *  
+				 */
+				testcase TC_CSE_SEM_DEL_003() runs on Tester system CseSystem {
+					// Local variables
+					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+									                
+					v_ae1.start(f_CSE_SEM_DEL_003());
+					v_ae1.done;														
+														
+				}
+			
+				function f_CSE_SEM_DEL_003() runs on AeSimu system CseSystem {
+					// Local variables
+					var MsgIn v_response;
+					var integer v_aeIndex := -1;
+					var integer v_semMiresourceIndex := -1;
+					var integer v_resourceIndexJobProfile := -1;
+					var template RequestPrimitive v_createRequestPrimitive := m_createSemanticMashupInstanceBase;
+					var PrimitiveContent v_primitiveContentMashupResult;
+					var integer v_primitiveContentMashupResultIndex := -1;
+					var URIList v_uriList := {};
+											   
+					// Test control
+                
+					// Test component configuration
+					f_cf01Up();
+                
+					// Test adapter configuration
+                
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();					
+					f_checkAeSimuStatus();
+					
+					// semanticMashupJobProfile
+					v_resourceIndexJobProfile := f_cse_createResource(int40, m_createSemanticMashupJobProfileBase, v_aeIndex); 
+					f_checkAeSimuStatus();
+					
+					// semanticMashupInstance creation, without creating Mashup result
+					v_createRequestPrimitive.primitiveContent.semanticMashupInstance.smjpID := f_getResourceAddress(v_resourceIndexJobProfile);
+					v_semMiresourceIndex := f_cse_createResource(int41, v_createRequestPrimitive, v_aeIndex); 
+					
+					v_primitiveContentMashupResult := f_cse_retrieveResource(v_semMiresourceIndex, c_resourceShortNameMashup);
+					v_primitiveContentMashupResultIndex := f_setResource(v_primitiveContentMashupResult, int42, v_semMiresourceIndex);
+					f_cse_deleteResource(v_primitiveContentMashupResultIndex);
+						
+					f_checkAeSimuStatus();
+
+					tc_ac.start;
+					alt {
+					 	[] mcaPort.receive(mw_response(mw_responsePrimitive(int2002)))  {
+					 		tc_ac.stop;
+					 		setverdict(pass, __SCOPE__ & ": SemanticMashupResult deleted successfully");
+					 	}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Wrong status code in Response Primitive.");
+						}
+                        [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+                            tc_ac.stop;
+                            setverdict(fail, __SCOPE__ & ": Unexpected status code in Response Primitive.");
+                        }
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while deleting resource");
+						}
+					}		
+				
+					// Postamble
+					f_cse_postamble_deleteResources();
+	
+					// Tear down
+					f_cf01Down();
+		         }
+			} // end of group Delete
+					
+		}// end group Semantic	
+	
 	}//end group CSE
 		
 }