diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn
index e55ad77043569bf30c08a982d63c1348167d1d3f..9fd88f45e595a6176a6c198abf41aca4406af9a6 100644
--- a/LibOneM2M/OneM2M_Functions.ttcn
+++ b/LibOneM2M/OneM2M_Functions.ttcn
@@ -1424,29 +1424,62 @@ module OneM2M_Functions {
     
 				} //end f_check_notificationContent	
 				
-			}// end of group NotificationFunctions 		
+			}// end of group NotificationFunctions 	
+			
+			/**
+			 * @desc Check that a resource is present in the IUT (resourceId is known)
+			 * @param p_resourceIndex Resource index 
+			 * @return boolean
+			 */
+			function f_cse_isResourcePresent (integer p_resourceIndex) runs on CseSimu return boolean {
+
+				//Check to see if the resource is present or not
+				mccPort.send(m_request(m_retrieveResource(f_getResourceAddress(p_resourceIndex), f_getOriginator(p_resourceIndex))));
+				tc_ac.start;
+				alt {
+					[] mccPort.receive(mw_response(mw_responsePrimitive(int2000))) {
+						tc_ac.stop;
+						setverdict(pass, testcasename() & ": Resource present: " & f_getResourceAddress(p_resourceIndex));
+						return true;
+					}
+					[] mccPort.receive(mw_response(mw_responsePrimitive(?, -))) {
+						tc_ac.stop;
+						setverdict(inconc, testcasename() & ": Wrong response status code in the response");
+						return false;
+					}
+					[] tc_ac.timeout {
+						setverdict(inconc, testcasename() & ": No answer while retrieving resource");
+						return false;
+					}
+				}	
+				return false;
+			}	
 	    		
 			/**
 			 * @desc Registration of Test System (simulating a CSE) to the CSE IUT (creation of remoteCSE)
 			 * @param p_requestPrimitive Template request primitive
 			 * @return Internal resource index of the created resource
 			 */
-			function f_cse_registerRemoteCse(in template RequestPrimitive p_requestPrimitive) runs on CseSimu return integer {
+			function f_cse_registerRemoteCse(in template RequestPrimitive p_requestPrimitive, in template PrimitiveContent p_contentResponse := ?) runs on CseSimu return integer {
     			
 				var MsgIn v_response;
 				var RequestPrimitive v_request;
 				var integer v_resourceIndex := -1;
+				var integer v_localResourceIndex := -1;
+				var PrimitiveContent v_remoteCSEResource;
 
 				v_request := f_getCreateRequestPrimitive(int16, p_requestPrimitive, -1);
 
 				mccPort.send(m_request(v_request));
 				tc_ac.start;
 				alt {
-					[] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+					[] mccPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
 						tc_ac.stop;
 						setverdict(pass, __SCOPE__&":INFO: Resource type RemoteCSE created successfuly");
 						f_checkAttributesToBeSaved(int16, v_request, v_response.primitive.responsePrimitive);
 						v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int16, -1);
+						v_remoteCSEResource := f_cse_generateLocalResource(v_response.primitive.responsePrimitive.primitiveContent, 1, int16);
+						v_localResourceIndex := f_setLocalResource(v_remoteCSEResource, int16, -1);
 					}
 					[] mccPort.receive(mw_response(mw_responsePrimitiveKO)) {
 						tc_ac.stop;
@@ -1477,6 +1510,7 @@ module OneM2M_Functions {
 				var MsgIn v_request;
 				var ResponsePrimitive v_response;
 				var PrimitiveContent v_remoteCSEResource;
+				var integer v_localResourceIndex := -1;
 				var integer v_resourceIndex := -1;
 
 				tc_ac.start;
@@ -1484,7 +1518,18 @@ module OneM2M_Functions {
 					[] mccPortIn.receive(mw_request(p_requestPrimitive)) -> value v_request {
 						tc_ac.stop;
 						setverdict(pass, __SCOPE__&":INFO: Resource type RemoteCSE created successfuly");
-						v_resourceIndex := f_cse_createLocalResource(v_request.primitive.requestPrimitive.primitiveContent, 1, int16, v_remoteCSEResource);//TODO Get index from v_request.primitive.requestPrimitive.to_
+						v_remoteCSEResource := f_cse_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, 1, int16);//TODO Get index from v_request.primitive.requestPrimitive.to_
+						v_localResourceIndex := f_setLocalResource(v_remoteCSEResource, int16, -1);
+						
+						
+						v_response := m_responsePrimitive(int2001,v_request.primitive.requestPrimitive.requestIdentifier);
+						v_response.from_ := PX_CSE1_ID;
+						v_response.to_ := v_request.primitive.requestPrimitive.from_;
+						v_response.primitiveContent.remoteCSE := vc_localResourcesList[v_localResourceIndex].resource.remoteCSE;
+						mccPort.send(m_response(v_response));
+						
+						v_resourceIndex := f_setResource(v_request.primitive.responsePrimitive.primitiveContent, int16, -1);
+						
 					}
 					[] mccPortIn.receive {
 						tc_ac.stop;
@@ -1555,44 +1600,43 @@ module OneM2M_Functions {
 			 * @param  p_modifiedResource  Assigned and/or modified fields
 			 * @return Internal resource index of the saved resource or -1
 			 */
-			function f_cse_createLocalResource(in PrimitiveContent p_resource, in integer p_parentIndex, in ResourceType p_resourceType, out PrimitiveContent p_myResource) runs on CseSimu return integer {
+			function f_cse_generateLocalResource(in PrimitiveContent p_resource, in integer p_parentIndex, in ResourceType p_resourceType) runs on CseSimu return PrimitiveContent {
 
-				var integer v_resourceIndex := lengthof(vc_resourcesList);
+				var integer v_resourceIndex := lengthof(vc_localResourcesList);
+				var PrimitiveContent v_myResource;
 				
 				// TODO To review the code (use of indexes, generation of value for certain attributes, etc..)
 				if(p_resourceType == int16 and ispresent(p_resource)) {
 					if(ischosen(p_resource.remoteCSE)){
-						p_myResource.remoteCSE := p_resource.remoteCSE;
+						v_myResource.remoteCSE := p_resource.remoteCSE;
 						
 						if(not(ispresent(p_resource.remoteCSE.resourceName))) {
-							p_myResource.remoteCSE.resourceName := "remoteCSE" & int2char(v_resourceIndex);
+							v_myResource.remoteCSE.resourceName := "remoteCSE" & int2char(v_resourceIndex);
 						}
-						p_myResource.remoteCSE.resourceType := p_resourceType;
-						p_myResource.remoteCSE.resourceID := "remoteCSE" & int2char(v_resourceIndex);
-						p_myResource.remoteCSE.parentID := f_getResourceId(vc_resourcesList[p_parentIndex].resource);
-						p_myResource.remoteCSE.creationTime := fx_generateTimestamp();
+						v_myResource.remoteCSE.resourceType := p_resourceType;
+						v_myResource.remoteCSE.resourceID := "remoteCSE" & int2char(v_resourceIndex);
+						v_myResource.remoteCSE.parentID := f_getResourceId(vc_localResourcesList[p_parentIndex].resource);
+						v_myResource.remoteCSE.creationTime := fx_generateTimestamp();
 						if(not(ispresent(p_resource.remoteCSE.expirationTime))) {
-							p_myResource.remoteCSE.expirationTime := "20301231T012345";
+							v_myResource.remoteCSE.expirationTime := "20301231T012345";
 						}
-						p_myResource.remoteCSE.lastModifiedTime := p_myResource.remoteCSE. creationTime;											
-						p_myResource.remoteCSE.announceTo := omit;	
-						p_myResource.remoteCSE.announcedAttribute := omit;	
+						v_myResource.remoteCSE.lastModifiedTime := v_myResource.remoteCSE. creationTime;											
+						v_myResource.remoteCSE.announceTo := omit;	
+						v_myResource.remoteCSE.announcedAttribute := omit;	
 						
 						if(not(ispresent(p_resource.remoteCSE.pointOfAccess))) {
 							//TODO Create a pollingChannel resource
-							p_myResource.remoteCSE.pointOfAccess := omit;
+							v_myResource.remoteCSE.pointOfAccess := omit;
 						}	
-						if(vc_resourcesList[v_resourceIndex].resourceType == int5) {
-							p_myResource.remoteCSE.m2M_Ext_ID := omit;	
-							p_myResource.remoteCSE.trigger_Recipient_ID:= omit;
+						if(vc_localResourcesList[v_resourceIndex].resourceType == int5) {
+							v_myResource.remoteCSE.m2M_Ext_ID := omit;	
+							v_myResource.remoteCSE.trigger_Recipient_ID:= omit;
 						}
-						p_myResource.remoteCSE.nodeLink := omit;
-      					
-						return f_setResource(p_myResource, p_resourceType, p_parentIndex, false);			   
+						v_myResource.remoteCSE.nodeLink := omit;
 				    
 					}
 				}
-				return v_resourceIndex;
+				return v_myResource;
 				
 			}//End of function	
 			
@@ -2309,6 +2353,71 @@ module OneM2M_Functions {
 			}
 				
 		}
+		
+		/**
+		 * @desc Resolution of the resource address field (to) for a given resource depending on addressing and hierarchical format 
+		 * @param p_targetResourceIndex Internal resource index of the given resource
+		 * @return Resource address for the given resource
+		 * @verdict 
+		 */
+		function f_getLocalResourceAddress(integer  p_targetResourceIndex := -1, AddressingMethod p_addressingMethod := PX_ADDRESSING_METHOD, PrimitiveScope p_primitiveScope := PX_PRIMITIVE_SCOPE) runs on CseSimu return XSD.ID {
+			var XSD.ID v_resourceAddress;
+			
+			if(p_primitiveScope == e_cseRelative) {
+					
+				if(p_addressingMethod == e_nonHierarchical) {
+					if(p_targetResourceIndex == -1) {
+						return PX_CSE1_RESOURCE_ID;
+					} else {
+						return f_getResourceId(vc_localResourcesList[p_targetResourceIndex].resource);
+					}
+				} else {
+					if(p_targetResourceIndex == -1) {
+						return PX_CSE1_NAME;
+					} else {
+						v_resourceAddress := f_getResourceAddress(vc_localResourcesList[p_targetResourceIndex].parentIndex, p_addressingMethod, p_primitiveScope) & "/" & f_getResourceName(vc_localResourcesList[p_targetResourceIndex].resource);
+						return v_resourceAddress;
+					}	
+				}
+					
+			} else if (p_primitiveScope == e_spRelative) {
+				if(p_addressingMethod == e_nonHierarchical) {
+					if(p_targetResourceIndex == -1) {
+						return PX_CSE1_ID & "/" & PX_CSE1_RESOURCE_ID;
+					} else {
+						v_resourceAddress := PX_CSE_ID & "/" & f_getResourceId(vc_localResourcesList[p_targetResourceIndex].resource);
+						return v_resourceAddress;
+					}
+				} else {
+					if(p_targetResourceIndex == -1) {
+						return PX_CSE1_ID & "/" & PX_CSE1_NAME;
+					} else {
+						v_resourceAddress := f_getResourceAddress(vc_localResourcesList[p_targetResourceIndex].parentIndex, p_addressingMethod, p_primitiveScope) & "/" & f_getResourceName(vc_localResourcesList[p_targetResourceIndex].resource);
+						return v_resourceAddress;
+					}
+				}
+			} else if (p_primitiveScope ==  e_absolute) {
+				if(p_addressingMethod == e_nonHierarchical) {
+					if(p_targetResourceIndex == -1) {
+						return PX_SP1_ID & PX_CSE1_ID;
+					} else {
+						v_resourceAddress := f_getResourceAddress(-, p_addressingMethod, p_primitiveScope) & "/" & f_getResourceId(vc_localResourcesList[p_targetResourceIndex].resource);
+						return v_resourceAddress;
+					}
+				} else {
+					if(p_targetResourceIndex == -1) {
+						return PX_SP1_ID & PX_CSE1_ID & "/" & PX_CSE1_NAME;
+					} else {
+						v_resourceAddress := f_getResourceAddress(vc_localResourcesList[p_targetResourceIndex].parentIndex, p_addressingMethod, p_primitiveScope) & "/" & f_getResourceName(vc_localResourcesList[p_targetResourceIndex].resource);
+						return v_resourceAddress;
+					}	
+				}				
+			} else {
+				return "";
+			}
+				
+		}
+		
 		/**
 		 * @desc Saving of a resource and its parent index in the internal resource list
 		 * @param p_resource Resource to be saved
@@ -2335,6 +2444,27 @@ module OneM2M_Functions {
 						
 		}
 		
+		/**
+		 * @desc Saving of a local resource and its parent index in the internal resource list
+		 * @param p_resource Resource to be saved
+		 * @param p_parentIndex Parent index of resource to be saved
+		 * @return Internal resource index of the saved resource
+		 * @verdict 
+		 */
+		function f_setLocalResource(PrimitiveContent p_resource, ResourceType p_resourceType, integer  p_parentIndex := -1) runs on CseSimu return integer {
+			var integer v_newIndex := -1;	
+			if(isbound(vc_localResourcesList)) {
+				vc_localResourcesList[lengthof(vc_localResourcesList)] := {p_parentIndex, p_resourceType, p_resource};
+			} else {
+				vc_localResourcesList[0] := {p_parentIndex, p_resourceType, p_resource};
+			}
+	
+			v_newIndex := lengthof(vc_localResourcesList)-1;
+	
+			return v_newIndex;
+				
+		}
+		
 		/**
 		 * @desc Set Acpid into the requestPrimitive
 		 * @param p_requestPrimitive RequestPrimitive to be modified
diff --git a/LibOneM2M/OneM2M_Pics.ttcn b/LibOneM2M/OneM2M_Pics.ttcn
index 3755ac9344b3b620bfc736c2bf9481b4715d37a0..8061df048d1a0fa20b317ee8598fd41e3b55dcc9 100644
--- a/LibOneM2M/OneM2M_Pics.ttcn
+++ b/LibOneM2M/OneM2M_Pics.ttcn
@@ -18,7 +18,8 @@ module OneM2M_Pics {
 	 * @see  oneM2M TS-0017 A.5.5.1/1
 	 */
 	modulepar boolean PICS_ACP_SUPPORT := true;
-	modulepar boolean PICS_IN_CSE := true;	
+	modulepar boolean PICS_IN_CSE := true;
+	modulepar boolean PICS_MN_CSE := true;	
 	modulepar boolean PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT := true;
 	modulepar boolean PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT := true;
 	
diff --git a/LibOneM2M/OneM2M_Pixits.ttcn b/LibOneM2M/OneM2M_Pixits.ttcn
index 60d918179eda0041668c216beadf66096bd8e3b6..08646ae159b5936714289274d870889da0eb84c0 100644
--- a/LibOneM2M/OneM2M_Pixits.ttcn
+++ b/LibOneM2M/OneM2M_Pixits.ttcn
@@ -78,10 +78,26 @@ module OneM2M_Pixits {
 	
 			modulepar charstring PX_CSE1_ADDRESS			:= "127.0.0.1:3141";
 	
+
+			/**
+			 * @desc Test System CSE1 Name
+			 */	
+			modulepar XSD.ID PX_CSE1_NAME := "CSE1_NAME";
+		
 			/**
 			 * @desc Test System CSE1-ID with SP-relative-CSE-ID format (relative) according to TS-0001-7.2-1
 			 */		
-			modulepar XSD.ID PX_CSE1_ID					:= "/MyCSEId";
+			modulepar XSD.ID PX_CSE1_ID := "/CSE1_ID";
+			
+			/**
+			 * @desc Test System CSE1 resource ID with Unstructured-CSE-relative-Resource-ID (relative) format according to TS-0001-7.2-1
+			 */			
+			modulepar XSD.ID PX_CSE1_RESOURCE_ID	:= "CSE1_RESOURCE_ID";
+			 
+			/**
+			 * @desc Test System M2M-SP1-ID with M2M-SP-ID format (absolute) according to TS-0001-7.2-1 Unstructured-CSE-relative -Resource-ID
+			 */
+			modulepar XSD.ID PX_SP1_ID := "//onem2m.org";
 		
 			/**
 			 * @desc Test System AE1-ID with AE-ID-Stem format (relative) according to TS-0001-7.2-1
diff --git a/LibOneM2M/OneM2M_Templates.ttcn b/LibOneM2M/OneM2M_Templates.ttcn
index c2bc68ab8b2c625ec06ea06b4891839dee0d8c1b..200d7ec7709b5d0488bbaf75beaf51bd6593b5ef 100644
--- a/LibOneM2M/OneM2M_Templates.ttcn
+++ b/LibOneM2M/OneM2M_Templates.ttcn
@@ -1051,10 +1051,10 @@ module OneM2M_Templates {
 				discoveryResultType := omit
 			};
 			
-			template RequestPrimitive mw_deleteRequest(template XSD.ID p_resourceAddress := ?) := {
+			template RequestPrimitive mw_deleteRequest(template XSD.ID p_resourceAddress := ?, template XSD.ID p_from := *) := {
 				operation := int4,
 				to_ := p_resourceAddress,
-				from_ := ?,
+				from_ := p_from,
 				requestIdentifier := ?,
 				resourceType := *,
 				primitiveContent := *, 
@@ -1209,6 +1209,10 @@ module OneM2M_Templates {
 	        cSEBase := p_cSEBase
 		}
 		
+		template PrimitiveContent m_primitiveContentRemoteCSE(template RemoteCSE_optional p_remoteCSE) := {
+			remoteCSE := p_remoteCSE
+		}
+		
 		 template PrimitiveContent mw_primitiveContent := ?;
 		 
 		/**
@@ -3715,6 +3719,11 @@ module OneM2M_Templates {
 			primitiveContent := {subscription := m_contentSubscription}
 		}
 		
+		template (value) UtTriggerPrimitive m_utCreateRemoteCSE modifies m_utCreate := {
+			requestIdentifier := testcasename() & "-m_utCreateRemoteCSE" & f_rnd(1, 1000000),
+			resourceType := int16
+		}
+ 		
 		template (value) UtTriggerPrimitive m_utRetrieveResource(XSD.ID p_targetResourceAddress, in XSD.ID p_originator) := {
 			operation := int2,
 			to_ := p_targetResourceAddress,
diff --git a/LibOneM2M/OneM2M_TestSystem.ttcn b/LibOneM2M/OneM2M_TestSystem.ttcn
index d3551621706b17402d7fa64177c16a17d589ff22..7a86383c9b3e93ee436c03532337edf534fabe26 100644
--- a/LibOneM2M/OneM2M_TestSystem.ttcn
+++ b/LibOneM2M/OneM2M_TestSystem.ttcn
@@ -62,6 +62,7 @@ module OneM2M_TestSystem {
 		port OneM2MPort mccPortIn;
 
 		//global variables
+		var MyResourcesList vc_localResourcesList;
 		var AeSimu vc_aeSimu;//For CF02 when CseSimu is master
 		var integer vc_remoteCseIndex;
 		var MsgIn vc_request;
diff --git a/OneM2M_Testcases_CSE.ttcn b/OneM2M_Testcases_CSE.ttcn
index 469af4fcf1976fec296f10ec0f704fd040ba2939..4e44f9f51a23ad9cf91223b331c8d9d9d9ee14dd 100644
--- a/OneM2M_Testcases_CSE.ttcn
+++ b/OneM2M_Testcases_CSE.ttcn
@@ -874,10 +874,9 @@ module OneM2M_Testcases_CSE {
 					f_cf01Up();
 	                
 					//Preamble
-					v_cseBaseIndex := f_cse_preamble_createServiceSubscribedProfile({"S*"}); //c_CRUDNDi);
-					
+
 					//Test Body
-					v_request := valueof(m_createAe(PX_APP_ID, omit, omit));	
+					v_request := valueof(m_createAe(PX_APP_ID, omit, "SAE-ID-STEM"));	
 					
 					v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, -1);
 					
@@ -949,6 +948,25 @@ module OneM2M_Testcases_CSE {
 					// Tear down
 					f_cf01Down();
 						
+				}
+				
+				/**
+				 * @desc Check that the IUT accepts a create request of <AE> resource with attributes multiplicity equals to 1 and provided preprovisioned SP_relative_AE_ID. 
+				 */
+				
+				testcase TC_CSE_REG_CRE_003() runs on CseSimu system CseSystem{
+					
+					var integer v_remoteCseIndex := -1;
+					
+					//Test Configuration
+					//f_cf02Up();
+					
+					//Preamble
+					v_remoteCseIndex := f_cse_registrationRemoteCse();
+					vc_aeSimu := AeSimu.create("AE1") alive;
+					//vc_aeSimu.start(f_a);
+					
+				
 				}
 		  	  	
 				/**
@@ -1225,6 +1243,76 @@ module OneM2M_Testcases_CSE {
 						
 				}; //end TC_CSE_REG_CRE_010
 				
+				group g_CSE_REG_CRE_013 {
+					
+					testcase TC_CSE_REG_CRE_013_AE_LBL() runs on AeSimu system CseSystem {
+						var template RequestPrimitive m_create := m_createAe(PX_APP_ID, omit, omit);
+						m_create.primitiveContent.aE.labels := {"labels"};
+					}
+					
+					testcase TC_CSE_REG_CRE_013_AE_APN() runs on AeSimu system CseSystem {
+						var template RequestPrimitive m_create := m_createAe(PX_APP_ID, omit, omit);
+						m_create.primitiveContent.aE.appName := "AeAppName";
+					}
+					
+					testcase TC_CSE_REG_CRE_013_AE_POA() runs on AeSimu system CseSystem {
+						var template RequestPrimitive m_create := m_createAe(PX_APP_ID, omit, omit);
+						m_create.primitiveContent.aE.pointOfAccess := {PX_AE1_ADDRESS};
+					}
+					
+					testcase TC_CSE_REG_CRE_013_AE_NL() runs on AeSimu system CseSystem {
+						var template RequestPrimitive m_create := m_createAe(PX_APP_ID, omit, omit);
+						m_create.primitiveContent.aE.nodeLink := "http://127.0.0.1/";
+					}
+					
+					testcase TC_CSE_REG_CRE_013_AE_OR() runs on AeSimu system CseSystem {
+						var template RequestPrimitive m_create := m_createAe(PX_APP_ID, omit, omit);
+						m_create.primitiveContent.aE.ontologyRef := "MyOntologyRef";
+					}
+				
+					function TC_CSE_REG_CRE_013(in template RequestPrimitive p_createAe) runs on AeSimu {
+					
+						//Local variables
+						var MsgIn v_response;
+						var RequestPrimitive v_request;
+						var ResourceType v_resourceType := int2;	//AE
+										   
+						// Test control
+					
+						// Test component configuration
+						f_cf01Up(); 
+						
+						//Test Body
+						
+						v_request := valueof(p_createAe);
+						v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, -1);
+						
+						mcaPort.send(m_request(v_request));
+						tc_ac.start;
+						alt {
+							[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) {
+								tc_ac.stop;
+								setverdict(pass, __SCOPE__ & ": AE creation successfull.");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{
+								tc_ac.stop;
+								setverdict(fail, __SCOPE__ & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
+							}
+							[] tc_ac.timeout {
+								setverdict(fail, __SCOPE__ & ": No answer while creating AE");
+							}
+						}
+						
+						//Postamble
+						f_cse_postamble_deleteResources();
+						
+						// Tear down
+						f_cf01Down();
+					}
+				
+				}
+				
+				
 				group g_CSE_REG_CRE_016 {
 					
 					/**
@@ -1384,6 +1472,81 @@ module OneM2M_Testcases_CSE {
 						
 				}
 				
+				/**
+				 * @desc Check that the IUT rejects a create request of <AE> resource that doesn’t include the MANDATORY_ATTRIBUTE
+				 * 
+				 */
+				group g_CSE_REG_CRE_021 {
+					testcase TC_CSE_REG_CRE_021_API() runs on Tester system CseSystem {
+						
+						//Local variables
+						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+						var template RequestPrimitive v_createRequest := m_createAe(PX_APP_ID);
+						
+						v_createRequest.primitiveContent.aE.app_ID := omit;	//Mandatory app_ID field is being set empty
+	
+						v_ae1.start(f_CSE_REG_CRE_021(v_createRequest));
+						v_ae1.done;
+	
+					}//end TC_CSE_REG_CRE_021_API
+					testcase TC_CSE_REG_CRE_021_RR() runs on Tester system CseSystem {
+	
+						// Local variables
+						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+						var template RequestPrimitive v_createRequest := m_createAe(PX_APP_ID);
+						
+						v_createRequest.primitiveContent.aE.requestReachability := omit;	//Mandatory requestReachability field is being set empty
+						
+						v_ae1.start(f_CSE_REG_CRE_021(v_createRequest));
+						v_ae1.done;
+
+					}//end TC_CSE_REG_CRE_021_RR
+					
+					function f_CSE_REG_CRE_021(template RequestPrimitive p_createRequestPrimitive) runs on AeSimu {
+						
+						//Local variables
+						var ResourceType v_resourceType := int2;   
+						
+						// Test control
+
+						// Test component configuration
+						f_cf01Up();
+
+						// Test adapter configuration
+
+						// Preamble
+
+						// Test Body
+						f_cse_createResource(v_resourceType, p_createRequestPrimitive);		
+
+						tc_ac.start;
+						alt {
+							 [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) { //BAD REQUEST
+								 tc_ac.stop;
+								 setverdict(pass, __SCOPE__ & ": Request successfully rejected");
+							 }
+							 [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { 
+								 tc_ac.stop;
+								 setverdict(fail, __SCOPE__ & ": Wrong response status code");
+							 }
+							 [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)){
+								 tc_ac.stop;
+								 setverdict(fail, __SCOPE__ & ": Error, AE has been registered");
+							 }
+							 [] tc_ac.timeout {
+								 setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
+							 }
+						}	
+
+						// Postamble
+						f_cse_postamble_deleteResources();
+
+						// Tear down
+						f_cf01Down();
+						
+					}
+				}//end g_CSE_REG_CRE_021
+				
 				/**
 				 * @desc Check that the IUT accepts an create request of <remoteCSE> resource with attributes multiplicity equals to 1. 
 				 *  
@@ -1637,124 +1800,1379 @@ module OneM2M_Testcases_CSE {
 				
 				testcase TC_CSE_REG_CRE_029() runs on CseSimu system CseSystem {
   
-				var MsgIn v_response;
+					var MsgIn v_response;
+					
+					var RequestPrimitive v_request;
+					var RequestPrimitive v_createRequestPrimitive := valueof(m_createRemoteCSEBase);
+					var ResourceType v_resourceType := int16;
+	
+					// Test control
+	
+					// Test component configuration
+					f_cf04Up();
+	
+					// Test adapter configuration
+	
+					// Preamble
+					v_request := f_getCreateRequestPrimitive(v_resourceType, v_createRequestPrimitive, -1);
+	
+					tc_ac.start;
+					alt {
+						[] mccPort.receive(mw_request(mw_createRemoteCSEBase(PX_CSE_ID,f_getResourceAddress(-1)))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Resource type remoteCSE created successfully");
+						}
+						[] mccPort.receive {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Error while creating resource type remoteCSE");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while creating resource type remoteCSE");
+						}
+					}	
+	
+					// Postamble
+					f_cse_postamble_deleteResourcesCSE();
+	
+					// Tear down
+					f_cf04Down();
+	
+				}
 				
-				var RequestPrimitive v_request;
-				var RequestPrimitive v_createRequestPrimitive := valueof(m_createRemoteCSEBase);
-				var ResourceType v_resourceType := int16;
+				/**
+				 * @desc Check that IUT accepts a CSE registration request with cseType attribute set to ‘MN_CSE’
+				 * 
+				 */
+				testcase TC_CSE_REG_CRE_030() runs on CseSimu system CseSystem {
+					//Local variables
+					var ResourceType v_resourceType := int16;	//remoteCSE	
+					var RequestPrimitive v_request;
+					var template PrimitiveContent v_contentResponse;
+					// Test control
 
-				// Test control
+					// Test component configuration
+					f_cf04Up();
 
-				// Test component configuration
-				f_cf04Up();
+					// Test adapter configuration
 
-				// Test adapter configuration
+					// Preamble
+					v_request := valueof(m_createRemoteCSEBase);
 
-				// Preamble
-				v_request := f_getCreateRequestPrimitive(v_resourceType, v_createRequestPrimitive, -1);
+					v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
+	
+					//Test Body					
+					vc_remoteCseIndex := f_cse_registerRemoteCse(v_request, v_contentResponse);
+	
+					//Check if the resource has been deleted or not
+					if(f_cse_isResourcePresent(vc_remoteCseIndex)) {
+						setverdict(pass, __SCOPE__ & ":INFO: Resource created");
+					} else {
+						setverdict(fail, __SCOPE__ & ":INFO: Resource not created");
+					}	
 
-				tc_ac.start;
-				alt {
-					[] mccPort.receive(mw_request(mw_createRemoteCSEBase(PX_CSE_ID,f_getResourceAddress(-1)))) -> value v_response {
-						tc_ac.stop;
-						setverdict(pass, __SCOPE__ & ": Resource type remoteCSE created successfully");
+					// Postamble
+					f_cse_postamble_deleteResourcesCSE();
+
+					// Tear down
+					f_cf04Down();
+
+				}//end TC_CSE_REG_CRE_030
+				
+				/**
+				 * @desc Check that IUT accepts a CSE registration request with cseType attribute set to ‘MN_CSE’
+				 * 
+				 */
+				testcase TC_CSE_REG_CRE_033() runs on CseSimu system CseSystem {
+					//Local variables
+					var ResourceType v_resourceType := int16;	//remoteCSE	
+					var RequestPrimitive v_request;
+					var template PrimitiveContent v_contentResponse;
+					// Test control
+
+					// Test component configuration
+					f_cf04Up();
+
+					// Test adapter configuration
+
+					// Preamble
+					v_request := valueof(m_createRemoteCSEBase);
+					v_request.primitiveContent.remoteCSE.cseType := int2;	//MN_CSE
+
+					v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
+					v_contentResponse.remoteCSE.cseType := int2;	//MN_CSE					
+					
+					//Test Body					
+					vc_remoteCseIndex := f_cse_registerRemoteCse(v_request, v_contentResponse);
+					
+					//Check if the resource has been deleted or not
+					if(f_cse_isResourcePresent(vc_remoteCseIndex)) {
+						setverdict(pass, __SCOPE__ & ":INFO: Resource created");
+					} else {
+						setverdict(fail, __SCOPE__ & ":INFO: Resource not created");
+					}	
+
+					// Postamble
+					f_cse_postamble_deleteResourcesCSE();
+
+					// Tear down
+					f_cf04Down();
+
+				}//end TC_CSE_REG_CRE_033	
+				
+				/**
+				 * @desc Check that IUT accepts  a CSE registration request with OPTIONAL_ATTRIBUTE attribute
+				 * 
+				 */
+				group g_CSE_REG_CRE_034 {
+				
+					testcase TC_CSE_REG_CRE_034_RN() runs on Tester system CseSystem {
+						 //Local variables
+						 var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
+						 var RequestPrimitive v_request;
+						 var template PrimitiveContent v_contentResponse;
+						 
+						 v_request := valueof(m_createRemoteCSEBase);
+						 v_request.primitiveContent.remoteCSE.cseType := int2;	//MN_CSE
+						 v_request.primitiveContent.remoteCSE.resourceName := c_defaultRemoteCSEResourceName;
+	
+						 v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
+						 v_contentResponse.remoteCSE.cseType := int2;	//MN_CSE
+					     v_contentResponse.remoteCSE.resourceName := c_defaultRemoteCSEResourceName;
+	
+						 v_cse1.start(f_CSE_REG_CRE_034(v_request, v_contentResponse));
+						 v_cse1.done;
+						
 					}
-					[] mccPort.receive {
-						tc_ac.stop;
-						setverdict(fail, __SCOPE__ & ": Error while creating resource type remoteCSE");
+					
+					testcase TC_CSE_REG_CRE_034_ET() runs on Tester system CseSystem {
+						 //Local variables
+						 var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
+						 var RequestPrimitive v_request;
+						 var template PrimitiveContent v_contentResponse;
+		 
+						 v_request := valueof(m_createRemoteCSEBase);
+						 v_request.primitiveContent.remoteCSE.cseType := int2;	//MN_CSE
+						 v_request.primitiveContent.remoteCSE.expirationTime := "20301231T012345";
+	
+						 v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
+						 v_contentResponse.remoteCSE.cseType := int2;	//MN_CSE
+						 v_contentResponse.remoteCSE.expirationTime := "20301231T012345";
+	
+						 v_cse1.start(f_CSE_REG_CRE_034(v_request, v_contentResponse));
+						 v_cse1.done;
+		
 					}
-					[] tc_ac.timeout {
-						setverdict(fail, __SCOPE__ & ": No answer while creating resource type remoteCSE");
+					
+					testcase TC_CSE_REG_CRE_034_LBL() runs on Tester system CseSystem {
+						 //Local variables
+						 var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
+						 var RequestPrimitive v_request;
+						 var template PrimitiveContent v_contentResponse;
+						 var Labels v_labels_1 := {"VALUE_1"};
+		 
+						 v_request := valueof(m_createRemoteCSEBase);
+						 v_request.primitiveContent.remoteCSE.cseType := int2;	//MN_CSE
+						 v_request.primitiveContent.remoteCSE.labels := v_labels_1;
+		
+						 v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
+						 v_contentResponse.remoteCSE.cseType := int2;	//MN_CSE
+						 v_contentResponse.remoteCSE.labels := v_labels_1;
+		
+						 v_cse1.start(f_CSE_REG_CRE_034(v_request, v_contentResponse));
+						 v_cse1.done;
+		
 					}
-				}	
-
-				// Postamble
-				f_cse_postamble_deleteResourcesCSE();
+					
+					testcase TC_CSE_REG_CRE_034_POA() runs on Tester system CseSystem {
+						 //Local variables
+						 var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
+						 var RequestPrimitive v_request;
+						 var template PrimitiveContent v_contentResponse;
+		 
+						 v_request := valueof(m_createRemoteCSEBase);
+						 v_request.primitiveContent.remoteCSE.cseType := int2;	//MN_CSE
+						 v_request.primitiveContent.remoteCSE.pointOfAccess := {"http://" & PX_CSE1_ADDRESS & "/"};
+		
+						 v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
+						 v_contentResponse.remoteCSE.cseType := int2;	//MN_CSE
+						 v_contentResponse.remoteCSE.pointOfAccess := {"http://" & PX_CSE1_ADDRESS & "/"};
+		
+						 v_cse1.start(f_CSE_REG_CRE_034(v_request, v_contentResponse));
+						 v_cse1.done;
+		
+					}
+					
+					testcase TC_CSE_REG_CRE_034_NL() runs on Tester system CseSystem {
+						 //Local variables
+						 var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
+						 var RequestPrimitive v_request;
+						 var template PrimitiveContent v_contentResponse;
+	 
+									 v_request := valueof(m_createRemoteCSEBase);
+						 v_request.primitiveContent.remoteCSE.cseType := int2;	//MN_CSE
+						 v_request.primitiveContent.remoteCSE.nodeLink := c_defaultNodeID;
+	
+						 v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
+						 v_contentResponse.remoteCSE.cseType := int2;	//MN_CSE
+						 v_contentResponse.remoteCSE.nodeLink := c_defaultNodeID;
+	
+						 v_cse1.start(f_CSE_REG_CRE_034(v_request, v_contentResponse));
+						 v_cse1.done;
+	
+					}
+					
+					function f_CSE_REG_CRE_034(RequestPrimitive p_request, template PrimitiveContent p_contentResponse) runs on CseSimu{ //system CseSystem {
+						//Local variables
+						var ResourceType v_resourceType := int16;	//remoteCSE	
+						// Test control
+	
+						// Test component configuration
+						f_cf04Up();
+	
+						// Test adapter configuration
+	
+						// Preamble
+						
+						
+						//Test Body					
+						vc_remoteCseIndex := f_cse_registerRemoteCse(p_request, p_contentResponse);
+						
+						//Check if the resource has been deleted or not
+						if(f_cse_isResourcePresent(vc_remoteCseIndex)) {
+							setverdict(pass, __SCOPE__ & ":INFO: Resource created");
+						} else {
+							setverdict(fail, __SCOPE__ & ":INFO: Resource not created");
+						}	
+	
+						// Postamble
+						f_cse_postamble_deleteResourcesCSE();
+	
+						// Tear down
+						f_cf04Down();
+	
+					}//end TC_CSE_REG_CRE_034
+				}//end g_CSE_REG_CRE_034
+			
+			}	//end group Create
+			
+			group Retrieve{
+				
+				/**
+				 * @desc Check that the IUT accepts an retrieval request of <CSEBase> resource and responds with all  attributes that have multiplicity equals to 1.
+				 * 
+				 */
+				testcase TC_CSE_REG_RET_001() runs on AeSimu system CseSystem {
+    				
+					// Local variables
+					var MsgIn v_response;
+					var integer v_aeIndex := -1;
+					var template PrimitiveContent v_contentResponse;
+	    										   
+					// Test control
+	
+					// Test component configuration
+					f_cf01Up();
+	
+					// Test adapter configuration
+	
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+					
+					// Test Body
+					v_contentResponse.cSEBase := mw_contentCSEBase_rc1;
+					
+					mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(v_aeIndex))));//TODO Maybe PX_SUPER_AE_ID
+	
+					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_responsePrimitiveOK(v_contentResponse))) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Wrong response status code");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							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 TC_CSE_REG_RET_001
+				
+				/**
+				 * @desc Check that the IUT accepts a retrieval request of <CSEBase> resource with the optional ATTRIBUTE
+				 * 
+				 */
+				group g_CSE_REG_RET_002 {
+					
+					testcase TC_CSE_REG_RET_002_CST() runs on Tester system CseSystem {
+						// Local variables
+						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+						var template PrimitiveContent v_contentResponse;
+					
+						v_contentResponse.cSEBase := mw_contentCSEBase_rc1;
+						v_contentResponse.cSEBase.cseType := ?;
+						    
+						v_ae1.start(f_CSE_REG_RET_002(v_contentResponse));
+						v_ae1.done;
+					}
+					
+					testcase TC_CSE_REG_RET_002_NL() runs on Tester system CseSystem {
+						//Local variables
+						 var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+						 var template PrimitiveContent v_contentResponse;
+	
+						 v_contentResponse.cSEBase := mw_contentCSEBase_rc1;
+						 v_contentResponse.cSEBase.nodeLink := ?;
+	    
+						 v_ae1.start(f_CSE_REG_RET_002(v_contentResponse));
+						 v_ae1.done;
+					}
+					
+					function f_CSE_REG_RET_002(template PrimitiveContent p_contentResponse) runs on AeSimu {
+						//Local variables
+						 var MsgIn v_response;
+						 var integer v_aeIndex := -1;
+								   
+						 // Test control
+
+						 // Test component configuration
+						 f_cf01Up();
+
+						 // Test adapter configuration
+
+						 // Preamble
+						 v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+						 
+						 mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(v_aeIndex))));
+						 tc_ac.start;
+						 alt {
+							[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response {
+								tc_ac.stop;
+								setverdict(pass, __SCOPE__ & ": Response OK for retrieving for attribute");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, __SCOPE__ & ": Wrong response status code");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+								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 f_CSE_REG_RET_002
+					
+				} //end g_CSE_REG_RET_002
+				
+				/**
+				 * @desc Check that the IUT accepts a retrieval request of <AE> resource with attributes multiplicity equals to 1
+				 * 
+				 */
+				 
+				testcase TC_CSE_REG_RET_003() runs on AeSimu system CseSystem {
+					// Local variables
+					var MsgIn v_response;
+					var integer v_aeIndex := -1;
+					var template PrimitiveContent v_contentResponse;
+								   
+					// Test control
+
+					// Test component configuration
+					f_cf01Up();
+
+					// Test adapter configuration
+
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+	
+					// Test Body
+					v_contentResponse.aE := mw_contentAeBase;
+	
+					mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(v_aeIndex))));//TODO Maybe PX_SUPER_AE_ID
+
+					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_responsePrimitiveOK(v_contentResponse))) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Wrong response status code");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							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 TC_CSE_REG_RET_003
+				
+				/**
+				 * @desc Check that the IUT accepts a retrieval request of <AE> resource with optional ATTRIBUTE
+				 * 
+				 */
+				 
+				group g_CSE_REG_RET_004 {
+					
+					testcase TC_CSE_REG_RET_004_LBL() runs on Tester system CseSystem {
+						// Local variables
+						var Labels v_labels_1 := {"VALUE_1"};
+						var template RequestPrimitive v_createRequest := m_createAe(PX_APP_ID);
+						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+						var template PrimitiveContent v_contentResponse;
+						
+						v_createRequest.primitiveContent.aE.labels := v_labels_1;
+	
+						v_contentResponse.aE := mw_contentAeBase;
+						v_contentResponse.aE.labels := ?;
+		    
+						v_ae1.start(f_CSE_REG_RET_004(v_createRequest, v_contentResponse));
+						v_ae1.done;
+					}
+	
+					testcase TC_CSE_REG_RET_004_APN() runs on Tester system CseSystem {
+						//Local variables
+						 var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+						 var template RequestPrimitive v_createRequest := m_createAe(PX_APP_ID);
+						 var template PrimitiveContent v_contentResponse;
+						 
+						 v_createRequest.primitiveContent.aE.appName := "AeAppName";
+
+						 v_contentResponse.aE := mw_contentAeBase;
+						 v_contentResponse.aE.appName := ?;
+
+						 v_ae1.start(f_CSE_REG_RET_004(v_createRequest,v_contentResponse));
+						 v_ae1.done;
+					}
+					
+					testcase TC_CSE_REG_RET_004_POA() runs on Tester system CseSystem {
+						//Local variables
+						 var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+						 var template RequestPrimitive v_createRequest := m_createAe(PX_APP_ID);
+						 var template PrimitiveContent v_contentResponse;
+						 
+						 v_createRequest.primitiveContent.aE.pointOfAccess := {PX_AE1_ADDRESS};
+
+						 v_contentResponse.aE := mw_contentAeBase;
+						 v_contentResponse.aE.pointOfAccess := ?;
+
+						 v_ae1.start(f_CSE_REG_RET_004(v_createRequest, v_contentResponse));
+						 v_ae1.done;
+					}
+					
+					testcase TC_CSE_REG_RET_004_NL() runs on Tester system CseSystem {
+						//Local variables
+						 var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+						 var template RequestPrimitive v_createRequest := m_createAe(PX_APP_ID);
+						 var template PrimitiveContent v_contentResponse;
+						 
+						 v_createRequest.primitiveContent.aE.nodeLink := "http://127.0.0.1/";
+
+						 v_contentResponse.aE := mw_contentAeBase;
+						 v_contentResponse.aE.nodeLink := ?;
+
+						 v_ae1.start(f_CSE_REG_RET_004(v_createRequest,v_contentResponse));
+						 v_ae1.done;
+					}
+					
+					testcase TC_CSE_REG_RET_004_CSZ() runs on Tester system CseSystem {
+						//Local variables
+						 var AeSimu v_ae1 := AeSimu.create("AE1") alive;
+						 var template RequestPrimitive v_createRequest := m_createAe(PX_APP_ID);
+						 var template PrimitiveContent v_contentResponse;
+						 
+						 v_createRequest.primitiveContent.aE.contentSerialization := {applicationxml};
+
+						 v_contentResponse.aE := mw_contentAeBase;
+						 v_contentResponse.aE.contentSerialization := ?; 
+
+						 v_ae1.start(f_CSE_REG_RET_004(v_createRequest,v_contentResponse));
+						 v_ae1.done;
+					}
+	
+					function f_CSE_REG_RET_004(template RequestPrimitive p_createRequestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu {
+						//Local variables
+						 var MsgIn v_response;
+						 var integer v_aeIndex := -1;
+				   
+						 // Test control
+
+						 // Test component configuration
+						 f_cf01Up();
+
+						 // Test adapter configuration
+
+						 // Preamble
+						 v_aeIndex := f_cse_createResource(int2, p_createRequestPrimitive, -1);
+		 
+						 mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(v_aeIndex))));//TODO Maybe PX_SUPER_AE_ID
+						 tc_ac.start;
+						 alt {
+							[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response {
+								tc_ac.stop;
+							    setverdict(pass, __SCOPE__ & ": Response OK for retrieving for attribute");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, __SCOPE__ & ": Wrong response status code");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+								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 f_CSE_REG_RET_004
+	
+				} //end g_CSE_REG_RET_004
+				
+				/**
+				 * @desc Check that the IUT accepts a retrieval request of <CSEBase> resource including the cseType attribute
+				 * 
+				 */
+				testcase TC_CSE_REG_RET_005() runs on AeSimu system CseSystem {
+    				
+					// Local variables
+					var MsgIn v_response;
+					var integer v_aeIndex := -1;
+					var template PrimitiveContent v_contentResponse;
+								   
+					// Test control
+					if(not(PICS_IN_CSE)) {
+						setverdict(inconc, __SCOPE__ & ": IUT shall be IN-CSE to run this test case");
+						stop;
+					}
+
+					// Test component configuration
+					f_cf01Up();
+
+					// Test adapter configuration
+
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+	
+					// Test Body
+					v_contentResponse.cSEBase := mw_contentCSEBase_rc1;
+					v_contentResponse.cSEBase.cseType := int1;
+	
+					mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(v_aeIndex))));//TODO Maybe PX_SUPER_AE_ID 
+					
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": cseType attribute is set to 1 (IN_CSE)");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Wrong response status code");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							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 TC_CSE_REG_RET_BV_005
+				
+				/**
+				 * @desc Check that the IUT accepts a retrieval request of <remoteCSE> resource
+				 * 
+				 */
+				testcase TC_CSE_REG_RET_006() runs on CseSimu system CseSystem {
+				//Local variables
+				 //Local variables
+				 var MsgIn v_response;
+				 var RequestPrimitive v_request;
+				 var ResourceType v_resourceType := int16;	//remoteCSE
+				 var template PrimitiveContent v_contentResponse;
+				 		
+				 // Test control
+
+				 // Test component configuration
+				 f_cf04Up();
+
+				 // Test adapter configuration
+
+				 // Preamble
+				 if(PICS_IN_CSE){
+				     vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase);
+				    
+					 v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
+ 
+					 mccPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(vc_remoteCseIndex))));
+					 tc_ac.start;
+					 alt {
+						 [] mccPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response {
+							 tc_ac.stop;
+							 setverdict(pass, __SCOPE__ & ": Response OK for retrieving");
+						 }
+						 [] mccPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response {
+							 tc_ac.stop;
+							 setverdict(fail, __SCOPE__ & ": Wrong response status code");
+						 }
+						 [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							 tc_ac.stop;
+							 setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements");
+						 }
+						 [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							 tc_ac.stop;
+							 setverdict(fail, __SCOPE__ & ": Error while retrieving resource");
+						 }
+						 [] tc_ac.timeout {
+							 setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
+						 }
+					 }
+				    
+				 } else if (PICS_MN_CSE) {
+					vc_remoteCseIndex := f_cse_registrationRemoteCse(m_createRemoteCSEBase);
+					
+					v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
+					
+					mccPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(vc_remoteCseIndex))));
+					tc_ac.start;
+					alt {
+						 [] mccPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response {
+							 tc_ac.stop;
+							 setverdict(pass, __SCOPE__ & ": Response OK for retrieving");
+						 }
+						 [] mccPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response {
+							 tc_ac.stop;
+							 setverdict(fail, __SCOPE__ & ": Wrong response status code");
+						 }
+						 [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							 tc_ac.stop;
+							 setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements");
+						 }
+						 [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							 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_deleteResourcesCSE();
+
+				 // Tear down
+				 f_cf04Down();
+				 
+				}//end TC_CSE_REG_RET_006
+				
+				/**
+				 * @desc Check that the IUT accepts an retrieval request of <remoteCSE> resource with optional ATTRIBUTE
+				 * 
+				 */
+				group g_CSE_REG_RET_007 {
+					
+					testcase TC_CSE_REG_RET_007_LBL() runs on Tester system CseSystem {
+						// Local variables
+						var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
+						var Labels v_labels_1 := {"VALUE_1"};
+						var template RequestPrimitive v_createRequest := m_createRemoteCSEBase;
+						var template PrimitiveContent v_contentResponse;
+						
+						v_createRequest.primitiveContent.remoteCSE.labels := v_labels_1;
+
+						v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
+						v_contentResponse.remoteCSE.labels := ?;
+
+						v_cse1.start(f_CSE_REG_RET_007(v_createRequest, v_contentResponse));
+						v_cse1.done;
+					}
+					
+					testcase TC_CSE_REG_RET_007_CST() runs on Tester system CseSystem {
+						// Local variables
+						var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
+						var template RequestPrimitive v_createRequest := m_createRemoteCSEBase;
+						var template PrimitiveContent v_contentResponse;
+						
+						v_createRequest.primitiveContent.remoteCSE.cseType := int1;
+
+						v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
+						v_contentResponse.remoteCSE.cseType := ?;
+
+						v_cse1.start(f_CSE_REG_RET_007(v_createRequest, v_contentResponse));
+						v_cse1.done;
+					}
+					
+					testcase TC_CSE_REG_RET_007_POA() runs on Tester system CseSystem {
+						// Local variables
+						var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
+						var template RequestPrimitive v_createRequest := m_createRemoteCSEBase;
+						var template PrimitiveContent v_contentResponse;
+						
+						v_createRequest.primitiveContent.remoteCSE.pointOfAccess := {"http://" & PX_CSE1_ADDRESS & "/"};
+
+						v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
+						v_contentResponse.remoteCSE.pointOfAccess := ?;
+
+						v_cse1.start(f_CSE_REG_RET_007(v_createRequest, v_contentResponse));
+						v_cse1.done;
+					}
+					
+					testcase TC_CSE_REG_RET_007_NL() runs on Tester system CseSystem {
+						// Local variables
+						var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
+						var template RequestPrimitive v_createRequest := m_createRemoteCSEBase;
+						var template PrimitiveContent v_contentResponse;
+						
+						v_createRequest.primitiveContent.remoteCSE.nodeLink := c_defaultNodeID;
+
+						v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
+						v_contentResponse.remoteCSE.nodeLink := ?;
+
+						v_cse1.start(f_CSE_REG_RET_007(v_createRequest, v_contentResponse));
+						v_cse1.done;
+					}
+					
+					function f_CSE_REG_RET_007(template RequestPrimitive p_createRequestPrimitive, template PrimitiveContent p_contentResponse) runs on CseSimu {
+						var MsgIn v_response;
+						var RequestPrimitive v_request;
+						var ResourceType v_resourceType := int16;	//remoteCSE
+						var template PrimitiveContent v_contentResponse;
+ 		
+						// Test control
+
+						// Test component configuration
+						f_cf04Up();
+
+						// Test adapter configuration
+
+						// Preamble
+						if(PICS_IN_CSE){
+							vc_remoteCseIndex := f_cse_registerRemoteCse(p_createRequestPrimitive);
+							mccPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(vc_remoteCseIndex))));
+						    tc_ac.start;
+							alt {
+								[] mccPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response {
+									tc_ac.stop;
+									setverdict(pass, __SCOPE__ & ": Response OK for retrieving for attribute");
+								}
+								[] mccPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
+									tc_ac.stop;
+									setverdict(fail, __SCOPE__ & ": Wrong response status code");
+								}
+								[] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+									tc_ac.stop;
+									setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements");
+								}
+								[] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+									tc_ac.stop;
+									setverdict(fail, __SCOPE__ & ": Error while retrieving resource");
+								}
+								[] tc_ac.timeout {
+									setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
+								}
+							}
+						} else if (PICS_MN_CSE){
+							vc_remoteCseIndex := f_cse_registrationRemoteCse(p_createRequestPrimitive);
+							mccPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(vc_remoteCseIndex))));
+							tc_ac.start;
+							alt {
+								[] mccPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response {
+									tc_ac.stop;
+									setverdict(pass, __SCOPE__ & ": Response OK for retrieving for attribute");
+								}
+								[] mccPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
+									tc_ac.stop;
+									setverdict(fail, __SCOPE__ & ": Wrong response status code");
+								}
+								[] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+									tc_ac.stop;
+									setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements");
+								}
+								[] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+									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_deleteResourcesCSE();
+
+						// Tear down
+						f_cf04Down();
+					} // f_CSE_REG_RET_007
+				
+				} //end g_CSE_REG_RET_007
+				
+				/**
+				 * @desc Check that the IUT accepts a retrieval request of <CSEBase> resource and responds with supportedResourceTypes attribute containing a list of the supported resources and pointOfAccess containing the list of physical addresses to be used by Registree to connect to this CSE (e.g. IP address, FQDN).
+				 * 
+				 */
+				testcase TC_CSE_REG_RET_008() runs on AeSimu system CseSystem {
+    				
+					// Local variables
+					var MsgIn v_response;
+					var integer v_aeIndex := -1;
+					var template PrimitiveContent v_contentResponse;
+				   
+					// Test control
+
+					// Test component configuration
+					f_cf01Up();
+
+					// Test adapter configuration
+
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+
+					// Test Body
+					v_contentResponse.cSEBase := mw_contentCSEBase_rc1;
+
+					mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(v_aeIndex))));//TODO Maybe PX_SUPER_AE_ID
+
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response {
+							tc_ac.stop;
+							
+							if (v_response.primitive.responsePrimitive.primitiveContent.cSEBase.supportedResourceType == PX_SRT) {
+								setverdict(pass, __SCOPE__ & ": supportedResourceTypes attribute is set according to PX_SRT");
+							}else{
+								setverdict(fail, __SCOPE__ & ": supportedResourceTypes attribute is not set according to PX_SRT");
+							}
+							
+							if (v_response.primitive.responsePrimitive.primitiveContent.cSEBase.pointOfAccess==PX_POA){
+								setverdict(pass, __SCOPE__ & ": supportedResourceTypes attribute is set according to PX_POA");
+							}else{
+								setverdict(fail, __SCOPE__ & ": supportedResourceTypes attribute is not set according to PX_POA");
+							}
+			
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Wrong response status code");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							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 TC_CSE_REG_RET_008
+				
+				/**
+				 * @desc Check that the IUT sends a <remoteCSE> retrieve request on TARGET_REMOTE_CSE_ADDRESS
+				 * 
+				 */
+				testcase TC_CSE_REG_RET_009() runs on CseSimu system CseSystem {
+					//Local variables
+					 //Local variables
+					 var MsgIn v_response;
+					 var RequestPrimitive v_request;
+					 var ResourceType v_resourceType := int16;	//remoteCSE
+					 var template PrimitiveContent v_contentResponse;
+					 var template UtTriggerPrimitive v_utRequest;
+	 		
+					 // Test control
+					if(not(PICS_MN_CSE)) {
+						setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE to run this test case");
+						stop;
+					 }
+	
+					 // Test component configuration
+					 f_cf04Up();
+	
+					 // Test adapter configuration
+	
+					 // Preamble
+					 vc_remoteCseIndex := f_cse_registrationRemoteCse(m_createRemoteCSEBase);
+					 
+					 //Send Trigger Message
+					 v_utRequest := m_utRetrieveResource(f_getLocalResourceAddress(vc_remoteCseIndex), PX_CSE_ID);
+ 				     v_utRequest.from_ := "UNINITIALIZED";
+					 f_sendUtPrimitive(v_utRequest);
+					 
+					 tc_ac.start;
+					 alt {
+ 						[] mccPortIn.receive(mw_request(mw_retrieveResource(f_getResourceAddress()))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Retrieve Request received successfully");
+						}
+						[] mccPortIn.receive {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Error Retrieve request was not received");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while waiting to receive Retrieve request");
+						}
+	  				 }
+					 // Postamble
+					 f_cse_postamble_deleteResourcesCSE();
+	
+					 // Tear down
+					 f_cf04Down();
+ 
+				}//end TC_CSE_REG_RET_009
+				
+				/**
+				 * @desc Check that IUT accepts a <remoteCSE> retrieve request
+				 * 
+				 */
+				testcase TC_CSE_REG_RET_010() runs on CseSimu system CseSystem {
+					 //Local variables
+					 var MsgIn v_response;
+					 var RequestPrimitive v_request;
+					 var ResourceType v_resourceType := int16;	//remoteCSE
+					 var template PrimitiveContent v_contentResponse;
+					 var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE;
+	
+					 // Test control
+					if(not(PICS_MN_CSE)) {
+						setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE to run this test case");
+						stop;
+					 }
+	
+					 // Test component configuration
+					 f_cf04Up();
+	
+					 // Test adapter configuration
+	
+					 // Preamble
+					 vc_remoteCseIndex := f_cse_registrationRemoteCse(m_createRemoteCSEBase);
+					 
+					v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
+	 
+					 mccPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(vc_remoteCseIndex))));
+					 tc_ac.start;
+					 alt {
+						[] mccPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": Response OK for retrieving");
+						}
+						[] mccPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Wrong response status code");
+						}
+						[] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements");
+						}
+						[] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							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_deleteResourcesCSE();
+	
+					 // Tear down
+					 f_cf04Down();
+	 
+				}//end TC_CSE_REG_RET_010
+			
+			}//end group Retrieve
+			
+			group Update{
+			
+				/**
+				 * @desc Check that the IUT rejects the update request of <CSEBase> resource.
+				 * 
+				 */
+				testcase TC_CSE_REG_UPD_001() runs on AeSimu system CseSystem {
+					// Local variables
+					var MsgIn v_response;
+					var RequestPrimitive v_request;
+					var integer v_aeIndex := -1;
+					var Labels v_labels_1 := {"VALUE_1"};
+					var template RequestPrimitive v_updateRequest := m_updateCSEBaseBase;
+					const integer c_cseBaseIndex := -1;
+					// Test control
+
+					// Test component configuration
+					f_cf01Up();
+
+					// Test adapter configuration
+
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+
+					// Test Body
+					v_updateRequest.primitiveContent.cSEBase.labels := v_labels_1;
+					v_request := f_getUpdateRequestPrimitive(int5, c_cseBaseIndex, v_updateRequest);
+					
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": CSEBase update rejected.");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int4005))) -> value v_response{
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Error while updating CSEBase with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer while updating CSEBase");
+						}
+					}					    
+
+					// Postamble
+					f_cse_postamble_deleteResources();
+
+					// Tear down
+					f_cf01Down();
+
+				}; //end TC_CSE_REG_UPD_BI_001
+				
+				/**
+				 * @desc Check that the IUT accepts an update request of <remoteCSE> resource with OPTIONAL_ATTRIBUTE.
+				 * 
+				 */
+				 
+				group g_CSE_REG_UPD_002 {
+					
+					testcase TC_CSE_REG_UPD_002_ET() runs on Tester system CseSystem {
+						// Local variables
+						var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;	
+						var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
+    						
+						v_updateRequest.primitiveContent.remoteCSE.expirationTime := "20301231T012345";
+	
+						v_cse1.start(f_CSE_REG_UPD_002(v_updateRequest));
+						v_cse1.done;
+						
+					}
+					
+					testcase TC_CSE_REG_UPD_002_LBL() runs on Tester system CseSystem {
+						// Local variables
+						var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;	
+						var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
+    						
+						v_updateRequest.primitiveContent.remoteCSE.labels := {"MyLabel"};
+	
+						v_cse1.start(f_CSE_REG_UPD_002(v_updateRequest));
+						v_cse1.done;
+	
+					}
+					
+					testcase TC_CSE_REG_UPD_002_POA() runs on Tester system CseSystem {
+						// Local variables
+						var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;	
+						var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
+    					
+						v_updateRequest.primitiveContent.remoteCSE.pointOfAccess := {"http://" & PX_CSE1_ADDRESS & "/"};
+	
+						v_cse1.start(f_CSE_REG_UPD_002(v_updateRequest));
+						v_cse1.done;
+	
+					}
+					
+					testcase TC_CSE_REG_UPD_002_NL() runs on Tester system CseSystem {
+						// Local variables
+						var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;	
+						var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
+    						
+						v_updateRequest.primitiveContent.remoteCSE.nodeLink := c_defaultNodeID;
+	
+						v_cse1.start(f_CSE_REG_UPD_002(v_updateRequest));
+						v_cse1.done;
+
+					}
+					
+					testcase TC_CSE_REG_UPD_002_RR() runs on Tester system CseSystem {
+						// Local variables
+						var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;	
+						var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
+
+						v_updateRequest.primitiveContent.remoteCSE.requestReachability := true;
+
+						v_cse1.start(f_CSE_REG_UPD_002(v_updateRequest));
+						v_cse1.done;
+
+					}
+							
+					function f_CSE_REG_UPD_002(template RequestPrimitive p_requestPrimitive) runs on CseSimu {
+						//Local variables
+					    var MsgIn v_response;
+					    var RequestPrimitive v_request;
+						var ResourceType v_resourceType := int16;	//remoteCSE		
+						// Test control
+
+						// Test component configuration
+						f_cf04Up();
+
+						// Test adapter configuration
+
+						// Preamble
+						vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase);
+
+						// Test Body
+						v_request := f_getUpdateRequestPrimitive(int16, vc_remoteCseIndex, p_requestPrimitive);
+	
+						mccPort.send(m_request(v_request));
+						tc_ac.start;
+						alt {
+							[] mccPort.receive(mw_response(mw_responsePrimitive(int2004, f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response {
+								tc_ac.stop;
+								setverdict(pass, __SCOPE__ & ": Accepted updation for resource type remoteCSE containing attribute ");
+							}
+							[] mccPort.receive(mw_response(mw_responsePrimitiveOK(f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, __SCOPE__ & ": Wrong response status code in the response");
+							}
+							[] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, __SCOPE__ & ": Accepted updation for resource type remoteCSE without containing attribute ");
+							}
+							[] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, __SCOPE__ & ": Rejected updation of resource type remoteCSE containing attribute");
+							}
+							[] tc_ac.timeout {
+								setverdict(fail, __SCOPE__ & ": No answer while updating resource type remoteCSE");
+							}
+						}					    
+
+						// Postamble
+						f_cse_postamble_deleteResourcesCSE();
+
+						// Tear down
+						f_cf04Down();
+
+					}//end f_CSE_REG_UPD_002
+				} //end g_CSE_REG_UPD_002
+			    
+			    group g_CSE_REG_UPD_003 {
+	
+					testcase TC_CSE_REG_UPD_003_ET() runs on Tester system CseSystem {
+						// Local variables
+						var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;	
+						const AttributeAux c_optionalAttribute := {"expirationTime", omit};
+						var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
+			
+						v_updateRequest.primitiveContent.remoteCSE.expirationTime := "20301231T012345";
+
+						v_cse1.start(f_CSE_REG_UPD_003(v_updateRequest, c_optionalAttribute));
+						v_cse1.done;
+		
+					}
+	
+					testcase TC_CSE_REG_UPD_003_LBL() runs on Tester system CseSystem {
+						// Local variables
+						var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;	
+						const AttributeAux c_optionalAttribute := {"labels", omit};
+						var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
+			
+						v_updateRequest.primitiveContent.remoteCSE.labels := {"MyLabel"};
+
+						v_cse1.start(f_CSE_REG_UPD_003(v_updateRequest, c_optionalAttribute));
+						v_cse1.done;
+
+					}
+	
+					testcase TC_CSE_REG_UPD_003_POA() runs on Tester system CseSystem {
+						// Local variables
+						var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;	
+						const AttributeAux c_optionalAttribute := {"pointofAccess", omit};
+						var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
+		
+						v_updateRequest.primitiveContent.remoteCSE.pointOfAccess := {"http://" & PX_CSE1_ADDRESS & "/"};
+
+						v_cse1.start(f_CSE_REG_UPD_003(v_updateRequest, c_optionalAttribute));
+						v_cse1.done;
+
+					}
+	
+					testcase TC_CSE_REG_UPD_003_NL() runs on Tester system CseSystem {
+						// Local variables
+						var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;	
+						const AttributeAux c_optionalAttribute := {"nodeLink", omit};
+						var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
+			
+						v_updateRequest.primitiveContent.remoteCSE.nodeLink := c_defaultNodeID;
+
+						v_cse1.start(f_CSE_REG_UPD_003(v_updateRequest, c_optionalAttribute));
+						v_cse1.done;
+
+					}
+					
+					testcase TC_CSE_REG_UPD_003_RR() runs on Tester system CseSystem {
+						// Local variables
+						var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;	
+						const AttributeAux c_optionalAttribute := {"requestReachability", omit};
+						var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
+
+						v_updateRequest.primitiveContent.remoteCSE.requestReachability := true;
+
+						v_cse1.start(f_CSE_REG_UPD_003(v_updateRequest, c_optionalAttribute));
+						v_cse1.done;
+
+					}
+	
+					function f_CSE_REG_UPD_003(template RequestPrimitive p_requestPrimitive, in AttributeAux p_Attribute) runs on CseSimu {
+						// Local variables
+						//Local variables
+						var MsgIn v_response;
+						var RequestPrimitive v_request;
+						var ResourceType v_resourceType := int16;	//remoteCSE
+						var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE;
+								
+						// Test control
+						if(not(PICS_MN_CSE)) {
+							setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE to run this test case");
+							stop;
+						}
+
+						// Test component configuration
+						f_cf04Up();
+
+						// Test adapter configuration
+
+						// Preamble
+						vc_remoteCseIndex := f_cse_registrationRemoteCse(m_createRemoteCSEBase);
+						
+						//Send Trigger Message
+					    v_utRequest.to_ := f_getResourceAddress();
+					    v_utRequest.from_ := "UNINITIALIZED";
+					    f_sendUtPrimitive(v_utRequest);
+
+						// Test Body
+						v_request := f_getUpdateRequestPrimitive(int16, vc_remoteCseIndex, p_requestPrimitive);
+
+						mccPort.send(m_request(v_request));
+						tc_ac.start;
+						alt {
+							[] mccPort.receive(mw_response(mw_responsePrimitive(int2004, f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response {
+								tc_ac.stop;
+								setverdict(pass, __SCOPE__ & ": Accepted updation for resource type remoteCSE containing attribute " & p_Attribute.name);
+								f_setResource(v_request.primitiveContent,int16);
+							}
+							[] mccPort.receive(mw_response(mw_responsePrimitiveOK(f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, __SCOPE__ & ": Wrong response status code in the response");
+								f_setResource(v_request.primitiveContent,int16);
+							}
+							[] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, __SCOPE__ & ": Accepted updation for resource type remoteCSE without containing attribute " & p_Attribute.name);
+								f_setResource(v_request.primitiveContent,int16);
+							}
+							[] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, __SCOPE__ & ": Rejected updation of resource type remoteCSE containing attribute" & p_Attribute.name);
+							}
+							[] tc_ac.timeout {
+								setverdict(fail, __SCOPE__ & ": No answer while updating resource type remoteCSE");
+							}
+						}					    
 
-				// Tear down
-				f_cf04Down();
+						// Postamble
+						f_cse_postamble_deleteResourcesCSE();
 
-			}
-				
+						// Tear down
+						f_cf04Down();
 
+					}//end f_CSE_REG_UPD_003
+				} //end g_CSE_REG_UPD_003
+			    
+			}// end group Update
 			
-			}	//end group Create
+			group Delete{
 			
-			group Retrieve{
-				
-				/**
-				 * @desc Check that the IUT accepts an retrieval request of <CSEBase> resource and responds with all  attributes that have multiplicity equals to 1.
-				 * 
-				 */
-				testcase TC_CSE_REG_RET_001() runs on AeSimu system CseSystem {
-    				
-					// Local variables
-					var MsgIn v_response;
-					var integer v_aeIndex := -1;
-					var template PrimitiveContent v_contentResponse;
-	    										   
-					// Test control
-	
-					// Test component configuration
-					f_cf01Up();
-	
-					// Test adapter configuration
-	
-					// Preamble
-					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
-					
-					// Test Body
-					v_contentResponse.cSEBase := mw_contentCSEBase_rc1;
-					
-					mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(v_aeIndex))));//TODO Maybe PX_SUPER_AE_ID
-	
-					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_responsePrimitiveOK(v_contentResponse))) -> value v_response {
-							tc_ac.stop;
-							setverdict(fail, __SCOPE__ & ": Wrong response status code");
-						}
-						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
-							tc_ac.stop;
-							setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements");
-						}
-						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
-							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 TC_CSE_REG_RET_001
-				
 				/**
-				 * @desc Check that if the IUT is IN-CSE, it accepts an retrieval request of <CSEBase> resource and returns the cseType attribute. cseType Attribute is mandatory for IN-CSE
+				 * @desc Check that the IUT rejects the delete request of <CSEBase> resource.
 				 * 
 				 */
-				testcase TC_CSE_REG_RET_005() runs on AeSimu system CseSystem {
-    				
+				testcase TC_CSE_REG_DEL_001() runs on AeSimu system CseSystem {
 					// Local variables
 					var MsgIn v_response;
+					var RequestPrimitive v_request;
 					var integer v_aeIndex := -1;
-					var template PrimitiveContent v_contentResponse;
-								   
+			   
 					// Test control
-					if(not(PICS_IN_CSE)) {
-						setverdict(inconc, __SCOPE__ & ": IUT shall be IN-CSE to run this test case");
-						stop;
-					}
 
 					// Test component configuration
 					f_cf01Up();
@@ -1763,137 +3181,97 @@ module OneM2M_Testcases_CSE {
 
 					// Preamble
 					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
-	
+		
 					// Test Body
-					v_contentResponse.cSEBase := mw_contentCSEBase_rc1;
-	
-					mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(v_aeIndex))));//TODO Maybe PX_SUPER_AE_ID 
-					
+					v_request := valueof(m_delete(f_getResourceAddress(), f_getOriginator()));
+					mcaPort.send(m_request(v_request));
 					tc_ac.start;
 					alt {
-						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response {
-							tc_ac.stop;
-							if (ispresent(v_response.primitive.responsePrimitive.primitiveContent.cSEBase.cseType)){
-								if (v_response.primitive.responsePrimitive.primitiveContent.cSEBase.cseType==int1){
-									setverdict(pass, __SCOPE__ & ": cseType attribute is set to 1 (IN_CSE)");
-								}else{
-									setverdict(fail, __SCOPE__ & ": Error, cseType attribute is set to " & int2str(enum2int(v_response.primitive.responsePrimitive.primitiveContent.cSEBase.cseType)));
-								}
-							}else{
-								setverdict(fail, __SCOPE__ & ": Error, cseType attribute is not present");
-							}
-							
-						}
-						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response {
-							tc_ac.stop;
-							setverdict(fail, __SCOPE__ & ": Wrong response status code");
-						}
-						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) {
 							tc_ac.stop;
-							setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements");
+							setverdict(pass, __SCOPE__ & ": CSEBase deletion rejected.");
 						}
-						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int4005))) -> value v_response{
 							tc_ac.stop;
-							setverdict(fail, __SCOPE__ & ": Error while retrieving resource");
+							setverdict(fail, __SCOPE__ & ": Error while deleting CSEBase with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
 						}
 						[] tc_ac.timeout {
-							setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
+							setverdict(fail, __SCOPE__ & ": No answer while deleting CSEBase");
 						}
-					}	
-
+					}					    
+	
 					// Postamble
 					f_cse_postamble_deleteResources();
 
 					// Tear down
 					f_cf01Down();
-
-				}//end TC_CSE_REG_RET_BV_005
+		
+				}//end TC_CSE_REG_DEL_001			
 				
 				/**
-				 * @desc Check that the IUT accepts a retrieval request of <CSEBase> resource and responds with supportedResourceTypes attribute containing a list of the supported resources and pointOfAccess containing the list of physical addresses to be used by Registree to connect to this CSE (e.g. IP address, FQDN).
+				 * @desc Check that IUT accepts a <remoteCSE> delete request on TARGET_REMOTE_CSE_ADDRESS, and deletes the <remoteCSE> resource
 				 * 
 				 */
-				testcase TC_CSE_REG_RET_008() runs on AeSimu system CseSystem {
-    				
-					// Local variables
-					var MsgIn v_response;
-					var integer v_aeIndex := -1;
-					var template PrimitiveContent v_contentResponse;
-				   
+				testcase TC_CSE_REG_DEL_002() runs on CseSimu system CseSystem {
+					//Local variables	
+					var RequestPrimitive v_request;
 					// Test control
 
 					// Test component configuration
-					f_cf01Up();
+					f_cf04Up();
 
 					// Test adapter configuration
 
 					// Preamble
-					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+					vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSEBase);
 
 					// Test Body
-					v_contentResponse.cSEBase := mw_contentCSEBase_rc1;
-
-					mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(v_aeIndex))));//TODO Maybe PX_SUPER_AE_ID
+					v_request := valueof(m_delete(f_getResourceAddress(vc_remoteCseIndex), f_getOriginator(vc_remoteCseIndex)));
 
+					mccPort.send(m_request(v_request));
 					tc_ac.start;
 					alt {
-						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response {
-							tc_ac.stop;
-							
-							if (v_response.primitive.responsePrimitive.primitiveContent.cSEBase.supportedResourceType == PX_SRT) {
-								setverdict(pass, __SCOPE__ & ": supportedResourceTypes attribute is set according to PX_SRT");
-							}else{
-								setverdict(fail, __SCOPE__ & ": supportedResourceTypes attribute is not set according to PX_SRT");
-							}
-							
-							if (v_response.primitive.responsePrimitive.primitiveContent.cSEBase.pointOfAccess==PX_POA){
-								setverdict(pass, __SCOPE__ & ": supportedResourceTypes attribute is set according to PX_POA");
-							}else{
-								setverdict(fail, __SCOPE__ & ": supportedResourceTypes attribute is not set according to PX_POA");
-							}
-			
-						}
-						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response {
+						[] mccPort.receive(mw_response(mw_responsePrimitive(int2002))) {
 							tc_ac.stop;
-							setverdict(fail, __SCOPE__ & ": Wrong response status code");
+							setverdict(pass, __SCOPE__ & ": Deletion of <remoteCSE> resource has been accepted");
 						}
-						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+						[] mccPort.receive(mw_response(mw_responsePrimitiveOK)) {
 							tc_ac.stop;
-							setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements");
+							setverdict(fail, __SCOPE__ & ": Wrong response status code in the response");
 						}
-						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+						[] mccPort.receive(mw_response(mw_responsePrimitiveKO)) {
 							tc_ac.stop;
-							setverdict(fail, __SCOPE__ & ": Error while retrieving resource");
+							setverdict(fail, __SCOPE__ & ": Error while deleting <remoteCSE> resource");
 						}
 						[] tc_ac.timeout {
-							setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
+							setverdict(fail, __SCOPE__ & ": No answer while deleting resource");
 						}
-					}	
+					}
+					
+//					Check if the resource has been deleted or not
+					if(f_cse_isResourcePresent(vc_remoteCseIndex)) {
+						setverdict(fail, __SCOPE__ & ":INFO: Resource not deleted");
+					} else {
+						setverdict(pass, __SCOPE__ & ":INFO: Resource deleted");
+					}					    
 
 					// Postamble
-					f_cse_postamble_deleteResources();
+					f_cse_postamble_deleteResourcesCSE();
 
 					// Tear down
-					f_cf01Down();
+					f_cf04Down();
 
-				}//end TC_CSE_REG_RET_008
-			
-			}	//end group Retrieve
-			
-			group Update{
-			
+				}//end TC_CSE_REG_DEL_002	
+				
 				/**
-				 * @desc Check that the IUT rejects the update request of <CSEBase> resource.
+				 * @desc Check that the IUT accepts an AE de-registration
 				 * 
 				 */
-				testcase TC_CSE_REG_UPD_001() runs on AeSimu system CseSystem {
-					// Local variables
+				testcase TC_CSE_REG_DEL_003() runs on AeSimu system CseSystem {
+					//Local variables
 					var MsgIn v_response;
 					var RequestPrimitive v_request;
-					var integer v_aeIndex := -1;
-					var Labels v_labels_1 := {"VALUE_1"};
-					var template RequestPrimitive v_updateRequest := m_updateCSEBaseBase;
-					const integer c_cseBaseIndex := -1;
+					var integer v_aeIndex := -1;	
 					// Test control
 
 					// Test component configuration
@@ -1905,22 +3283,25 @@ module OneM2M_Testcases_CSE {
 					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
 
 					// Test Body
-					v_updateRequest.primitiveContent.cSEBase.labels := v_labels_1;
-					v_request := f_getUpdateRequestPrimitive(int5, c_cseBaseIndex, v_updateRequest);
-					
+					v_request := valueof(m_delete(f_getResourceAddress(v_aeIndex), f_getOriginator(v_aeIndex)));
+
 					mcaPort.send(m_request(v_request));
 					tc_ac.start;
 					alt {
-						[] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) {
 							tc_ac.stop;
-							setverdict(pass, __SCOPE__ & ": CSEBase update rejected.");
+							setverdict(pass, __SCOPE__ & ": AE has been de-registered successfully");
 						}
-						[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int4005))) -> value v_response{
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
 							tc_ac.stop;
-							setverdict(fail, __SCOPE__ & ": Error while updating CSEBase with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
+							setverdict(fail, __SCOPE__ & ": Wrong response status code in the response");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Error while de-registering AE");
 						}
 						[] tc_ac.timeout {
-							setverdict(fail, __SCOPE__ & ": No answer while updating CSEBase");
+							setverdict(fail, __SCOPE__ & ": No answer while de-registering AE");
 						}
 					}					    
 
@@ -1930,57 +3311,56 @@ module OneM2M_Testcases_CSE {
 					// Tear down
 					f_cf01Down();
 
-				}//end TC_CSE_REG_UPD_BI_001			
-
-			}// end group Update
-			
-			group Delete{
-			
+				}//end TC_CSE_REG_DEL_003	
+				
 				/**
-				 * @desc Check that the IUT rejects the delete request of <CSEBase> resource.
+				 * @desc Check that IUT sends a <remoteCSE> delete request on TARGET_REMOTE_CSE_ADDRESS
 				 * 
 				 */
-				testcase TC_CSE_REG_DEL_001() runs on AeSimu system CseSystem {
-					// Local variables
-					var MsgIn v_response;
-					var RequestPrimitive v_request;
-					var integer v_aeIndex := -1;
-			   
+				testcase TC_CSE_REG_DEL_004() runs on CseSimu system CseSystem {
+					//Local variables	
+					var template UtTriggerPrimitive v_utRequest := m_utDeleteRequest;
+					var UtTriggerAckPrimitive v_trigger_response;
+					var integer v_auxInteger;
 					// Test control
 
 					// Test component configuration
-					f_cf01Up();
+					f_cf04Up();
 
 					// Test adapter configuration
 
 					// Preamble
-					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
-		
+					vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSEBase);
+					
+					//Send Trigger Message
+					v_auxInteger := f_setResource(valueof(m_primitiveContentRemoteCSE(m_contentCreateRemoteCSE(omit,omit,omit,omit))), int16);
+					v_utRequest.to_ := f_getResourceAddress(v_auxInteger);
+					v_utRequest.from_ := "UNINITIALIZED";
+					f_sendUtPrimitive(v_utRequest);	
+
 					// Test Body
-					v_request := valueof(m_delete(f_getResourceAddress(), f_getOriginator()));
-					mcaPort.send(m_request(v_request));
 					tc_ac.start;
 					alt {
-						[] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) {
+						[] mccPortIn.receive(mw_request(mw_deleteRequest( f_getResourceAddress(vc_remoteCseIndex), PX_CSE_ID))) {
 							tc_ac.stop;
-							setverdict(pass, __SCOPE__ & ": CSEBase deletion rejected.");
+							setverdict(pass, __SCOPE__ & ": <remoteCSE> delete request has been received");
 						}
-						[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int4005))) -> value v_response{
+						[] mccPortIn.receive {
 							tc_ac.stop;
-							setverdict(fail, __SCOPE__ & ": Error while deleting CSEBase with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
+							setverdict(fail, __SCOPE__ & ": Error while receiving <remoteCSE> delete request");
 						}
 						[] tc_ac.timeout {
-							setverdict(fail, __SCOPE__ & ": No answer while deleting CSEBase");
+							setverdict(fail, __SCOPE__ & ": No answer while receiving <remoteCSE> delete request");
 						}
 					}					    
-	
+
 					// Postamble
-					f_cse_postamble_deleteResources();
+					f_cse_postamble_deleteResourcesCSE();
 
 					// Tear down
-					f_cf01Down();
-		
-				}//end TC_CSE_REG_DEL_BI_001			
+					f_cf04Down();
+
+				}//end TC_CSE_REG_DEL_004	
 			
 			}// end group Delete
 	  	  	
@@ -2009,7 +3389,7 @@ module OneM2M_Testcases_CSE {
 						if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
 							if(not ispresent(v_responsePrimitive.primitiveContent.container.resourceName)){
 								setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided");
-						}
+							}
 						}
 						
 					}
@@ -2026,8 +3406,9 @@ module OneM2M_Testcases_CSE {
 						
 						 
 																			
-							if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
-							if(not ispresent(v_responsePrimitive.primitiveContent.container.resourceName)){
+							if(getverdict == pass){ 
+								v_responsePrimitive := f_getResponsePrimitive(v_ae1);
+								if(not ispresent(v_responsePrimitive.primitiveContent.container.resourceName)){
 									setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided");
 								}
 							}
@@ -11530,12 +12911,12 @@ module OneM2M_Testcases_CSE {
 	
 				} // end g_CSE_DMR_UPD_014
 
-				group g_CSE_DMR_UPD_017{
+				group g_CSE_DMR_UPD_015{
 			  		
 					/**
 					 * @desc Check that the IUT updates successfully the value of the optional attribute OPTIONAL_ATTRIBUTE of the RESOURCE_TYPE resource under CSEBase
 					 */
-					testcase TC_CSE_DMR_UPD_017_CSR_LBL() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_CSR_LBL() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var Labels v_labels := {"MyLabel"};
 					   	var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;
@@ -11544,7 +12925,7 @@ module OneM2M_Testcases_CSE {
 	
 					   v_updateRequest.primitiveContent.remoteCSE.labels := v_labels;
 	
-					   v_ae1.start(f_CSE_DMR_UPD_017(int16, m_createRemoteCSEBase, v_updateRequest));//Remote CSE
+					   v_ae1.start(f_CSE_DMR_UPD_015(int16, m_createRemoteCSEBase, v_updateRequest));//Remote CSE
 						v_ae1.done;
 						
 						 
@@ -11569,7 +12950,7 @@ module OneM2M_Testcases_CSE {
 					   }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_CSR_POA() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_CSR_POA() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var PoaList v_poaList := {"http://" & PX_AE2_ADDRESS & "/"};
 					   var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;
@@ -11578,7 +12959,7 @@ module OneM2M_Testcases_CSE {
 
 					   v_updateRequest.primitiveContent.remoteCSE.pointOfAccess := v_poaList;
 
-					   v_ae1.start(f_CSE_DMR_UPD_017(int16, m_createRemoteCSEBase, v_updateRequest));//Remote CSE
+					   v_ae1.start(f_CSE_DMR_UPD_015(int16, m_createRemoteCSEBase, v_updateRequest));//Remote CSE
 						v_ae1.done;
 						
 						 
@@ -11603,7 +12984,7 @@ module OneM2M_Testcases_CSE {
 					  }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_CSR_NL() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_CSR_NL() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var XSD.AnyURI v_nodeLink := "MyNodeId";
 					   	var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;
@@ -11612,7 +12993,7 @@ module OneM2M_Testcases_CSE {
 
 					   v_updateRequest.primitiveContent.remoteCSE.nodeLink := v_nodeLink;
 
-					   v_ae1.start(f_CSE_DMR_UPD_017(int16, m_createRemoteCSEBase, v_updateRequest));//Remote CSE
+					   v_ae1.start(f_CSE_DMR_UPD_015(int16, m_createRemoteCSEBase, v_updateRequest));//Remote CSE
 						v_ae1.done;
 						
 						 
@@ -11637,7 +13018,7 @@ module OneM2M_Testcases_CSE {
 					  }
 					}
 			  		
-					testcase TC_CSE_DMR_UPD_017_NOD_LBL() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_NOD_LBL() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var Labels v_labels := {"MyLabel"};
 						var template RequestPrimitive v_updateRequest := m_updateNodeBase;
@@ -11646,7 +13027,7 @@ module OneM2M_Testcases_CSE {
 						
 						v_updateRequest.primitiveContent.node.labels := v_labels;
 						
-						v_ae1.start(f_CSE_DMR_UPD_017(int9, m_createNodeBase, v_updateRequest));//Node
+						v_ae1.start(f_CSE_DMR_UPD_015(int9, m_createNodeBase, v_updateRequest));//Node
 						v_ae1.done;
 						
 						 
@@ -11671,7 +13052,7 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_NOD_ACPI() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_NOD_ACPI() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var template RequestPrimitive v_updateRequest := m_updateNodeBase;
 						var RequestPrimitive v_updateRequestPrimitive;
@@ -11679,7 +13060,7 @@ module OneM2M_Testcases_CSE {
 						var PrimitiveContent v_primitiveContentRetrieveResource;
 						
 						
-						v_ae1.start(f_CSE_DMR_UPD_017(int9, m_createNodeBase, v_updateRequest, true));//Node
+						v_ae1.start(f_CSE_DMR_UPD_015(int9, m_createNodeBase, v_updateRequest, true));//Node
 						v_ae1.done;
 						
 						 
@@ -11707,12 +13088,12 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_NOD_HCL() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_NOD_HCL() runs on Tester system CseSystem {
 						
 						/* TO BE DONE */
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_AE_LBL() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_AE_LBL() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var Labels v_labels := {"MyLabel"};
 						var template RequestPrimitive v_updateRequest := m_updateAE;
@@ -11721,7 +13102,7 @@ module OneM2M_Testcases_CSE {
 						
 						v_updateRequest.primitiveContent.aE.labels := v_labels;
 						
-						v_ae1.start(f_CSE_DMR_UPD_017(int2, m_createAe(PX_APP_ID), v_updateRequest));//AE
+						v_ae1.start(f_CSE_DMR_UPD_015(int2, m_createAe(PX_APP_ID), v_updateRequest));//AE
 						v_ae1.done;
 						
 						 
@@ -11746,14 +13127,14 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_AE_ACPI() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_AE_ACPI() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var template RequestPrimitive v_updateRequest := m_updateAE;
 						var RequestPrimitive v_updateRequestPrimitive;
 						var ResponsePrimitive v_responsePrimitive;
 						var PrimitiveContent v_primitiveContentRetrieveResource;
 						
-						v_ae1.start(f_CSE_DMR_UPD_017(int2, m_createAe(PX_APP_ID), v_updateRequest, true));//AE
+						v_ae1.start(f_CSE_DMR_UPD_015(int2, m_createAe(PX_APP_ID), v_updateRequest, true));//AE
 						v_ae1.done;
 						
 						 
@@ -11780,7 +13161,7 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_AE_APN() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_AE_APN() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var XSD.String v_appName := "MyAppName";
 						var template RequestPrimitive v_updateRequest := m_updateAE;
@@ -11788,7 +13169,7 @@ module OneM2M_Testcases_CSE {
 						var PrimitiveContent v_primitiveContentRetrieveResource;
 						
 						v_updateRequest.primitiveContent.aE.appName := v_appName;
-						v_ae1.start(f_CSE_DMR_UPD_017(int2, m_createAe(PX_APP_ID), v_updateRequest));//AE
+						v_ae1.start(f_CSE_DMR_UPD_015(int2, m_createAe(PX_APP_ID), v_updateRequest));//AE
 						v_ae1.done;
 						
 						 
@@ -11813,7 +13194,7 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_AE_POA() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_AE_POA() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var PoaList v_poaList := {"http://" & PX_AE2_ADDRESS & "/"};
 						var template RequestPrimitive v_updateRequest := m_updateAE;
@@ -11821,7 +13202,7 @@ module OneM2M_Testcases_CSE {
 						var PrimitiveContent v_primitiveContentRetrieveResource;
 						
 						v_updateRequest.primitiveContent.aE.pointOfAccess := v_poaList;
-						v_ae1.start(f_CSE_DMR_UPD_017(int2, m_createAe(PX_APP_ID), v_updateRequest));//AE
+						v_ae1.start(f_CSE_DMR_UPD_015(int2, m_createAe(PX_APP_ID), v_updateRequest));//AE
 						v_ae1.done;
 						
 						 
@@ -11846,7 +13227,7 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_AE_OR() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_AE_OR() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var XSD.AnyURI v_ontoLogyRef := "MyOntologyRef";
 						var template RequestPrimitive v_updateRequest := m_updateAE;
@@ -11854,7 +13235,7 @@ module OneM2M_Testcases_CSE {
 						var PrimitiveContent v_primitiveContentRetrieveResource;
 						
 						v_updateRequest.primitiveContent.aE.ontologyRef := v_ontoLogyRef;
-						v_ae1.start(f_CSE_DMR_UPD_017(int2, m_createAe(PX_APP_ID), v_updateRequest));//AE
+						v_ae1.start(f_CSE_DMR_UPD_015(int2, m_createAe(PX_APP_ID), v_updateRequest));//AE
 						v_ae1.done;
 						
 						 
@@ -11879,7 +13260,7 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_CNT_LBL() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_CNT_LBL() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var Labels v_labels := {"MyLabel"};
 						var template RequestPrimitive v_updateRequest := m_updateContainerBase;
@@ -11888,7 +13269,7 @@ module OneM2M_Testcases_CSE {
 						
 						v_updateRequest.primitiveContent.container.labels := v_labels;
 						
-						v_ae1.start(f_CSE_DMR_UPD_017(int3, m_createContainerBase, v_updateRequest));//Container
+						v_ae1.start(f_CSE_DMR_UPD_015(int3, m_createContainerBase, v_updateRequest));//Container
 						v_ae1.done;
 						
 						 
@@ -11913,14 +13294,14 @@ module OneM2M_Testcases_CSE {
 						 }				
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_CNT_ACPI() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_CNT_ACPI() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var template RequestPrimitive v_updateRequest := m_updateContainerBase;
 						var RequestPrimitive v_updateRequestPrimitive;
 						var ResponsePrimitive v_responsePrimitive;
 						var PrimitiveContent v_primitiveContentRetrieveResource;
 						
-						v_ae1.start(f_CSE_DMR_UPD_017(int3, m_createContainerBase, v_updateRequest, true));//Container
+						v_ae1.start(f_CSE_DMR_UPD_015(int3, m_createContainerBase, v_updateRequest, true));//Container
 						v_ae1.done;
 						
 						 
@@ -11947,7 +13328,7 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_CNT_MNI() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_CNT_MNI() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var XSD.NonNegativeInteger v_maxNrOfInstances := 5;
 						var template RequestPrimitive v_updateRequest := m_updateContainerBase;
@@ -11956,7 +13337,7 @@ module OneM2M_Testcases_CSE {
 						
 						v_updateRequest.primitiveContent.container.maxNrOfInstances := v_maxNrOfInstances;
 						
-						v_ae1.start(f_CSE_DMR_UPD_017(int3, m_createContainerBase, v_updateRequest));//Container
+						v_ae1.start(f_CSE_DMR_UPD_015(int3, m_createContainerBase, v_updateRequest));//Container
 						v_ae1.done;
 						
 						 
@@ -11981,7 +13362,7 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_CNT_MBS() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_CNT_MBS() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var XSD.NonNegativeInteger v_maxByteSize := 512;
 						var template RequestPrimitive v_updateRequest := m_updateContainerBase;
@@ -11990,7 +13371,7 @@ module OneM2M_Testcases_CSE {
 						
 						v_updateRequest.primitiveContent.container.maxByteSize := v_maxByteSize;
 						
-						v_ae1.start(f_CSE_DMR_UPD_017(int3, m_createContainerBase, v_updateRequest));//Container
+						v_ae1.start(f_CSE_DMR_UPD_015(int3, m_createContainerBase, v_updateRequest));//Container
 						v_ae1.done;
 						
 						 
@@ -12015,7 +13396,7 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_CNT_MIA() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_CNT_MIA() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var XSD.NonNegativeInteger v_maxInstanceAge := 1;
 						var template RequestPrimitive v_updateRequest := m_updateContainerBase;
@@ -12024,7 +13405,7 @@ module OneM2M_Testcases_CSE {
 						
 						v_updateRequest.primitiveContent.container.maxInstanceAge := v_maxInstanceAge;
 						
-						v_ae1.start(f_CSE_DMR_UPD_017(int3, m_createContainerBase, v_updateRequest));//Container
+						v_ae1.start(f_CSE_DMR_UPD_015(int3, m_createContainerBase, v_updateRequest));//Container
 						v_ae1.done;
 						
 						 
@@ -12049,7 +13430,7 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_CNT_OR() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_CNT_OR() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var XSD.AnyURI v_ontoLogyRef := "MyOntologyRef";
 						var template RequestPrimitive v_updateRequest := m_updateContainerBase;
@@ -12058,7 +13439,7 @@ module OneM2M_Testcases_CSE {
 						
 						v_updateRequest.primitiveContent.container.ontologyRef := v_ontoLogyRef;
 						
-						v_ae1.start(f_CSE_DMR_UPD_017(int3, m_createContainerBase, v_updateRequest));//Container
+						v_ae1.start(f_CSE_DMR_UPD_015(int3, m_createContainerBase, v_updateRequest));//Container
 						v_ae1.done;
 						
 						 
@@ -12083,7 +13464,7 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_CNT_LI() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_CNT_LI() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var XSD.AnyURI v_locationID := "MyLocationID";
 						var template RequestPrimitive v_updateRequest := m_updateContainerBase;
@@ -12092,7 +13473,7 @@ module OneM2M_Testcases_CSE {
 						
 						v_updateRequest.primitiveContent.container.locationID := v_locationID;
 						
-						v_ae1.start(f_CSE_DMR_UPD_017(int3, m_createContainerBase, v_updateRequest));//Container
+						v_ae1.start(f_CSE_DMR_UPD_015(int3, m_createContainerBase, v_updateRequest));//Container
 						v_ae1.done;
 						
 						 
@@ -12117,7 +13498,7 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_ACP_LBL() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_ACP_LBL() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var Labels v_labels := {"MyLabel"};
 						var template RequestPrimitive v_updateRequest := m_updateAcpBase;
@@ -12126,7 +13507,7 @@ module OneM2M_Testcases_CSE {
 						
 						v_updateRequest.primitiveContent.accessControlPolicy.labels := v_labels;
 						
-						v_ae1.start(f_CSE_DMR_UPD_017(int1, m_createAcpBase, v_updateRequest));//AccessControlPolicy
+						v_ae1.start(f_CSE_DMR_UPD_015(int1, m_createAcpBase, v_updateRequest));//AccessControlPolicy
 						v_ae1.done;
 						
 						 
@@ -12151,14 +13532,14 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_SUB_ACPI() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_SUB_ACPI() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
 						var RequestPrimitive v_updateRequestPrimitive;
 						var ResponsePrimitive v_responsePrimitive;
 						var PrimitiveContent v_primitiveContentRetrieveResource;
 						
-						v_ae1.start(f_CSE_DMR_UPD_017(int23, m_createSubscriptionBase, v_updateRequest, true));//Subscription
+						v_ae1.start(f_CSE_DMR_UPD_015(int23, m_createSubscriptionBase, v_updateRequest, true));//Subscription
 						v_ae1.done;
 						
 						 
@@ -12185,7 +13566,7 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_SUB_LBL() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_SUB_LBL() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var Labels v_labels := {"MyLabel"};
 						var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
@@ -12193,7 +13574,7 @@ module OneM2M_Testcases_CSE {
 						var PrimitiveContent v_primitiveContentRetrieveResource;
 						
 						v_updateRequest.primitiveContent.subscription.labels := v_labels;
-						v_ae1.start(f_CSE_DMR_UPD_017(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
+						v_ae1.start(f_CSE_DMR_UPD_015(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
 						v_ae1.done;
 						
 						 
@@ -12218,7 +13599,7 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_SUB_ENC() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_SUB_ENC() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var EventNotificationCriteria v_eventNotificationCriteria:= valueof(m_eventNotificationCriteria({int3}, -));
 						var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
@@ -12226,7 +13607,7 @@ module OneM2M_Testcases_CSE {
 						var PrimitiveContent v_primitiveContentRetrieveResource;
 						
 						v_updateRequest.primitiveContent.subscription.eventNotificationCriteria:=v_eventNotificationCriteria ;
-						v_ae1.start(f_CSE_DMR_UPD_017(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
+						v_ae1.start(f_CSE_DMR_UPD_015(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
 						v_ae1.done;
 						
 						 
@@ -12251,7 +13632,7 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_SUB_EXC() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_SUB_EXC() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var XSD.PositiveInteger v_expirationCounter:=10;
 						var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
@@ -12259,7 +13640,7 @@ module OneM2M_Testcases_CSE {
 						var PrimitiveContent v_primitiveContentRetrieveResource;
 						
 						v_updateRequest.primitiveContent.subscription.expirationCounter:=v_expirationCounter;
-						v_ae1.start(f_CSE_DMR_UPD_017(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
+						v_ae1.start(f_CSE_DMR_UPD_015(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
 						v_ae1.done;
 						
 						 
@@ -12284,7 +13665,7 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_SUB_GPI() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_SUB_GPI() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var XSD.AnyURI v_groupID := "MyGroupID";
 						var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
@@ -12292,7 +13673,7 @@ module OneM2M_Testcases_CSE {
 						var PrimitiveContent v_primitiveContentRetrieveResource;
 						
 						v_updateRequest.primitiveContent.subscription.groupID:=v_groupID;
-						v_ae1.start(f_CSE_DMR_UPD_017(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
+						v_ae1.start(f_CSE_DMR_UPD_015(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
 						v_ae1.done;
 						
 						 
@@ -12317,7 +13698,7 @@ module OneM2M_Testcases_CSE {
 						 } 
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_SUB_NFU() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_SUB_NFU() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var XSD.AnyURI v_notificationForwardingURI:= "MyNotificationForwardingURI";
 						var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
@@ -12325,7 +13706,7 @@ module OneM2M_Testcases_CSE {
 						var PrimitiveContent v_primitiveContentRetrieveResource;
 						
 						v_updateRequest.primitiveContent.subscription.notificationForwardingURI:=v_notificationForwardingURI;
-						v_ae1.start(f_CSE_DMR_UPD_017(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
+						v_ae1.start(f_CSE_DMR_UPD_015(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
 						v_ae1.done;
 						
 						 
@@ -12350,7 +13731,7 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_SUB_BN() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_SUB_BN() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var BatchNotify v_batchNotify:= {1, "PT1S"};
 						var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
@@ -12358,7 +13739,7 @@ module OneM2M_Testcases_CSE {
 						var PrimitiveContent v_primitiveContentRetrieveResource;
 						
 						v_updateRequest.primitiveContent.subscription.batchNotify:=v_batchNotify;
-						v_ae1.start(f_CSE_DMR_UPD_017(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
+						v_ae1.start(f_CSE_DMR_UPD_015(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
 						v_ae1.done;
 						
 						 
@@ -12383,7 +13764,7 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_SUB_RL() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_SUB_RL() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var RateLimit v_rateLimit:= {2, "PT1S"};
 						var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
@@ -12391,7 +13772,7 @@ module OneM2M_Testcases_CSE {
 						var PrimitiveContent v_primitiveContentRetrieveResource;
 						
 						v_updateRequest.primitiveContent.subscription.rateLimit:=v_rateLimit;
-						v_ae1.start(f_CSE_DMR_UPD_017(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
+						v_ae1.start(f_CSE_DMR_UPD_015(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
 						v_ae1.done;
 						
 						 
@@ -12416,7 +13797,7 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_SUB_PN() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_SUB_PN() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var PendingNotification v_pendingNotification:=int2;
 						var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
@@ -12424,7 +13805,7 @@ module OneM2M_Testcases_CSE {
 						var PrimitiveContent v_primitiveContentRetrieveResource;
 						
 						v_updateRequest.primitiveContent.subscription.pendingNotification:=v_pendingNotification;
-						v_ae1.start(f_CSE_DMR_UPD_017(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
+						v_ae1.start(f_CSE_DMR_UPD_015(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
 						v_ae1.done;
 						
 						 
@@ -12449,7 +13830,7 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_SUB_NSP() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_SUB_NSP() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var XSD.PositiveInteger v_notificationStoragePriority:=10;
 						var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
@@ -12457,7 +13838,7 @@ module OneM2M_Testcases_CSE {
 						var PrimitiveContent v_primitiveContentRetrieveResource;
 						
 						v_updateRequest.primitiveContent.subscription.notificationStoragePriority:=v_notificationStoragePriority;
-						v_ae1.start(f_CSE_DMR_UPD_017(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
+						v_ae1.start(f_CSE_DMR_UPD_015(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
 						v_ae1.done;
 						
 						 
@@ -12482,7 +13863,7 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_SUB_LN() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_SUB_LN() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var XSD.Boolean v_latestNotify:=true;
 						var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
@@ -12490,7 +13871,7 @@ module OneM2M_Testcases_CSE {
 						var PrimitiveContent v_primitiveContentRetrieveResource;
 						
 						v_updateRequest.primitiveContent.subscription.latestNotify:=v_latestNotify;
-						v_ae1.start(f_CSE_DMR_UPD_017(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
+						v_ae1.start(f_CSE_DMR_UPD_015(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
 						v_ae1.done;
 						
 						 
@@ -12515,7 +13896,7 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_SUB_NEC() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_SUB_NEC() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var EventCat v_eventCat:= {alt_1:= 300};
 						var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
@@ -12523,7 +13904,7 @@ module OneM2M_Testcases_CSE {
 						var PrimitiveContent v_primitiveContentRetrieveResource;
 						
 						v_updateRequest.primitiveContent.subscription.notificationEventCat:=v_eventCat;
-						v_ae1.start(f_CSE_DMR_UPD_017(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
+						v_ae1.start(f_CSE_DMR_UPD_015(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
 						v_ae1.done;
 						
 						 
@@ -12548,7 +13929,7 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_GRP_LBL() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_GRP_LBL() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var Labels v_labels := {"MyLabel"};
 						var template RequestPrimitive v_updateRequest := m_updateGroupBase;
@@ -12556,7 +13937,7 @@ module OneM2M_Testcases_CSE {
 						var PrimitiveContent v_primitiveContentRetrieveResource;
 						
 						v_updateRequest.primitiveContent.group_.labels := v_labels;
-						v_ae1.start(f_CSE_DMR_UPD_017(int9, m_createGroupBase, v_updateRequest));//Group
+						v_ae1.start(f_CSE_DMR_UPD_015(int9, m_createGroupBase, v_updateRequest));//Group
 						v_ae1.done;
 						
 						 
@@ -12581,14 +13962,14 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_GRP_ACPI() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_GRP_ACPI() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var template RequestPrimitive v_updateRequest := m_updateGroupBase;
 						var RequestPrimitive v_updateRequestPrimitive;
 						var ResponsePrimitive v_responsePrimitive;
 						var PrimitiveContent v_primitiveContentRetrieveResource;
 						
-						v_ae1.start(f_CSE_DMR_UPD_017(int9, m_createGroupBase, v_updateRequest, true));//Group
+						v_ae1.start(f_CSE_DMR_UPD_015(int9, m_createGroupBase, v_updateRequest, true));//Group
 						v_ae1.done;
 						
 						 
@@ -12615,7 +13996,7 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_GRP_MACP() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_GRP_MACP() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var ListOfURIs v_membersAccessControlPolicyIDs := {"NotInitialized"};
 						var template RequestPrimitive v_updateRequest := m_updateGroupBase;
@@ -12623,7 +14004,7 @@ module OneM2M_Testcases_CSE {
 						var PrimitiveContent v_primitiveContentRetrieveResource;
 						
 						v_updateRequest.primitiveContent.group_.membersAccessControlPolicyIDs := v_membersAccessControlPolicyIDs;
-						v_ae1.start(f_CSE_DMR_UPD_017(int9, m_createGroupBase, v_updateRequest));//Group
+						v_ae1.start(f_CSE_DMR_UPD_015(int9, m_createGroupBase, v_updateRequest));//Group
 						v_ae1.done;
 						
 						 
@@ -12648,7 +14029,7 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					testcase TC_CSE_DMR_UPD_017_GRP_GN() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_015_GRP_GN() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var XSD.String v_groupName:="MyGroupName";
 						var template RequestPrimitive v_updateRequest := m_updateGroupBase;
@@ -12656,7 +14037,7 @@ module OneM2M_Testcases_CSE {
 						var PrimitiveContent v_primitiveContentRetrieveResource;
 						
 						v_updateRequest.primitiveContent.group_.groupName := v_groupName;
-						v_ae1.start(f_CSE_DMR_UPD_017(int9, m_createGroupBase, v_updateRequest));//Group
+						v_ae1.start(f_CSE_DMR_UPD_015(int9, m_createGroupBase, v_updateRequest));//Group
 						v_ae1.done;
 						
 						 
@@ -12681,7 +14062,7 @@ module OneM2M_Testcases_CSE {
 						 }
 					}
 					
-					function f_CSE_DMR_UPD_017(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, boolean p_secondAcp := false) runs on AeSimu {
+					function f_CSE_DMR_UPD_015(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, boolean p_secondAcp := false) runs on AeSimu {
 						//Local variables
 						var MsgIn v_response;
 						var AcpType v_acpi;
@@ -12764,16 +14145,16 @@ module OneM2M_Testcases_CSE {
 						// Tear down
 						f_cf02Down();
 					  
-					} // end function f_CSE_DMR_UPD_017
+					} // end function f_CSE_DMR_UPD_015
 			  		
 				} // end group g_CSE_DMR_UPD_017
 			  	
-				group g_CSE_DMR_UPD_018 {
+				group g_CSE_DMR_UPD_016 {
 			  		
 					/**
 					 * @desc Check that the IUT updates successfully the value of the attribute MANDATORY_ATTRIBUTE of the RESOURCE_TYPE resource under CSEBase
 					*/
-					testcase TC_CSE_DMR_UPD_018_CSR_ET() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_016_CSR_ET() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var Timestamp v_expirationTime := "20001231T012345";
 						var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;
@@ -12782,7 +14163,7 @@ module OneM2M_Testcases_CSE {
 						
 						v_updateRequest.primitiveContent.remoteCSE.expirationTime := v_expirationTime;
 						
-						v_ae1.start(f_CSE_DMR_UPD_018(int16, m_createRemoteCSEBase, v_updateRequest));//Remote CSE
+						v_ae1.start(f_CSE_DMR_UPD_016(int16, m_createRemoteCSEBase, v_updateRequest));//Remote CSE
 						v_ae1.done;
 						
 						 
@@ -12807,7 +14188,7 @@ module OneM2M_Testcases_CSE {
 						}
 					}
 					
-					testcase TC_CSE_DMR_UPD_018_CSR_RR() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_016_CSR_RR() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var XSD.Boolean v_requestReachability := true;
 						var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;
@@ -12819,7 +14200,7 @@ module OneM2M_Testcases_CSE {
 						
 						 
 						
-						v_ae1.start(f_CSE_DMR_UPD_018(int16, m_createRemoteCSEBase, v_updateRequest));//Remote CSE
+						v_ae1.start(f_CSE_DMR_UPD_016(int16, m_createRemoteCSEBase, v_updateRequest));//Remote CSE
 						if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
 							//Check attribute 1
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
@@ -12840,7 +14221,7 @@ module OneM2M_Testcases_CSE {
 						}
 					}
 			  		
-					testcase TC_CSE_DMR_UPD_018_NOD_ET() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_016_NOD_ET() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var Timestamp v_expirationTime := "20001231T012345";
 						var template RequestPrimitive v_updateRequest := m_updateNodeBase;
@@ -12849,7 +14230,7 @@ module OneM2M_Testcases_CSE {
 						
 						v_updateRequest.primitiveContent.node.expirationTime := v_expirationTime;
 						
-						v_ae1.start(f_CSE_DMR_UPD_018(int9, m_createNodeBase, v_updateRequest));//Node
+						v_ae1.start(f_CSE_DMR_UPD_016(int9, m_createNodeBase, v_updateRequest));//Node
 						v_ae1.done;
 						
 						 
@@ -12874,7 +14255,7 @@ module OneM2M_Testcases_CSE {
 						}
 					}
 					
-					testcase TC_CSE_DMR_UPD_018_NOD_NI() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_016_NOD_NI() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var template RequestPrimitive v_updateRequest := m_updateNodeBase;
 						var XSD.Token v_targetId := "TARGET-ID";
@@ -12883,7 +14264,7 @@ module OneM2M_Testcases_CSE {
 						
 						v_updateRequest.primitiveContent.node.nodeID := v_targetId;
 						
-						v_ae1.start(f_CSE_DMR_UPD_018(int9, m_createNodeBase, v_updateRequest));//Node
+						v_ae1.start(f_CSE_DMR_UPD_016(int9, m_createNodeBase, v_updateRequest));//Node
 						v_ae1.done;
 						
 						 
@@ -12908,7 +14289,7 @@ module OneM2M_Testcases_CSE {
 						}
 					}
 					
-					testcase TC_CSE_DMR_UPD_018_AE_ET() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_016_AE_ET() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var Timestamp v_expirationTime := "20001231T012345";
 						var template RequestPrimitive v_updateRequest := m_updateAE;
@@ -12917,7 +14298,7 @@ module OneM2M_Testcases_CSE {
 						
 						v_updateRequest.primitiveContent.aE.expirationTime := v_expirationTime;
 						
-						v_ae1.start(f_CSE_DMR_UPD_018(int2, m_createAe(PX_APP_ID), v_updateRequest));//AE
+						v_ae1.start(f_CSE_DMR_UPD_016(int2, m_createAe(PX_APP_ID), v_updateRequest));//AE
 						v_ae1.done;
 						
 						 
@@ -12942,7 +14323,7 @@ module OneM2M_Testcases_CSE {
 						}
 					}
 					
-					testcase TC_CSE_DMR_UPD_018_AE_RR() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_016_AE_RR() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var XSD.Boolean v_requestReachability := true;
 						var template RequestPrimitive v_updateRequest := m_updateAE;
@@ -12951,7 +14332,7 @@ module OneM2M_Testcases_CSE {
 
 						v_updateRequest.primitiveContent.aE.requestReachability := v_requestReachability;
 
-						v_ae1.start(f_CSE_DMR_UPD_018(int2, m_createAe(PX_APP_ID), v_updateRequest));//AE
+						v_ae1.start(f_CSE_DMR_UPD_016(int2, m_createAe(PX_APP_ID), v_updateRequest));//AE
 						v_ae1.done;
 						
 						 
@@ -12976,7 +14357,7 @@ module OneM2M_Testcases_CSE {
 						}
 					}
 					
-					testcase TC_CSE_DMR_UPD_018_CNT_ET() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_016_CNT_ET() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var Timestamp v_expirationTime := "20001231T012345";
 						var template RequestPrimitive v_updateRequest := m_updateContainerBase;
@@ -12985,7 +14366,7 @@ module OneM2M_Testcases_CSE {
 						
 						v_updateRequest.primitiveContent.container.expirationTime := v_expirationTime;
 						
-						v_ae1.start(f_CSE_DMR_UPD_018(int3, m_createContainerBase, v_updateRequest));//Container
+						v_ae1.start(f_CSE_DMR_UPD_016(int3, m_createContainerBase, v_updateRequest));//Container
 						v_ae1.done;
 						
 						 
@@ -13010,7 +14391,7 @@ module OneM2M_Testcases_CSE {
 						}
 					}
 					
-					testcase TC_CSE_DMR_UPD_018_ACP_ET() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_016_ACP_ET() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var Timestamp v_expirationTime := "20001231T012345";
 						var template RequestPrimitive v_updateRequest := m_updateAcpBase;
@@ -13019,7 +14400,7 @@ module OneM2M_Testcases_CSE {
 						
 						v_updateRequest.primitiveContent.accessControlPolicy.expirationTime := v_expirationTime;
 						
-						v_ae1.start(f_CSE_DMR_UPD_018(int1, m_createAcpBase, v_updateRequest));//AccessControlPolicy
+						v_ae1.start(f_CSE_DMR_UPD_016(int1, m_createAcpBase, v_updateRequest));//AccessControlPolicy
 						v_ae1.done;
 						
 						 
@@ -13044,7 +14425,7 @@ module OneM2M_Testcases_CSE {
 						}
 					}
 					
-					testcase TC_CSE_DMR_UPD_018_ACP_PV() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_016_ACP_PV() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var SetOfAcrs v_privileges_1 := {{valueof(m_createAcr({PX_SUPER_AE_ID}, int61))}};
 						var template RequestPrimitive v_updateRequest := m_updateAcpBase;
@@ -13052,7 +14433,7 @@ module OneM2M_Testcases_CSE {
 						var PrimitiveContent v_primitiveContentRetrieveResource;
 						
 						v_updateRequest.primitiveContent.accessControlPolicy.privileges := v_privileges_1;
-						v_ae1.start(f_CSE_DMR_UPD_018(int1, m_createAcpBase, v_updateRequest));//AccessControlPolicy
+						v_ae1.start(f_CSE_DMR_UPD_016(int1, m_createAcpBase, v_updateRequest));//AccessControlPolicy
 						v_ae1.done;
 						
 						 
@@ -13077,7 +14458,7 @@ module OneM2M_Testcases_CSE {
 						}
 					}
 					
-					testcase TC_CSE_DMR_UPD_018_ACP_PVS() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_016_ACP_PVS() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var SetOfAcrs v_privileges_1 := {{valueof(m_createAcr({PX_SUPER_AE_ID}, int61))}};
 						var template RequestPrimitive v_updateRequest := m_updateAcpBase;
@@ -13085,7 +14466,7 @@ module OneM2M_Testcases_CSE {
 						var PrimitiveContent v_primitiveContentRetrieveResource;
 						
 						v_updateRequest.primitiveContent.accessControlPolicy.selfPrivileges := v_privileges_1;
-						v_ae1.start(f_CSE_DMR_UPD_018(int1, m_createAcpBase, v_updateRequest));//AccessControlPolicy
+						v_ae1.start(f_CSE_DMR_UPD_016(int1, m_createAcpBase, v_updateRequest));//AccessControlPolicy
 						v_ae1.done;
 						
 						 
@@ -13110,7 +14491,7 @@ module OneM2M_Testcases_CSE {
 						}
 					}
 				    
-					testcase TC_CSE_DMR_UPD_018_SUB_ET() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_016_SUB_ET() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var Timestamp v_expirationTime := "20001231T012345";
 						var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
@@ -13119,7 +14500,7 @@ module OneM2M_Testcases_CSE {
 						
 						v_updateRequest.primitiveContent.subscription.expirationTime := v_expirationTime;
 						
-						v_ae1.start(f_CSE_DMR_UPD_018(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
+						v_ae1.start(f_CSE_DMR_UPD_016(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
 						v_ae1.done;
 						
 						 
@@ -13145,7 +14526,7 @@ module OneM2M_Testcases_CSE {
 						}
 					}
 					
-					testcase TC_CSE_DMR_UPD_018_SUB_NU() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_016_SUB_NU() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var ListOfURIs v_notificationURI := {"NotReachableNotificationURI"};
 						var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
@@ -13154,7 +14535,7 @@ module OneM2M_Testcases_CSE {
 											
 						v_updateRequest.primitiveContent.subscription.notificationURI := v_notificationURI;
 						
-						v_ae1.start(f_CSE_DMR_UPD_018(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
+						v_ae1.start(f_CSE_DMR_UPD_016(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
 						v_ae1.done;
 						
 						 
@@ -13179,7 +14560,7 @@ module OneM2M_Testcases_CSE {
 						}
 					}
 					
-					testcase TC_CSE_DMR_UPD_018_SUB_NCT() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_016_SUB_NCT() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var NotificationContentType v_notificationContentType := int2;
 						var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
@@ -13188,7 +14569,7 @@ module OneM2M_Testcases_CSE {
 						
 						v_updateRequest.primitiveContent.subscription.notificationContentType := v_notificationContentType;
 						
-						v_ae1.start(f_CSE_DMR_UPD_018(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
+						v_ae1.start(f_CSE_DMR_UPD_016(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
 						v_ae1.done;
 						
 						 
@@ -13213,7 +14594,7 @@ module OneM2M_Testcases_CSE {
 						}
 					}
 					
-					testcase TC_CSE_DMR_UPD_018_GRP_ET() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_016_GRP_ET() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var Timestamp v_expirationTime := "20001231T012345";
 						var template RequestPrimitive v_updateRequest := m_updateGroupBase;
@@ -13222,7 +14603,7 @@ module OneM2M_Testcases_CSE {
 						
 						v_updateRequest.primitiveContent.group_.expirationTime := v_expirationTime;
 						
-						v_ae1.start(f_CSE_DMR_UPD_018(int9, m_createGroupBase, v_updateRequest));//Group
+						v_ae1.start(f_CSE_DMR_UPD_016(int9, m_createGroupBase, v_updateRequest));//Group
 						v_ae1.done;
 						
 						 
@@ -13247,7 +14628,7 @@ module OneM2M_Testcases_CSE {
 						}
 					}
 					
-					testcase TC_CSE_DMR_UPD_018_GRP_MNM() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_016_GRP_MNM() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var XSD.PositiveInteger v_maxNrOfMembers := 10;
 						var template RequestPrimitive v_updateRequest := m_updateGroupBase;
@@ -13256,7 +14637,7 @@ module OneM2M_Testcases_CSE {
 						
 						v_updateRequest.primitiveContent.group_.maxNrOfMembers := v_maxNrOfMembers;
 						
-						v_ae1.start(f_CSE_DMR_UPD_018(int9, m_createGroupBase, v_updateRequest));//Group
+						v_ae1.start(f_CSE_DMR_UPD_016(int9, m_createGroupBase, v_updateRequest));//Group
 						v_ae1.done;
 						
 						 
@@ -13281,7 +14662,7 @@ module OneM2M_Testcases_CSE {
 						}
 					}
 					
-					testcase TC_CSE_DMR_UPD_018_GRP_MID() runs on Tester system CseSystem {
+					testcase TC_CSE_DMR_UPD_016_GRP_MID() runs on Tester system CseSystem {
 						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
 						var ListOfURIs v_memberIDs := {"NotInitialized"};
 						var template RequestPrimitive v_updateRequest := m_updateGroupBase;
@@ -13290,7 +14671,7 @@ module OneM2M_Testcases_CSE {
 						
 						v_updateRequest.primitiveContent.group_.memberIDs := v_memberIDs;
 						
-						v_ae1.start(f_CSE_DMR_UPD_018(int9, m_createGroupBase, v_updateRequest));//Group
+						v_ae1.start(f_CSE_DMR_UPD_016(int9, m_createGroupBase, v_updateRequest));//Group
 						v_ae1.done;
 						
 						 
@@ -13315,7 +14696,7 @@ module OneM2M_Testcases_CSE {
 						}
 					}
 					
-					function f_CSE_DMR_UPD_018(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu {
+					function f_CSE_DMR_UPD_016(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu {
 						 //Local variables
 						 var MsgIn v_response;
 						 var RequestPrimitive v_request;
@@ -13388,9 +14769,9 @@ module OneM2M_Testcases_CSE {
 						// Tear down
 						f_cf02Down();
 						
-					} //end function f_CSE_DMR_UPD_018
+					} //end function f_CSE_DMR_UPD_016
 			  	
-				} // end group g_CSE_DMR_UPD_018
+				} // end group g_CSE_DMR_UPD_016
 
 			}//end group Update
 			
@@ -13519,10 +14900,10 @@ module OneM2M_Testcases_CSE {
 						f_checkAeSimuStatus();
     								
 						//Check to see if the resource is present or not
-						if (f_isResourcePresent(v_resourceIndex)){
-							setverdict(fail, __SCOPE__ & ":INFO: Resource not deleted");
+						if (f_isResourceNotPresent(v_aeIndex, f_getResourceName(vc_resourcesList[v_resourceIndex].resource))){
+							setverdict(pass, __SCOPE__ & ":INFO: Resource deleted");
 						} else {
-							setverdict(pass, __SCOPE__ & ":ERROR: Resource deleted");
+							setverdict(fail, __SCOPE__ & ":ERROR: Resource not deleted");
 						}
                 					
 						// Postamble