diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn
index b1821388ec93c4867fbd70f791fe3940d1dbb57d..eb65a75716f892b7c04ae09c572a0d215fb4c892 100644
--- a/LibOneM2M/OneM2M_Functions.ttcn
+++ b/LibOneM2M/OneM2M_Functions.ttcn
@@ -7,7 +7,7 @@
  *  
  *  @author     ETSI
  *  @version    $URL: https://forge.etsi.org/svn/oneM2M/branches/Release1/ttcn/LibOneM2M/OneM2M_Functions.ttcn $
- *              $Id: OneM2M_Functions.ttcn 173 2016-11-22 08:10:48Z reinaortega $
+ *              $Id: OneM2M_Functions.ttcn 175 2016-11-22 12:39:39Z reinaortega $
  *  @desc       Module containing functions for oneM2M
  *
  */
@@ -20,14 +20,15 @@ module OneM2M_Functions {
 	import from OneM2M_TypesAndValues all;
 	import from OneM2M_TestSystem all;
 	import from OneM2M_Pixits all;
+	import from OneM2M_Pics all;
 //	import from OneM2M_AdditionalTypes all;
 	
 	
 	group configFunctions {
-    	/**
-    		@desc Ports mapping and default behaviour activation for Config 1
-    	*/
-    	function f_cf01Up() runs on CseTester {
+		/**
+			@desc Ports mapping and default behaviour activation for Config 1
+		*/
+		function f_cf01Up() runs on CseTester {
     			
 			// Variables
     			
@@ -60,6 +61,22 @@ module OneM2M_Functions {
     						
 		} // end f_cf02Up
 		
+		function f_cf03Up() runs on CseTester {
+		
+			// Variables
+		
+			// Map
+			map(self:mcaPort, system:mcaPort);
+			map(self:acPort, system:acPort);
+			activate(a_default());
+			activate(a_cse_cf01());
+		
+			// Connect
+					
+			//Initialze the IUT
+					
+		} // end f_cf03Up
+		
 		/**
 		 * @desc Ports unmapping
 		 * @verdict 
@@ -83,139 +100,216 @@ module OneM2M_Functions {
 	
 	group cseFunctions {
 	
-    	group preambleFunctions {
+		group preambleFunctions {
+
+			/**
+			 * @desc Creation of auxiliar resources ACP for correct execution of the test case
+			 * @param p_allowedOperations Allowed operations for the auxiliar AE resource
+			 * @return Internal ACP resource index
+			 * @verdict 
+			 */
+			function f_cse_preamble_createAcpAux(in template (value) XSD.String p_acpName := c_acpAuxName, in template (value) AccessControlOperations p_allowedOperations := int63) runs on CseTester return integer {//c_CRUDNDi
+    		
+				return f_cse_createAccessControlPolicyAux(p_acpName, p_allowedOperations);
+    		
+			}
+
     
-    		/**
-    		 * @desc Creation of auxiliar resources ACP and AE for correct execution of the test case
-    		 * @param p_allowedOperations Allowed operations for the auxiliar AE resource
-    		 * @return Internal AE resource index
-    		 * @verdict 
-    		 */
-    		function f_cse_preamble_registerAe(in template (value) AccessControlOperations p_allowedOperations := int63) runs on CseTester return integer {//c_CRUDNDi
-    		
-    			var RequestPrimitive v_request;
-    			var MsgIn v_response;
-    			var integer v_aeAuxIndex := -1;
-    			var integer v_acpAuxIndex := -1;
-    		
-    			if(PX_ACP_SUPPORT){
-    				v_acpAuxIndex := f_cse_createAccessControlPolicyAux(p_allowedOperations := p_allowedOperations);
-    				vc_acpAuxIndex := v_acpAuxIndex;
-    			}
-    			
-    			if(v_acpAuxIndex != -1) {
-    				vc_resourcesIndexToBeDeleted := {v_acpAuxIndex};
-    				v_request := valueof(m_createAeAux(p_accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}));
+			/**
+			 * @desc Creation of auxiliar resources ACP and AE for correct execution of the test case
+			 * @param p_allowedOperations Allowed operations for the auxiliar AE resource
+			 * @return Internal AE resource index
+			 * @verdict 
+			 */
+			function f_cse_preamble_registerAe(template (omit) AcpType p_accessControlPolicyIDs := omit, in template (omit) PoaList p_poaList := omit) runs on CseTester return integer {//c_CRUDNDi
+    		
+				var RequestPrimitive v_request;
+				var MsgIn v_response;
+				var integer v_aeAuxIndex := -1;
+    			    			
+				v_request := valueof(m_createAeAux(p_accessControlPolicyIDs, p_poaList));
+				v_request.to_ := f_getResourceAddress();
+				
+				mcaPort.send(m_request(v_request));
+    			
+				tc_ac.start;
+				alt {
+					[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+						tc_ac.stop;
+						log("Preamble: Application registered successfuly");
+						if(ischosen(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AE_optional)) {
+							vc_aeAux := v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AE_optional;
+    						
+							v_aeAuxIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent);
+							vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_aeAuxIndex};
+    						
+							if(ispresent(vc_aeAux.aE_ID)){
+								f_sendAcPrimitive("AE-ID_changed", oct2char(unichar2oct(vc_aeAux.aE_ID)));
+							} else {
+								f_sendAcPrimitive("AE-ID_changed", "0");
+							}	
+						};
+					}
+					[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+						tc_ac.stop;
+						setverdict(inconc, "Preamble: Error while registering application");
+						stop;
+					}
+					[] mcaPort.receive {
+						tc_ac.stop;
+						setverdict(inconc, "Preamble: Unexpected message received");
+						stop;
+					}
+					[] tc_ac.timeout {
+						setverdict(inconc, "Preamble: No answer while registering resource");
+						stop;
+					}
+				}	
+    			
+				return v_aeAuxIndex;
+    		
+			}
+    		
+			/**
+			 * @desc Creation of auxiliar resources ACP and AE for correct execution of the test case
+			 * @param p_allowedOperations Allowed operations for the auxiliar AE resource
+			 * @return Internal AE resource index
+			 * @verdict 
+			 */
+			function f_cse_preamble_registerAeWithId(XSD.ID p_appId, in template (value) AccessControlOperations p_allowedOperations := int63) runs on CseTester return integer {//c_CRUDNDi
+    		
+				var RequestPrimitive v_request;
+				var MsgIn v_response;
+				var integer v_aeAuxIndex := -1;
+				var integer v_acpAuxIndex := -1;
+    		
+				if(PICS_ACP_SUPPORT){
+					v_acpAuxIndex := f_cse_createAccessControlPolicyAux(p_allowedOperations := p_allowedOperations);
+					vc_acpAuxIndex := v_acpAuxIndex;
+				}
+    			
+				if(v_acpAuxIndex != -1) {
+					vc_resourcesIndexToBeDeleted := {v_acpAuxIndex};
+					v_request := valueof(m_createAe(p_appId, {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -));
     				
-    				//TODO Test, to be removed
-    				v_request.to_ := f_addPrefix(f_getResourceAddress());
+					//TODO Test, to be removed
+					v_request.to_ := f_getResourceAddress();
     				
-    				mcaPort.send(m_request(v_request));
-    				//mcaPort.send(m_request(m_createAeAux(p_name, {PX_URI_CSE & PX_CSE_NAME & "/" & PX_ACPAUX_NAME})));
-    			} else {
-    				mcaPort.send(m_request(m_createAeAux()));
-    			}
-    			tc_ac.start;
-    			alt {
-    				[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
-    					tc_ac.stop;
-    					log("Preamble: Application registered successfuly");
-    					if(ischosen(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AE_optional)) {
-    						vc_aeAux := v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AE_optional;
+					mcaPort.send(m_request(v_request));
+					//mcaPort.send(m_request(m_createAeAux(p_name, {PX_URI_CSE & PX_CSE_NAME & "/" & PX_ACPAUX_NAME})));
+				} else {
+					mcaPort.send(m_request(m_createAe(p_appId)));
+				}
+				tc_ac.start;
+				alt {
+					[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+						tc_ac.stop;
+						log("Preamble: Application registered successfuly");
+						if(ischosen(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AE_optional)) {
+							vc_aeAux := v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AE_optional;
     						
-    						v_aeAuxIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent);
-    						vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_aeAuxIndex};
+							v_aeAuxIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent);
+							vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_aeAuxIndex};
     						
-    						if(ispresent(vc_aeAux.aE_ID)){
-    							f_sendAcPrimitive("AE-ID_changed", oct2char(unichar2oct(vc_aeAux.aE_ID)));
-    						} else {
-    							f_sendAcPrimitive("AE-ID_changed", "0");
-    						}	
-    					}
-    				}
-    				[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
-    					tc_ac.stop;
-    					setverdict(inconc, "Preamble: Error while registering application");
-    					stop;
-    				}
-    				[] mcaPort.receive {
-    					tc_ac.stop;
-    					setverdict(inconc, "Preamble: Unexpected message received");
-    					stop;
-    				}
-    				[] tc_ac.timeout {
-    					setverdict(inconc, "Preamble: No answer while registering resource");
-    					stop;
-    				}
-    			}	
-    			
-    			return v_aeAuxIndex;
-    		
-    		}
-    		
-    		//Added by @Naum
-    		function f_cse_preamble_createServiceSubscribedAppRule(in template ListOfM2MID p_allowedAEs, in template (value) AccessControlOperations p_allowedOperations := int63) runs on CseTester return integer {//c_CRUDNDi
-    		
-    			var MsgIn v_response;
-    			var integer v_serviceSubscribedAppRuleIndex := -1;
-    			var RequestPrimitive v_request;
+							if(ispresent(vc_aeAux.aE_ID)){
+								f_sendAcPrimitive("AE-ID_changed", oct2char(unichar2oct(vc_aeAux.aE_ID)));
+							} else {
+								f_sendAcPrimitive("AE-ID_changed", "0");
+							}	
+						}
+					}
+					[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+						tc_ac.stop;
+						setverdict(inconc, "Preamble: Error while registering application");
+						stop;
+					}
+					[] mcaPort.receive {
+						tc_ac.stop;
+						setverdict(inconc, "Preamble: Unexpected message received");
+						stop;
+					}
+					[] tc_ac.timeout {
+						setverdict(inconc, "Preamble: No answer while registering resource");
+						stop;
+					}
+				}	
+    			
+				return v_aeAuxIndex;
+    		
+			}
+    		
+			//Added by @Naum
+			function f_cse_preamble_createServiceSubscribedAppRule(in template ListOfM2MID p_allowedAEs := {""}, in template (value) AccessControlOperations p_allowedOperations := int63) runs on CseTester return integer {//c_CRUDNDi
+    		
+				var MsgIn v_response;
+				var integer v_serviceSubscribedAppRuleIndex := -1;
+				var RequestPrimitive v_request;
     
-    			v_serviceSubscribedAppRuleIndex := f_cse_createResource(int19, m_createServiceSubscribedAppRule({"None"}, {PX_APP_ID}, valueof(p_allowedAEs)));
+				v_serviceSubscribedAppRuleIndex := f_cse_createResource(int19, m_createServiceSubscribedAppRule({"None"}, {PX_APP_ID}, valueof(p_allowedAEs)));
     			
-    			return v_serviceSubscribedAppRuleIndex;
+				return v_serviceSubscribedAppRuleIndex;
+    		
+			}
     		
-    		}
+			function f_cse_preamble_subscriptionVerification(out CseTester p_notifyHandler,in integer p_aeIndex, inout integer p_ae2Index, inout template RequestPrimitive p_createRequestPrimitive,in ResourceType p_resourceType ) runs on CseTester {
+				if(p_resourceType == int23){
+					p_notifyHandler := CseTester.create("NotifyHandler") alive;
+					p_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE_ID_STEM, "MyAe2", {"http://" & PX_TESTER_ADDRESS & "/"}), -1); // AE2 is registred
+					if(ischosen(p_createRequestPrimitive.primitiveContent.any_1[0].Subscription_optional)){		//this condition is necessary for Subscription TCs where notification URI is set in m_createSubscriptionAdvanced
+						p_createRequestPrimitive.primitiveContent.any_1[0].Subscription_optional.notificationURI := {f_getResourceAddress(p_ae2Index)}; 
+					}
+					p_notifyHandler.start(f_subscriptionVerificationHandler(f_getResourceAddress(p_aeIndex)));
+				}
+			}
     	
-    	}//end group preambleFunctions
+		}//end group preambleFunctions
     	
-    	group postambleFunctions {
+		group postambleFunctions {
     
-    		/**
-    		 * @desc Deletion of all resources created during the test case execution. IUT gets clean and ready for next execution
-    		 * @verdict 
-    		 */
-    		function f_cse_postamble_deleteResources() runs on CseTester {
-    			var integer i;
-    			var XSD.ID v_resourceAddress;
-    			var MsgIn v_response;
-    			var RequestPrimitive v_request;
-    			
-    			if (PX_RUN_POSTAMBLE) {
+			/**
+			 * @desc Deletion of all resources created during the test case execution. IUT gets clean and ready for next execution
+			 * @verdict 
+			 */
+			function f_cse_postamble_deleteResources() runs on CseTester {
+				var integer i;
+				var XSD.ID v_resourceAddress;
+				var MsgIn v_response;
+				var RequestPrimitive v_request;
+    			
+				if (PX_RUN_POSTAMBLE) {
     				
-    				for(i := 0; i < lengthof(vc_resourcesIndexToBeDeleted); i := i + 1) {
-    					
-    					v_resourceAddress := f_getResourceAddress(lengthof(vc_resourcesIndexToBeDeleted)-1 - i);
+					for(i := lengthof(vc_resourcesIndexToBeDeleted) -1; i >=0; i := i - 1) {
+						
+						v_resourceAddress := f_getResourceAddress(vc_resourcesIndexToBeDeleted[i]); 
+						
+						v_request := valueof(m_deleteRequest(v_resourceAddress));
     					
-    					v_request := valueof(m_deleteRequest(v_resourceAddress));
+						if(PX_FROM_IS_AE_ID){
+							if(ischosen(vc_resourcesList[vc_resourcesIndexToBeDeleted[i]].resource.any_1[0].AE_optional)) {	
+								v_request.from_ := vc_resourcesList[vc_resourcesIndexToBeDeleted[i]].resource.any_1[0].AE_optional.aE_ID;
+							}
+						}
+						mcaPort.send(m_request(v_request));
     					
-    					if(PX_FROM_IS_AE_ID){
-    						if(ischosen(vc_resourcesList[i].resource.any_1[0].AccessControlPolicy_optional)) {
-    							v_request.from_ := PX_AE_ID_STEM;
-    						} else {
-    							v_request.from_ := vc_aeAux.aE_ID;
-    						}
-    					}
-    					mcaPort.send(m_request(v_request));
-    					
-    					tc_ac.start;
-    					alt {
-    						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
-    							tc_ac.stop;
-    							log("Postamble: AE Resource deleted");
-    						}
-    						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
-    							tc_ac.stop;
-    							log("Postamble: Error while deleting resource");
-    						}
-    						[] tc_ac.timeout {
-    							log("Postamble: No answer while deleting resource");
-    						}	
-    					}	
-    				}
-    			}
+						tc_ac.start;
+						alt {
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
+								tc_ac.stop;
+								log("Postamble: AE Resource deleted");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+								tc_ac.stop;
+								log("Postamble: Error while deleting resource");
+							}
+							[] tc_ac.timeout {
+								log("Postamble: No answer while deleting resource");
+							}	
+						}	
+					}
+				}
     						
-    			f_cse_postamble_default();
-    		}
+				f_cse_postamble_default();
+			}
     		
 			/**
 			 * @desc Default postamble
@@ -223,159 +317,336 @@ module OneM2M_Functions {
 			 */
 			function f_cse_postamble_default() runs on CseTester {
 			}
+			
+			function f_is_component_done(in CseTester p_notifyHandler) runs on CseTester {
+    		
+				tc_ac.start(10.0);
+				alt {
+					[] p_notifyHandler.done {
+					tc_ac.stop;
+					}
+					[] tc_ac.timeout {
+						setverdict(inconc, testcasename() & ": Notify verification not received");
+					}
+				}
+			} //end f_is_component_done
     		
     		
-    	}//end group postambleFunctions
+		}//end group postambleFunctions
     	
-    	group helpingFunctions {
+		group helpingFunctions {
     
-    		/**
-    		 * @desc Creation of a resource
-    		 * @param p_resourceType Resource type of the resource to be created
-    		 * @param p_requestPrimitive Template request primitive
-    		 * @param p_parentIndex Internal resource index which indicates the parent of the resource to be created
-    		 * @return Internal resource index of the created resource
-    		 * @verdict 
-    		 */
-    		function f_cse_createResource(in ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, integer p_parentIndex := -1) runs on CseTester return integer {
-    		
-    			var MsgIn v_response;
-    			var RequestPrimitive v_request;
-    			var XSD.ID v_resourceId;
-    			var integer v_resourceIndex := -1;
-    			
-    			v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, p_parentIndex);
-    		
-    			mcaPort.send(m_request(v_request));
-    			tc_ac.start;
-    			alt {
-    				[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
-    					tc_ac.stop;
-    					setverdict(pass, "f_createResource: Resource type " & int2str(enum2int(p_resourceType)) & " created successfuly");
-    					v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, p_parentIndex);
-    				}
-    				[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
-    					tc_ac.stop;
-    					setverdict(inconc, "f_createResource: Error while creating resource type " & int2str(enum2int(p_resourceType)));
-    				}
-    				[] mcaPort.receive {
-    					tc_ac.stop;
-    					setverdict(inconc, "f_createResource: Unexpected message received");
-    				}
-    				[] tc_ac.timeout {
-    					setverdict(inconc, "f_createResource: No answer while creating resource type " & int2str(enum2int(p_resourceType)));
-    				}
-    			}	
-    			
-    			return v_resourceIndex;
+			/**
+			 * @desc Creation of a resource
+			 * @param p_resourceType Resource type of the resource to be created
+			 * @param p_requestPrimitive Template request primitive
+			 * @param p_parentIndex Internal resource index which indicates the parent of the resource to be created
+			 * @return Internal resource index of the created resource
+			 * @verdict 
+			 */
+			function f_cse_createResource(in ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive := m_create, integer p_parentIndex := -1) runs on CseTester return integer {
+    		
+				var MsgIn v_response;
+				var RequestPrimitive v_request;
+				var XSD.ID v_resourceId;
+				var integer v_resourceIndex := -1;
+    			
+				v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, p_parentIndex);
+    		
+				mcaPort.send(m_request(v_request));
+				tc_ac.start;
+				alt {
+					[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+						tc_ac.stop;
+						setverdict(pass, "f_createResource: Resource type " & int2str(enum2int(p_resourceType)) & " created successfuly");
+						v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, p_parentIndex);
+						if(match(int2, p_resourceType) or match(-1, p_parentIndex)) {//If created resource is an AE or created under CSEBase, it needs to be added to the resourceToBeDeleted list
+							vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_resourceIndex};
+						}
+					}
+					[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+						tc_ac.stop;
+						setverdict(inconc, "f_createResource: Error while creating resource type " & int2str(enum2int(p_resourceType)));
+					}
+					[] mcaPort.receive {
+						tc_ac.stop;
+						setverdict(inconc, "f_createResource: Unexpected message received");
+					}
+					[] tc_ac.timeout {
+						setverdict(inconc, "f_createResource: No answer while creating resource type " & int2str(enum2int(p_resourceType)));
+					}
+				}	
+    			
+				return v_resourceIndex;
     	
-    		}
+			}
     	
-    		/**
-    		 * @desc Creation of the auxiliar ACP resource
-    		 * @param p_acpName ACP name
-    		 * @param p_allowedOperations Allowed operations
-    		 * @return Internal resource index of the created auxiliar ACP resource
-    		 * @verdict 
-    		 */
-    		function f_cse_createAccessControlPolicyAux(in template (value) XSD.String p_acpName := c_acpAuxName, in template (value) AccessControlOperations p_allowedOperations := int63) runs on CseTester return integer{
-    			var RequestPrimitive v_request;
-    			var MsgIn v_response;
-    			var integer v_acpAuxIndex := -1;
-    			
-    			v_request := valueof(m_createAcpAux(p_acpName := p_acpName, p_allowedOperations := p_allowedOperations));
-    			
-    			v_request.to_ := f_addPrefix(f_getResourceAddress());
-    			
-    			mcaPort.send(m_request(v_request));
-    			tc_ac.start;
-    			alt {
-    				[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
-    					tc_ac.stop;
-    					setverdict(pass, "f_createAccessControlPolicy: Resource type " & int2str(1) & " created successfuly");
-    					v_acpAuxIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent);
-    					vc_acpAux := v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional;//TODO To be removed
-    				}
-    				[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
-    					tc_ac.stop;
-    					setverdict(inconc, "f_createAccessControlPolicy: Error while creating resource type " & int2str(1));
-    				}
-    				[] mcaPort.receive {
-    					tc_ac.stop;
-    					setverdict(inconc, "f_createAccessControlPolicy: Unexpected message received");
-    				}
-    				[] tc_ac.timeout {
-    					setverdict(inconc, "f_createAccessControlPolicy: No answer while creating resource type " & int2str(1));
-    				}
-    			}	
-    		
-    			return v_acpAuxIndex;
+			/**
+			 * @desc Creation of the auxiliar ACP resource
+			 * @param p_acpName ACP name
+			 * @param p_allowedOperations Allowed operations
+			 * @return Internal resource index of the created auxiliar ACP resource
+			 * @verdict 
+			 */
+			function f_cse_createAccessControlPolicyAux(in template (value) XSD.String p_acpName := c_acpAuxName, in template (value) AccessControlOperations p_allowedOperations := int63) runs on CseTester return integer{
+				var RequestPrimitive v_request;
+				var MsgIn v_response;
+				var integer v_acpAuxIndex := -1;
+    			
+				v_request := valueof(m_createAcpAux(p_acpName := p_acpName, p_allowedOperations := p_allowedOperations));
+    			
+				v_request.to_ := f_getResourceAddress();
+    			
+				mcaPort.send(m_request(v_request));
+				tc_ac.start;
+				alt {
+					[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+						tc_ac.stop;
+						setverdict(pass, "f_createAccessControlPolicy: Resource type " & int2str(1) & " created successfuly");
+						v_acpAuxIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent);
+						vc_acpAuxIndex := v_acpAuxIndex;
+						vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_acpAuxIndex};
+					}
+					[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+						tc_ac.stop;
+						setverdict(inconc, "f_createAccessControlPolicy: Error while creating resource type " & int2str(1));
+					}
+					[] mcaPort.receive {
+						tc_ac.stop;
+						setverdict(inconc, "f_createAccessControlPolicy: Unexpected message received");
+					}
+					[] tc_ac.timeout {
+						setverdict(inconc, "f_createAccessControlPolicy: No answer while creating resource type " & int2str(1));
+					}
+				}	
+    		
+				return v_acpAuxIndex;
     
-    		}
+			}
     			
     			
-    		/**
-    		 * @desc Creation of the auxiliar Container resource
-    		 * @param p_parentIndex Internal resource index which indicates the parent of the Container resource to be created
-    		 * @return Internal resource index of the created Container resource
-    		 * @verdict 
-    		 */
-    		function f_cse_createContainerResourceAux (integer p_parentIndex := -1) runs on CseTester return integer {
+			/**
+			 * @desc Creation of the auxiliar Container resource
+			 * @param p_parentIndex Internal resource index which indicates the parent of the Container resource to be created
+			 * @return Internal resource index of the created Container resource
+			 * @verdict 
+			 */
+			function f_cse_createContainerResourceAux (integer p_parentIndex := -1) runs on CseTester return integer {
     		
-    			var MsgIn v_response;
-    			var RequestPrimitive v_request;
-    			var integer v_acpAuxIndex := -1;
-    			var integer v_containerResourceIndex := -1;
+				var MsgIn v_response;
+				var RequestPrimitive v_request;
+				var integer v_acpAuxIndex := -1;
+				var integer v_containerResourceIndex := -1;
     			
-    			v_acpAuxIndex := f_cse_createAccessControlPolicyAux(p_acpName := c_acpAuxName);//"MyAcp_2"
+				v_acpAuxIndex := f_cse_createAccessControlPolicyAux(p_acpName := c_acpAuxName);//"MyAcp_2"
     			
-    			v_request := valueof(m_createContainerBase);
-    			v_request.primitiveContent.any_1[0].Container_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)};
-    			v_request.primitiveContent.any_1[0].Container_optional.resourceName := "MyContainerAux";
+				v_request := valueof(m_createContainerBase);
+				v_request.primitiveContent.any_1[0].Container_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)};
+				v_request.primitiveContent.any_1[0].Container_optional.resourceName := "MyContainerAux";
     			
-    			v_containerResourceIndex := f_cse_createResource(int3, v_request, p_parentIndex);
+				v_containerResourceIndex := f_cse_createResource(int3, v_request, p_parentIndex);
     			
-    			return v_containerResourceIndex;		
+				return v_containerResourceIndex;		
     	
-    		}
-    		
-    		/**
-    		 * @desc Update of the auxiliar ACP resource
-    		 * @param p_allowedOperations New allowed operations
-    		 * @verdict 
-    		 */
-    		function f_cse_updateAcpAuxResource (in template (value) AccessControlOperations p_allowedOperations) runs on CseTester {
-    			var RequestPrimitive v_request;
-    			
-    			v_request := valueof(m_updateAcpBase);
-    			
-    			v_request.to_ := f_addPrefix(f_getResourceAddress(vc_acpAuxIndex));
-    			v_request.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges.accessControlRule_list := {
-    				{
-    					accessControlOriginators := PX_ACOR, //{"admin:admin"}
-    					accessControlOperations := valueof(p_allowedOperations),
-    					accessControlContexts_list := {}
-    				}
-    			};
+			}
+    		
+			/**
+			 * @desc 
+			 * @param p_requestPrimitive
+			 * @verdict 
+			 */
+			function f_cse_updateResource(in RequestPrimitive p_requestPrimitive) runs on CseTester {
+				var MsgIn v_response;
+
+				mcaPort.send(m_request(p_requestPrimitive));
+				tc_ac.start;
+				alt {
+					[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+						tc_ac.stop;
+						setverdict(pass, testcasename() & ": Attribute of resource updated successfuly");
+					}
+					[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+						tc_ac.stop;
+						setverdict(fail, testcasename() & ": Error while updating resource");
+					}
+					[] mcaPort.receive{
+						tc_ac.stop;
+						setverdict(fail, testcasename() & ": Error, unexpected message received");
+					}
+					[] tc_ac.timeout {
+						setverdict(inconc, testcasename() & ": No answer while updating resource");
+					}
+				}	
+			}// end f_cse_updateResource
+    		
+			/**
+			 * @desc Update of the auxiliar ACP resource
+			 * @param p_allowedOperations New allowed operations
+			 * @verdict 
+			 */
+			function f_cse_updateAcpAuxResource (in template (value) AccessControlOperations p_allowedOperations) runs on CseTester {
+				var RequestPrimitive v_request;
+    			
+				v_request := valueof(m_updateAcpBase);
+    			
+				v_request.to_ := f_getResourceAddress(vc_acpAuxIndex);
+				v_request.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges.accessControlRule_list := {
+					{
+						accessControlOriginators := PX_ACOR, //{"admin:admin"}
+						accessControlOperations := valueof(p_allowedOperations),
+						accessControlContexts_list := {}
+					}
+				};
     						
-    			mcaPort.send(m_request(v_request));
-    			tc_ac.start;
-    			alt {
-    				[] mcaPort.receive(mw_response(mw_responsePrimitiveOK))  {
-    					tc_ac.stop;
-    					setverdict(pass, "f_updateAcpAuxResource: " & v_request.to_ & " resource updated successfuly");
-    				}
-    				[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
-    					tc_ac.stop;
-    					setverdict(fail, "f_updateAcpAuxResource: Error while updating " & v_request.to_ & " resource");
-    				}
-    				[] tc_ac.timeout {
-    					setverdict(inconc, "f_updateAcpAuxResource: No answer while updating " & v_request.to_ & " resource" );
-    				}
-    			}		
-    		}   
+				mcaPort.send(m_request(v_request));
+				tc_ac.start;
+				alt {
+					[] mcaPort.receive(mw_response(mw_responsePrimitiveOK))  {
+						tc_ac.stop;
+						setverdict(pass, "f_updateAcpAuxResource: " & v_request.to_ & " resource updated successfuly");
+					}
+					[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+						tc_ac.stop;
+						setverdict(fail, "f_updateAcpAuxResource: Error while updating " & v_request.to_ & " resource");
+					}
+					[] tc_ac.timeout {
+						setverdict(inconc, "f_updateAcpAuxResource: No answer while updating " & v_request.to_ & " resource" );
+					}
+				}		
+			}   
+    		
+		function f_subscriptionVerificationHandler(in XSD.ID p_creator, in ResponseStatusCode v_responseStatusCode := int2001) runs on CseTester {
+			// Local variables
+			var MsgIn v_response;
+			var ResponsePrimitive v_responsePrimitive;
+			var template Notification v_notificationRequest := mw_contentNotificationBase;
+			var PrimitiveContent v_notificationResponse; // TODO Need to see if this parameter is required however there is a problem if it s omitted during the verification
+			
+			map(self:mcaPort, system:mcaPort);
+			map(self:acPort, system:acPort);
+
+			v_notificationResponse.any_1 := {{Notification := valueof(mw_contentNotificationAllOmit)}};
+	
+			v_notificationRequest.verificationRequest := true;
+			v_notificationRequest.creator := p_creator;
+			//v_notificationRequest.subscriptionReference := "I Don't know which URI is expected"; // TODO mandatory parameter 
+			v_responsePrimitive := valueof(m_responseNotification(v_responseStatusCode,v_notificationResponse));//TODO No PrimitiveContent is expected
+	
+			if(v_responseStatusCode != int2001){
+				v_responsePrimitive.primitiveContent := omit;
+			}
+	
+			tc_ac.start;
+			alt {
+				[] mcaPort.receive(mw_request(mw_notify(v_notificationRequest))) -> value v_response {
+					tc_ac.stop;
+					setverdict(pass, testcasename() & ": Notification received");
+					//mcaPort.send(m_response(p_responsePrimitive)); 						
+				}
+				[] mcaPort.receive(mw_request(mw_notify(mw_contentNotification(?)))) -> value v_response {
+					tc_ac.stop;
+					setverdict(fail, testcasename() & ": Notification received but verificationRequest isn't set to TRUE");							
+				}
+				[] mcaPort.receive{
+					tc_ac.stop;
+					setverdict(fail, testcasename() & ": Error, unexpected message received");
+				}
+				[] tc_ac.timeout {
+					setverdict(inconc, testcasename() & ":  No notification received");
+				}
+			}
+	
+			mcaPort.send(m_response(v_responsePrimitive));	// TODO have to be deleted
+
+			unmap(self:mcaPort, system:mcaPort);
+			unmap(self:acPort, system:acPort); 
+
+		} //end f_subscriptionVerificationHandler
+
+		function f_check_notificationContent(in RequestPrimitive p_requestPrimitive, template PrimitiveContent p_primitiveContent) runs on CseTester return boolean{
+			// Local variables
+			var boolean v_matchResult := false;
+			var integer i;
+			var integer v_numberOfAggregatedNotification;
+	
+			if (ischosen(p_primitiveContent.any_1[0].AE_optional)){
+				if(ischosen(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.resource)) {
+					v_matchResult := match(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.resource.AE_optional, p_primitiveContent.any_1[0].AE_optional)
+				}
+				else if(ischosen(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.responsePrimitive)) {
+					v_matchResult :=match(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.responsePrimitive.primitiveContent.any_1[0].AE_optional, p_primitiveContent.any_1[0].AE_optional)
+				}
+				else if (ischosen(p_requestPrimitive.primitiveContent.any_1[0].AggregatedNotification)) {
+					v_matchResult := true;
+					v_numberOfAggregatedNotification := lengthof(p_requestPrimitive.primitiveContent.any_1[0].AggregatedNotification.notification_list);
+					for(i := 0; i< v_numberOfAggregatedNotification; i := i + 1){
+						if(ischosen(p_requestPrimitive.primitiveContent.any_1[0].AggregatedNotification.notification_list[i].notificationEvent.representation.resource)) {
+							if(not (match(p_requestPrimitive.primitiveContent.any_1[0].AggregatedNotification.notification_list[i].notificationEvent.representation.resource.AE_optional, p_primitiveContent.any_1[0].AE_optional))){
+								v_matchResult := false;
+							}
+						}
+						else if(ischosen(p_requestPrimitive.primitiveContent.any_1[0].AggregatedNotification.notification_list[i].notificationEvent.representation.responsePrimitive)) {
+							if(not (match(p_requestPrimitive.primitiveContent.any_1[0].AggregatedNotification.notification_list[i].notificationEvent.representation.responsePrimitive.primitiveContent.any_1[0].AE_optional, p_primitiveContent.any_1[0].AE_optional))){
+								v_matchResult := false;
+							}
+						}						
+					}
+					if (i == 0){
+						v_matchResult := false;
+					}
+				}
+
+			}
+	
+			if (ischosen(p_primitiveContent.any_1[0].Container_optional)){
+				if(ischosen(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.resource)) {
+					v_matchResult := match(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.resource.Container_optional, p_primitiveContent.any_1[0].Container_optional)
+				}
+				else if(ischosen(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.responsePrimitive)) {
+					v_matchResult := match(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.responsePrimitive.primitiveContent.any_1[0].Container_optional, p_primitiveContent.any_1[0].Container_optional)
+				}
+			}
+	
+			return v_matchResult;
+
+		} //end f_check_notificationContent	
+		
+		function f_cse_notifyProcedure(template PrimitiveContent p_primitiveContent) runs on CseTester {
+			// Local variables
+			var MsgIn v_response;
+    
+			map(self:mcaPort, system:mcaPort);
+			map(self:acPort, system:acPort);
+    
+			tc_ac.start;
+			alt {
+				[] mcaPort.receive(mw_request(mw_notify(mw_contentNotification(?)))) -> value v_response {
+					tc_ac.stop;
+					if(f_check_notificationContent(v_response.primitive.requestPrimitive, p_primitiveContent)){
+						setverdict(pass, testcasename() & ": Notification received");
+						mcaPort.send(m_response(valueof(m_responseNotification(int2001))));
+					}
+					else{
+						setverdict(fail, testcasename() & ": Notification received but the content doesn't match");
+					}
+				}
+				[] mcaPort.receive{
+					tc_ac.stop;
+					setverdict(fail, testcasename() & ": Error, unexpected message received");
+				}
+				[] tc_ac.timeout {
+					setverdict(inconc, testcasename() & ": No notification received");
+				}
+			}
     
-    	}//end group helpingFunctions
+    	
+			unmap(self:mcaPort, system:mcaPort);
+			unmap(self:acPort, system:acPort); 
+    
+		} //end f_cse_notifyProcedure
+    		
+    
+		}//end group helpingFunctions
     	
 		group altstepFunctions {
     		 
@@ -439,26 +710,40 @@ module OneM2M_Functions {
 		 * @return Created CREATE request primitive
 		 * @verdict 
 		 */
-		function f_getCreateRequestPrimitive(in ResourceType p_resourceType, template RequestPrimitive p_request, integer p_parentIndex) runs on CseTester return RequestPrimitive {
-    		
+		function f_getCreateRequestPrimitive(in ResourceType p_resourceType, template RequestPrimitive p_request := m_create, integer p_parentIndex) runs on CseTester return RequestPrimitive {
+			var integer p_locresourceIndex := p_parentIndex;
+			var template ListOfURIs v_notificationURI := {"Not Initialized"};
+            
 			p_request.from_ := f_getOriginator(p_parentIndex);
-                
-			p_request.to_ := f_addPrefix(f_getResourceAddress(p_parentIndex));
-                
+			p_request.to_ := f_getResourceAddress(p_parentIndex);
+    		
 			if (p_resourceType == int1) {//AccessControlPolicy
-    			
 			} 
+			
 			if (p_resourceType == int9) {//group
 				p_request.primitiveContent.any_1[0].Group_optional.memberIDs := {f_getResourceAddress(p_parentIndex)};
 			}
-    		
+			
+			if(p_resourceType == int3){//container
+				//when a container is created by hosting cse for storing location information, the container is seen as a location container
+				if(PX_IS_LOC_CONTAINER){
+					p_request.primitiveContent.any_1[0].Container_optional.locationID := f_getResourceId(vc_resourcesList[p_locresourceIndex].resource);//resourceID of the locationPolicy
+				}		  
+			}
+			
 			if (p_resourceType == int15) {//pollingChannel
-				p_request.from_ := vc_aeAux.aE_ID;
+				if(ischosen(vc_resourcesList[p_parentIndex].resource.any_1[0].AE_optional)) {	
+					p_request.from_ := vc_resourcesList[p_parentIndex].resource.any_1[0].AE_optional.aE_ID;
+				}
+			} 
+			
+			if (p_resourceType == int18) {//schedule
 			} 
     			
 			if (p_resourceType == int23) {//subscription
-				p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {f_getResourceAddress(p_parentIndex)};
-    					
+				if(match(valueof(p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI), v_notificationURI )){
+					p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {f_getResourceAddress(p_parentIndex)};
+				}
 				/*if(PX_FROM_IS_AE_ID) {
 					if(PX_UNSTRUCTURED){
 						p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {vc_aeAux.aE_ID};
@@ -485,7 +770,7 @@ module OneM2M_Functions {
     		
 			p_request.from_ := f_getOriginator(p_resourceIndex);
                 
-			p_request.to_ := f_addPrefix(f_getResourceAddress(p_resourceIndex));
+			p_request.to_ := f_getResourceAddress(p_resourceIndex);
     			
 			if (p_resourceType == int3) {//Container
     			
@@ -589,7 +874,7 @@ module OneM2M_Functions {
 		function f_getOriginator(integer  p_targetResourceIndex := -1) runs on CseTester return XSD.AnyURI {
     			
 			if(p_targetResourceIndex == -1) {
-				return PX_AE_ID_STEM;
+				return PX_SUPER_USER;
 			}	
     			
 			if(PX_FROM_IS_AE_ID) {
@@ -599,7 +884,7 @@ module OneM2M_Functions {
 					return f_getOriginator(vc_resourcesList[p_targetResourceIndex].parentIndex);
 				}
 			} else {
-				return PX_AE_ID_STEM;
+				return PX_SUPER_USER;
 			}
 		}
     		
@@ -669,15 +954,17 @@ module OneM2M_Functions {
 			} else if (PX_ADDRESSING_FORMAT ==  e_absolute) {
 				if(PX_UNSTRUCTURED) {
 					if(p_targetResourceIndex == -1) {
-						return "";
+						return "//" &"SpId" & "/" & PX_CSE_ID;
 					} else {
-						return "";
+						v_resourceAddress := f_getResourceAddress() & "/" & f_getResourceId(vc_resourcesList[p_targetResourceIndex].resource);
+						return v_resourceAddress;
 					}
 				} else {
 					if(p_targetResourceIndex == -1) {
-						return "";
+						return "//" &"SpId" & "/" & PX_CSE_ID & "/" & PX_CSE_NAME;
 					} else {
-						return "";
+						v_resourceAddress := f_getResourceAddress(vc_resourcesList[p_targetResourceIndex].parentIndex) & "/" & f_getResourceName(vc_resourcesList[p_targetResourceIndex].resource);
+						return v_resourceAddress;
 					}	
 				}				
 			} else {
@@ -692,7 +979,7 @@ module OneM2M_Functions {
 		 * @return Internal resource index of the saved resource
 		 * @verdict 
 		 */
-		function f_setResource(PrimitiveContent p_resource, integer  p_parentIndex := -1) runs on CseTester return integer {
+		function f_setResource(PrimitiveContent p_resource, integer  p_parentIndex := -1) runs on Tester return integer {
     			
 			if(isbound(vc_resourcesList)) {
 				vc_resourcesList[lengthof(vc_resourcesList)] := {p_parentIndex, p_resource};
@@ -702,6 +989,37 @@ module OneM2M_Functions {
 			return lengthof(vc_resourcesList)-1;
     					
 		}
+		
+    				
+		/**
+		 * @desc Set Acpid into the requestPrimitive
+		 * @param p_requestPrimitive RequestPrimitive to be modified
+		 * @param p_accessControlPolicyIDs AcpId to be set
+		 * @return 
+		 * @verdict 
+		 */
+		function f_setAcpId(template RequestPrimitive p_requestPrimitive, template AcpType p_accessControlPolicyIDs) runs on CseTester return RequestPrimitive{
+	
+			if (ischosen(p_requestPrimitive.primitiveContent.any_1[0].AE_optional)){
+				p_requestPrimitive.primitiveContent.any_1[0].AE_optional.accessControlPolicyIDs := p_accessControlPolicyIDs;
+			}
+			else if (ischosen(p_requestPrimitive.primitiveContent.any_1[0].Container_optional)){
+				p_requestPrimitive.primitiveContent.any_1[0].Container_optional.accessControlPolicyIDs := p_accessControlPolicyIDs;
+			}
+			else if (ischosen(p_requestPrimitive.primitiveContent.any_1[0].Group_optional)){
+				p_requestPrimitive.primitiveContent.any_1[0].Group_optional.accessControlPolicyIDs := p_accessControlPolicyIDs;
+			}
+			else if (ischosen(p_requestPrimitive.primitiveContent.any_1[0].ServiceSubscribedAppRule_optional)){
+				p_requestPrimitive.primitiveContent.any_1[0].ServiceSubscribedAppRule_optional.accessControlPolicyIDs := p_accessControlPolicyIDs;
+			}
+			else if (ischosen(p_requestPrimitive.primitiveContent.any_1[0].Subscription_optional)){
+				p_requestPrimitive.primitiveContent.any_1[0].Subscription_optional.accessControlPolicyIDs := p_accessControlPolicyIDs;
+			}
+			else if (ischosen(p_requestPrimitive.primitiveContent.any_1[0].LocationPolicy_optional)){
+				p_requestPrimitive.primitiveContent.any_1[0].LocationPolicy_optional.accessControlPolicyIDs := p_accessControlPolicyIDs;
+			}
+			return valueof(p_requestPrimitive);					
+		}
     				
 	}//end group getSetFunctions
 	
@@ -738,16 +1056,5 @@ module OneM2M_Functions {
 		}//end group altstepFunctions
 		
 	}//end of commonFunctions
-
-		
-
-	
-
-		
-
-		
-
-	
-
 	
 }  // end of module
diff --git a/LibOneM2M/OneM2M_Pixits.ttcn b/LibOneM2M/OneM2M_Pixits.ttcn
index ab49f6729aafcb33cdea42340097062094377e0b..3e97734fb6038ce407b35b5f3e9f24a0d6fe4583 100644
--- a/LibOneM2M/OneM2M_Pixits.ttcn
+++ b/LibOneM2M/OneM2M_Pixits.ttcn
@@ -7,7 +7,7 @@
  *  
  *  @author     ETSI
  *  @version    $URL: https://forge.etsi.org/svn/oneM2M/branches/Release1/ttcn/LibOneM2M/OneM2M_Pixits.ttcn $
- *              $Id: OneM2M_Pixits.ttcn 103 2016-08-30 09:39:32Z reinaortega $
+ *              $Id: OneM2M_Pixits.ttcn 175 2016-11-22 12:39:39Z reinaortega $
  *  @desc       Module containing Pixits for oneM2M
  *
  */
@@ -15,26 +15,32 @@ module OneM2M_Pixits {
 	
 	import from XSD all;
 	import from OneM2M_Types all;
+	
+	group testAdapterParameters {}
 
 	modulepar boolean PX_DELETE_CREATED_RESOURCES 	:= true;
 	
-	modulepar charstring PX_RESOURCE_TO_BE_DELETED 	:= "/ae_test";
+	modulepar XSD.AnyURI PX_RESOURCE_TO_BE_DELETED 	:= "/ae_test";
 	
 	modulepar XSD.IDREFS PX_RESOURCES_TO_BE_DELETED := {"/ae_test", "/MyAcp"};
 	
-	modulepar charstring PX_HOST_ADDRESS 			:= "127.0.0.1:8080";
+	modulepar charstring PX_SUT_ADDRESS 			:= "127.0.0.1:8080";
+	
+	modulepar charstring PX_TESTER_ADDRESS 			:= "127.0.0.1:3131";
 	
 	modulepar charstring PX_XML_NAMESPACE 			:= "om2m=""http://www.onem2m.org/xml/protocols""";
 	
-	modulepar charstring PX_CSE_NAME 				:= "in-cse";
+	modulepar XSD.ID PX_CSE_NAME 				:= "in-name";
 	
-	modulepar charstring PX_URI_CSE 				:= "/~/in-cse";
+	modulepar XSD.AnyURI PX_URI_CSE 				:= "in-name";//TODO to be deleted
 		
 	modulepar boolean PX_UNSTRUCTURED 				:= false;
 	
-	modulepar charstring PX_AE_ID_STEM				:= "admin:admin";
+	modulepar XSD.ID PX_AE_ID_STEM				:= "";
+	
+	modulepar XSD.ID PX_SUPER_USER				:= "admin:admin";
 	
-	modulepar charstring PX_APP_ID 					:= "myAppId";
+	modulepar XSD.ID PX_APP_ID 					:= "myAppId";
 	
 	modulepar boolean PX_RUN_POSTAMBLE 				:= true;
 	
@@ -42,25 +48,29 @@ module OneM2M_Pixits {
 	
 	modulepar AddressingFormat PX_ADDRESSING_FORMAT := e_cseRelative;
 	
-	modulepar charstring PX_SERIALIZATION			:= "JSON";
+	modulepar charstring PX_SERIALIZATION			:= "XML";
 	
 	modulepar charstring PX_PROTOCOL_BINDING 		:= "HTTP";
+		
+	modulepar XSD.ID PX_CSE_ID 					:= "in-cse";
 	
-	modulepar boolean PX_ACP_SUPPORT 				:= true;
-	
-	modulepar charstring PX_CSE_ID 					:= "in-cse";
-	
-	modulepar boolean PX_FROM_IS_AE_ID 				:= false;
+	modulepar boolean PX_FROM_IS_AE_ID 				:= true;
+	//@Martin
+	//for checking whether the locationPolicy creation request is originated from a ASN-AE
+	//NOTE: Apply to Device-based location request, and this requires Test System (TS) to activate ASN-AE mode to test IUT  	
+	modulepar boolean PX_IUT_IS_ASN_CSE				:= false; //default //set it to true when running Device-based location testcases 	
+	modulepar boolean PX_IUT_IS_MN_CSE				:= false; //default //set it to true when running Share-based location testcases
 	
 	//@Martin
-	//constant parameters for LOC 
-	modulepar LocationSource PX_LOCATION_SOURCE				:= int1;//network-defined 
-	modulepar charstring PX_LOCATION_TARGET_ID				:= "{LOCATION-TARGET-ID}"; //SUPPOSE TO BE RECEIVED FROM LOCATION SERVER
-	modulepar charstring PX_LOCATION_SERVER_ADDRESS			:= "{LOCATION-SERVER-ADDRESS}";
+	//constant parameters for LOC  
+	modulepar XSD.Token PX_LOCATION_TARGET_ID				:= "{LOCATION-TARGET-ID}"; //SUPPOSE TO BE RECEIVED FROM LOCATION SERVER
+	modulepar XSD.AnyURI PX_LOCATION_SERVER_ADDRESS		:= "{LOCATION-SERVER-ADDRESS}";
+	
 	modulepar charstring PX_LOCATION_UPDATE_PERIOD			:= "PT10M10S" ;//10 Minute 10 Seconds
-	modulepar charstring PX_LOCATION_UPDATE_PERIOD_INVALID 	:= "-PT30M10S" ;//duration set to invalid value  (minus value)
-	modulepar charstring PX_LOCATION_CONTAINER_NAME			:= "myLoContainer";
+	modulepar charstring PX_LOCATION_CONTAINER_NAME		:= "myLoContainer";
 	
-	modulepar Labels LABELS := {"VALUE_1"}; 
+	modulepar Labels LABELS := {"VALUE_1"}; 	
+	modulepar boolean PX_IS_LOC_CONTAINER	:= false;//default //set it to true when the container is created to store location information
 	
 }  // end of module
+
diff --git a/LibOneM2M/OneM2M_Templates.ttcn b/LibOneM2M/OneM2M_Templates.ttcn
index 43fe6f57899b4b733dee5d04206345f638b26ae0..46bc8acffbe73018972cc7008e795e01da80eff9 100644
--- a/LibOneM2M/OneM2M_Templates.ttcn
+++ b/LibOneM2M/OneM2M_Templates.ttcn
@@ -7,7 +7,7 @@
  *  
  *  @author     ETSI
  *  @version    $URL: https://forge.etsi.org/svn/oneM2M/branches/Release1/ttcn/LibOneM2M/OneM2M_Templates.ttcn $
- *              $Id: OneM2M_Templates.ttcn 173 2016-11-22 08:10:48Z reinaortega $
+ *              $Id: OneM2M_Templates.ttcn 175 2016-11-22 12:39:39Z reinaortega $
  *  @desc       Module containing templates for oneM2M
  *
  */
@@ -38,22 +38,35 @@ module OneM2M_Templates {
 	/* Templates */
 	
 	group primitives {
-    	/** 
-    	 * @desc Base template for request sending operations
-    	 * @param p_requestPrimitive
-    	 */
-    	template (value) MsgOut m_request(in template (value) RequestPrimitive p_requestPrimitive, in template (omit) AttributeList_1 p_nullFields := omit ) := {
-    		primitive := { requestPrimitive := p_requestPrimitive},
-    		host := PX_HOST_ADDRESS,
-    		xmlNamespace := PX_XML_NAMESPACE,
-    		protocolBinding := PX_PROTOCOL_BINDING,
-    		serialization := PX_SERIALIZATION, 
-    		nullFields := p_nullFields
-    	};
-    	//Added by @Naum
-    	template MsgIn mw_request(in template (present) RequestPrimitive p_requestPrimitive) := {
-    		primitive := { requestPrimitive := p_requestPrimitive}
-    	};
+		/** 
+		 * @desc Base template for request sending operations
+		 * @param p_requestPrimitive
+		 */
+		template (value) MsgOut m_request(in template (value) RequestPrimitive p_requestPrimitive, in template (omit) AttributeList_1 p_nullFields := omit ) := {
+			primitive := { requestPrimitive := p_requestPrimitive},
+			host := PX_SUT_ADDRESS,
+			xmlNamespace := PX_XML_NAMESPACE,
+			protocolBinding := PX_PROTOCOL_BINDING,
+			serialization := PX_SERIALIZATION, 
+			nullFields := p_nullFields
+		};
+    	
+		/** 
+		 * @desc Base template for response sending operations
+		 * @param p_responsePrimitive
+		 */
+		template (value) MsgOut m_response(in template (value) ResponsePrimitive p_responsePrimitive, in template (omit) AttributeList_1 p_nullFields := omit ) := {
+			primitive := { responsePrimitive := p_responsePrimitive},
+			host := PX_SUT_ADDRESS,
+			xmlNamespace := PX_XML_NAMESPACE,
+			protocolBinding := PX_PROTOCOL_BINDING,
+			serialization := PX_SERIALIZATION, 
+			nullFields := p_nullFields
+		};
+		//Added by @Naum
+		template MsgIn mw_request(in template (present) RequestPrimitive p_requestPrimitive) := {
+			primitive := { requestPrimitive := p_requestPrimitive}
+		};
     	
 		/** 
 		 * @desc Base template for response receiving operations
@@ -63,21 +76,21 @@ module OneM2M_Templates {
 			primitive := { responsePrimitive := p_responsePrimitive}
 		};
     	
-	}
+	}//end of group primitives
 	
 	group RequestPrimitives { 
 		
 		group Retrieve {
 	
-        	/**
+			/**
 			 * @desc 
 			 */
-        	template (value) RequestPrimitive m_retrieveCseBase := {
-        		operation := int2,
-        		to_ := PX_URI_CSE,//c_uri_cse,//@Martin
-        		from_ := "admin:admin",
-        		requestIdentifier := "m_retrieveCseBase" & f_rnd(1, 1000000),
-        		resourceType := omit,
+			template (value) RequestPrimitive m_retrieveCseBase := {
+				operation := int2,
+				to_ := PX_URI_CSE,//c_uri_cse,//@Martin
+				from_ := "admin:admin",
+				requestIdentifier := "m_retrieveCseBase" & f_rnd(1, 1000000),
+				resourceType := omit,
 				primitiveContent := omit,
 				role := omit,
 				originatingTimestamp := omit,
@@ -91,17 +104,17 @@ module OneM2M_Templates {
 				deliveryAggregation := omit,
 				groupRequestIdentifier := omit,
 				filterCriteria := omit,
-        		discoveryResultType := omit	
-        	};
+				discoveryResultType := omit
+			};
 
 			/**
 			 * @desc Base RETRIEVE request primitive
 			 * @param p_targetResourceAddress Target resource address
 			 * @param p_originator Originator (from)
 			 */
-			template (value) RequestPrimitive m_retrieveResource(XSD.ID p_targetResourceAddress, in XSD.ID p_originator := PX_AE_ID_STEM) := {
+			template (value) RequestPrimitive m_retrieveResource(XSD.ID p_targetResourceAddress, in XSD.ID p_originator) := {
 				operation := int2,
-				to_ := f_addPrefix(p_targetResourceAddress),
+				to_ := p_targetResourceAddress,
 				from_ := p_originator,
 				requestIdentifier := "m_retrieveResource" & f_rnd(1, 1000000),
 				resourceType := omit,
@@ -118,7 +131,7 @@ module OneM2M_Templates {
 				deliveryAggregation := omit,
 				groupRequestIdentifier := omit,
 				filterCriteria := omit,
-				discoveryResultType := omit	
+				discoveryResultType := omit
 			};
         	
 			/**
@@ -126,13 +139,13 @@ module OneM2M_Templates {
 			 * @param p_targetResourceAddress Target resource address (including "#AttributeName")
 			 * @param p_originator Originator (from)
 			 */
-        	template (value) RequestPrimitive m_retrieveResourceAttributeToOption(XSD.ID p_targetResourceAddress, in XSD.ID p_originator := PX_AE_ID_STEM) := {
-        		operation := int2,
-        		to_ := f_addPrefix(p_targetResourceAddress),
-        		from_ := p_originator,
-        		requestIdentifier := "m_retrieveResourceAttributeOptionTo" & f_rnd(1, 1000000),
-        		resourceType := omit,
-				primitiveContent := omit, 
+			template (value) RequestPrimitive m_retrieveResourceAttributeToOption(XSD.ID p_targetResourceAddress, in XSD.ID p_originator) := {
+				operation := int2,
+				to_ := p_targetResourceAddress,
+				from_ := p_originator,
+				requestIdentifier := "m_retrieveResourceAttributeOptionTo" & f_rnd(1, 1000000),
+				resourceType := omit,
+				primitiveContent := omit,
 				role := omit,
 				originatingTimestamp := omit,
 				requestExpirationTimestamp := omit,
@@ -145,8 +158,8 @@ module OneM2M_Templates {
 				deliveryAggregation := omit,
 				groupRequestIdentifier := omit,
 				filterCriteria := omit,
-				discoveryResultType := omit	
-        	};
+				discoveryResultType := omit
+			};
         	
 			/**
 			 * @desc RETRIEVE request primtive containing the target attributes in the primitiveContent field
@@ -154,9 +167,9 @@ module OneM2M_Templates {
 			 * @param p_attributeList Target attribute list
 			 * @param p_originator Originator (from)
 			 */
-			template (value) RequestPrimitive m_retrieveResourceAttributeContentOption(XSD.ID p_targetResourceAddress, in template (value) AttributeList_1 p_attributeList, in XSD.ID p_originator := PX_AE_ID_STEM ) := {
+			template (value) RequestPrimitive m_retrieveResourceAttributeContentOption(XSD.ID p_targetResourceAddress, in template (value) AttributeList_1 p_attributeList, in XSD.ID p_originator) := {
 				operation := int2,
-				to_ := f_addPrefix(p_targetResourceAddress),
+				to_ := p_targetResourceAddress,
 				from_ := p_originator,
 				requestIdentifier := "m_retrieveResourceAttributeContentOption" & f_rnd(1, 1000000),
 				resourceType := omit,
@@ -175,24 +188,19 @@ module OneM2M_Templates {
 				deliveryAggregation := omit,
 				groupRequestIdentifier := omit,
 				filterCriteria := omit,
-				discoveryResultType := omit	
+				discoveryResultType := omit
 			};
-    	}//end group Retrieve
+		}//end group Retrieve
 
-    	group Update {
-        	
-			/**
-			 * @desc Base UPDATE request primitive for Container resource
-			 */
-			template (value) RequestPrimitive m_updateContainerBase := {
+		group Update {
+    		
+			template (value) RequestPrimitive m_update := {
 				operation := int3,
 				to_ := "NotInitialized",
-				from_ := PX_AE_ID_STEM,
-				requestIdentifier := "m_updateContainer" & f_rnd(1, 1000000),
+				from_ := "NotInitialized",
+				requestIdentifier := "m_update" & f_rnd(1, 1000000),
 				resourceType := omit,
-				primitiveContent:= {
-							any_1 := {{Container_optional := m_contentUpdateContainer}}
-				},
+				primitiveContent:= omit,
 				role := omit,
 				originatingTimestamp := omit,
 				requestExpirationTimestamp := omit,
@@ -205,133 +213,115 @@ module OneM2M_Templates {
 				deliveryAggregation := omit,
 				groupRequestIdentifier := omit,
 				filterCriteria := omit,
-				discoveryResultType := omit	
+				discoveryResultType := omit
+			};
+        	
+			/**
+			 * @desc Base UPDATE request primitive for Ae resource
+			 */
+			template (value) RequestPrimitive m_updateAeBase modifies m_update:= {
+				from_ := PX_AE_ID_STEM,
+				requestIdentifier := "m_updateAe" & f_rnd(1, 1000000),
+				primitiveContent:= {
+							any_1 := {{AE_optional := m_contentUpdateAe}}
+				}
+			};
+        	
+			/**
+			 * @desc Base UPDATE request primitive for Container resource
+			 */
+			template (value) RequestPrimitive m_updateContainerBase modifies m_update:= {
+				from_ := PX_AE_ID_STEM,
+				requestIdentifier := "m_updateContainer" & f_rnd(1, 1000000),
+				primitiveContent:= {
+							any_1 := {{Container_optional := m_contentUpdateContainer}}
+				}
 			};
 			
 			/**
 			 * @desc Base UPDATE request primitive for AccessControlPolicy resource
 			 */        				
-			template (value) RequestPrimitive m_updateAcpBase := {
-				operation := int3,
-				to_ := "NotInitialized",
+			template (value) RequestPrimitive m_updateAcpBase modifies m_update := {
 				from_ := PX_AE_ID_STEM,
 				requestIdentifier := "m_updateAcp" & f_rnd(1, 1000000),
-				resourceType := omit,
 				primitiveContent:= {
 							any_1 := {{AccessControlPolicy_optional := m_contentUpdateAcp}}
-				},
-				role := omit,
-				originatingTimestamp := omit,
-				requestExpirationTimestamp := omit,
-				resultExpirationTimestamp := omit,
-				operationExecutionTime := omit,
-				responseType := omit,
-				resultPersistence := omit,
-				resultContent := omit,
-				eventCategory := omit,
-				deliveryAggregation := omit,
-				groupRequestIdentifier := omit,
-				filterCriteria := omit,
-				discoveryResultType := omit	
-
+				}
+			};
+			
+			template (value) RequestPrimitive m_updateAcpPrivileges(in template(omit) SetOfAcrs p_privileges := omit, in template(omit) SetOfAcrs p_selfPrivileges := omit) modifies m_update := {
+				from_ := PX_AE_ID_STEM,
+				requestIdentifier := "m_updateAcp" & f_rnd(1, 1000000),
+				primitiveContent:= {
+							any_1 := {{AccessControlPolicy_optional := m_contentUpdateAcpPrivileges(p_privileges, p_selfPrivileges)}}
+				}
 			};
 			
 			/**
 			 * @desc Base UPDATE request primitive for Group resource
 			 */
-			template (value) RequestPrimitive m_updateGroupBase := {
-				operation := int3,
-				to_ := "NotInitialized",
+			template (value) RequestPrimitive m_updateGroupBase modifies m_update := {
 				from_ := PX_AE_ID_STEM,
 				requestIdentifier := "m_updateGroup" & f_rnd(1, 1000000),
-				resourceType := omit,
 				primitiveContent:= {
 							any_1 := {{Group_optional := m_contentUpdateGroup}}
-				},
-				role := omit,
-				originatingTimestamp := omit,
-				requestExpirationTimestamp := omit,
-				resultExpirationTimestamp := omit,
-				operationExecutionTime := omit,
-				responseType := omit,
-				resultPersistence := omit,
-				resultContent := omit,
-				eventCategory := omit,
-				deliveryAggregation := omit,
-				groupRequestIdentifier := omit,
-				filterCriteria := omit,
-				discoveryResultType := omit	
-
+				}
 			};
 			
 			/**
 			 * @desc Base UPDATE request primitive for Schedule resource
 			 */
-			template (value) RequestPrimitive m_updateScheduleBase := {
-				operation := int3,
-				to_ := "NotInitialized",
+			template (value) RequestPrimitive m_updateScheduleBase modifies m_update := {
 				from_ := PX_AE_ID_STEM,
 				requestIdentifier := "m_updateSchedule" & f_rnd(1, 1000000),
-				resourceType := omit,
 				primitiveContent:= {
 							any_1 := {{Schedule_optional := m_contentUpdateSchedule}}
-				},
-				role := omit,
-				originatingTimestamp := omit,
-				requestExpirationTimestamp := omit,
-				resultExpirationTimestamp := omit,
-				operationExecutionTime := omit,
-				responseType := omit,
-				resultPersistence := omit,
-				resultContent := omit,
-				eventCategory := omit,
-				deliveryAggregation := omit,
-				groupRequestIdentifier := omit,
-				filterCriteria := omit,
-				discoveryResultType := omit	
-
+				}
 			};
 			
 			/**
 			 * @desc Base UPDATE request primitive for PollingChannel resource
 			 */
-			template (value) RequestPrimitive m_updatePollingChannelBase := {
-				operation := int3,
-				to_ := "NotInitialized",
+			template (value) RequestPrimitive m_updatePollingChannelBase modifies m_update := {
 				from_ := PX_AE_ID_STEM,
 				requestIdentifier := "m_updatePollingChannel" & f_rnd(1, 1000000),
-				resourceType := omit,
 				primitiveContent:= {
 							any_1 := {{PollingChannel_optional := m_contentUpdatePollingChannel}}
-				},
-				role := omit,
-				originatingTimestamp := omit,
-				requestExpirationTimestamp := omit,
-				resultExpirationTimestamp := omit,
-				operationExecutionTime := omit,
-				responseType := omit,
-				resultPersistence := omit,
-				resultContent := omit,
-				eventCategory := omit,
-				deliveryAggregation := omit,
-				groupRequestIdentifier := omit,
-				filterCriteria := omit,
-				discoveryResultType := omit	
-
+				}
 			};
 			
 			/**
 			 * @desc Base UPDATE request primitive for Subscription resource
 			 */
-			template (value) RequestPrimitive m_updateSubscriptionBase := {
-				operation := int3,
-				to_ := "NotInitialized",
+			template (value) RequestPrimitive m_updateSubscriptionBase modifies m_update := {
 				from_ := PX_AE_ID_STEM,
 				requestIdentifier := "m_updateSubscription" & f_rnd(1, 1000000),
-				resourceType := omit,
 				primitiveContent:= {
 							any_1 := {{Subscription_optional := m_contentUpdateSubscription}}
-				},
+				}
+			};
+			
+			//@Martin
+			template (value) RequestPrimitive m_updateLocationPolicy(XSD.ID p_locResourceAddress, in template (omit) AcpType p_accessControlPolicyIDs, in template (omit) XSD.Duration locationUpdatePeriod) modifies m_update := {
+				to_ 				:= p_locResourceAddress,
+				from_				:= PX_AE_ID_STEM, //AE originator id e.g.
+				requestIdentifier	:= "m_updateLocationPolicy",
+				primitiveContent	:= {        	    
+							any_1 := {{ LocationPolicy_optional := m_contentUpdateLocationPolicy(p_accessControlPolicyIDs, locationUpdatePeriod) }}
+				}
+			  };
+        	
+		}//end group Update
+    	
+		group Create {
+
+			template (value) RequestPrimitive m_create := {
+				operation := int1,
+				to_ := "NotInitialized",
+				from_ := "NotInitialized",
+				requestIdentifier := "m_create" & f_rnd(1, 1000000),
+				resourceType := omit,
+				primitiveContent := omit,
 				role := omit,
 				originatingTimestamp := omit,
 				requestExpirationTimestamp := omit,
@@ -344,38 +334,8 @@ module OneM2M_Templates {
 				deliveryAggregation := omit,
 				groupRequestIdentifier := omit,
 				filterCriteria := omit,
-				discoveryResultType := omit	
-
+				discoveryResultType := omit
 			};
-			
-			//@Martin
-        	template (value) RequestPrimitive m_updateLocationPolicy(XSD.ID p_locResourceAddress, in template (omit) AcpType p_accessControlPolicyIDs, in template (omit) XSD.Duration locationUpdatePeriod) := {
-        	  	operation 			:= int3,  //create
-        	  	to_ 				:= p_locResourceAddress,
-        	  	from_				:= PX_AE_ID_STEM, //AE originator id e.g.
-        	  	requestIdentifier	:= "m_updateLocationPolicy",
-        	  	resourceType		:= omit,//NP
-        	  	primitiveContent	:= {        	    
-        	    			any_1 := {{ LocationPolicy_optional := m_contentUpdateLocationPolicy(p_accessControlPolicyIDs, locationUpdatePeriod) }}
-        	  },
-        	  	role := omit,
-			  	originatingTimestamp := omit,
-			  	requestExpirationTimestamp := omit,
-				resultExpirationTimestamp := omit,
-				operationExecutionTime := omit,
-				responseType := omit,
-				resultPersistence := omit,
-				resultContent := int1,//default
-				eventCategory := omit,
-				deliveryAggregation := omit,
-				groupRequestIdentifier := omit,
-				filterCriteria := omit,
-				discoveryResultType := omit 
-        	};
-        	
-    	}//end group Update
-    	
-    	group Create {
         	
 			/**
 			 * @desc Base CREATE request primitive for AE resource (AUX)
@@ -406,522 +366,244 @@ module OneM2M_Templates {
 			};
 
 			//Added by @Naum
-			template (value) RequestPrimitive m_createAe(XSD.ID p_appId, template (omit) AcpType p_accessControlPolicyIDs := omit,template (omit) XSD.ID p_from := omit) := {
-				operation := int1,
-				to_ := "Not Initialized",
+			template (value) RequestPrimitive m_createAe(XSD.ID p_appId, template (omit) AcpType p_accessControlPolicyIDs := omit,template (omit) XSD.ID p_from := omit, template (omit) ResourceName p_resourceName :=  c_aeAuxName, in template (omit) PoaList p_poaList := omit) modifies m_create := {
 				from_ := p_from,//PX_AE_ID_STEM,//TODO We should use omit, "s", or "c"
 				requestIdentifier := "m_createAe" & f_rnd(1, 1000000),
 				resourceType := int2,
 				primitiveContent := {
-					any_1 := {{AE_optional := m_contentCreateAe(p_accessControlPolicyIDs, c_aeAuxName, p_appId)}}	
-				},
-				role := omit,
-				originatingTimestamp := omit,
-				requestExpirationTimestamp := omit,
-				resultExpirationTimestamp := omit,
-				operationExecutionTime := omit,
-				responseType := omit,
-				resultPersistence := omit,
-				resultContent := omit,
-				eventCategory := omit,
-				deliveryAggregation := omit,
-				groupRequestIdentifier := omit,
-				filterCriteria := omit,
-				discoveryResultType := omit	
-
+					any_1 := {{AE_optional := m_contentCreateAe(p_accessControlPolicyIDs,p_resourceName, p_appId, p_poaList)}}	
+				}
 			};
         	
-        	template (value) RequestPrimitive m_createAeAux(template (omit) AcpType p_accessControlPolicyIDs := omit ) := {
-        		operation := int1,
-        		to_ := "Not Initialized",
-        		from_ := PX_AE_ID_STEM,//TODO We should use omit, "s", or "c"//@Martin
-        		requestIdentifier := "m_createAe" & f_rnd(1, 1000000),
-        		resourceType := int2,
-        		primitiveContent := {
-        			any_1 := {{AE_optional := m_contentCreateAe(p_accessControlPolicyIDs, c_aeAuxName)}}	
-        		},
-				role := omit,
-				originatingTimestamp := omit,
-				requestExpirationTimestamp := omit,
-				resultExpirationTimestamp := omit,
-				operationExecutionTime := omit,
-				responseType := omit,
-				resultPersistence := omit,
-				resultContent := omit,
-				eventCategory := omit,
-				deliveryAggregation := omit,
-				groupRequestIdentifier := omit,
-				filterCriteria := omit,
-				discoveryResultType := omit	
-
-        	};
+			template (value) RequestPrimitive m_createAeAux(template (omit) AcpType p_accessControlPolicyIDs := omit, in template (omit) PoaList p_poaList) modifies m_create := {
+				from_ := PX_AE_ID_STEM,//TODO We should use omit, "s", or "c"//@Martin
+				requestIdentifier := "m_createAe" & f_rnd(1, 1000000),
+				resourceType := int2,
+				primitiveContent := {
+					any_1 := {{AE_optional := m_contentCreateAe(p_accessControlPolicyIDs, c_aeAuxName, -, p_poaList)}}	
+				}
+			};
         	
 			/**
 			 * @desc Base CREATE request primitive for AccessControlPolicy resource
 			 */
-			template (value) RequestPrimitive m_createAcpBase := {
-				operation := int1,
-				to_ := "NotInitialized",
-				from_ := "NotInitialized",
+			template (value) RequestPrimitive m_createAcpBase modifies m_create := {
 				requestIdentifier := "m_createAcp" & f_rnd(1, 1000000),
 				resourceType := int1,
 				primitiveContent := {
 					any_1 := {{AccessControlPolicy_optional := m_contentCreateAcp ()}}
-				},
-				role := omit,
-				originatingTimestamp := omit,
-				requestExpirationTimestamp := omit,
-				resultExpirationTimestamp := omit,
-				operationExecutionTime := omit,
-				responseType := omit,
-				resultPersistence := omit,
-				resultContent := omit,
-				eventCategory := omit,
-				deliveryAggregation := omit,
-				groupRequestIdentifier := omit,
-				filterCriteria := omit,
-				discoveryResultType := omit	
-
+				}
 			};
 				
-        	template (value) RequestPrimitive m_createAcp(XSD.ID p_parentResourceAddress, in template (omit)  XSD.String p_name := c_defaultResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63) := {
-        		operation := int1,
-        		to_ := f_addPrefix(p_parentResourceAddress),
-        		from_ := PX_AE_ID_STEM,
-        		requestIdentifier := "m_createAcp" & f_rnd(1, 1000000),
-        		resourceType := int1,
-        		primitiveContent := {
+			template (value) RequestPrimitive m_createAcp(XSD.ID p_parentResourceAddress, in template (omit)  XSD.String p_name := c_defaultResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63) modifies m_create := {
+				to_ := p_parentResourceAddress,
+				from_ := PX_AE_ID_STEM,
+				requestIdentifier := "m_createAcp" & f_rnd(1, 1000000),
+				resourceType := int1,
+				primitiveContent := {
 					any_1 := {{AccessControlPolicy_optional := m_contentCreateAcp (p_name, p_acor, p_allowedOperations)}}
-        		},
-				role := omit,
-				originatingTimestamp := omit,
-				requestExpirationTimestamp := omit,
-				resultExpirationTimestamp := omit,
-				operationExecutionTime := omit,
-				responseType := omit,
-				resultPersistence := omit,
-				resultContent := omit,
-				eventCategory := omit,
-				deliveryAggregation := omit,
-				groupRequestIdentifier := omit,
-				filterCriteria := omit,
-				discoveryResultType := omit	
-
-        	};
+				}
+			};
         	
        	
 			/**
 			 * @desc Base CREATE request primitive for AccessControlPolicy resource (AUX)
 			 */
-        	template (value) RequestPrimitive m_createAcpAux(in template (value) XSD.String p_acpName := c_acpAuxName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63 ) := {
-        		operation := int1,
-        		to_ := "Not Initialized",
-        		from_ := PX_AE_ID_STEM,
-        		requestIdentifier := "m_createAcpAux" & f_rnd(1, 1000000),
-        		resourceType := int1,
-        		primitiveContent := {
-        			any_1 := {{AccessControlPolicy_optional := m_contentCreateAcp (p_acpName, p_acor, p_allowedOperations)}}	
-        		},
-				role := omit,
-				originatingTimestamp := omit,
-				requestExpirationTimestamp := omit,
-				resultExpirationTimestamp := omit,
-				operationExecutionTime := omit,
-				responseType := omit,
-				resultPersistence := omit,
-				resultContent := omit,
-				eventCategory := omit,
-				deliveryAggregation := omit,
-				groupRequestIdentifier := omit,
-				filterCriteria := omit,
-				discoveryResultType := omit	
-
-        	};
+			template (value) RequestPrimitive m_createAcpAux(in template (value) XSD.String p_acpName := c_acpAuxName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63 ) modifies m_create := {
+				from_ := PX_SUPER_USER,
+				requestIdentifier := "m_createAcpAux" & f_rnd(1, 1000000),
+				resourceType := int1,
+				primitiveContent := {
+					any_1 := {{AccessControlPolicy_optional := m_contentCreateAcp (p_acpName, p_acor, p_allowedOperations)}}	
+				}
+			};
         	
 			//Added by @Naum
-			template (value) RequestPrimitive m_createCSEBase (in ServiceSubscribedAppRule p_serviceSubscribedAppRule) := {
-				operation := int1,
-				to_ := "NotInitialized",
+			template (value) RequestPrimitive m_createCSEBase (in ServiceSubscribedAppRule p_serviceSubscribedAppRule) modifies m_create := {
 				from_ := PX_AE_ID_STEM,
 				requestIdentifier := "m_createCSE" & f_rnd(1, 1000000),
-				resourceType := int1,
+				resourceType := int1,//FIXME Is this the value for CSEBase? In any case, this template is not used at all
 				primitiveContent := {
 					any_1 := {{CSEBase_optional := m_contentCreateCSEBase (p_serviceSubscribedAppRule)}}
-				},
-				role := omit,
-				originatingTimestamp := omit,
-				requestExpirationTimestamp := omit,
-				resultExpirationTimestamp := omit,
-				operationExecutionTime := omit,
-				responseType := omit,
-				resultPersistence := omit,
-				resultContent := omit,
-				eventCategory := omit,
-				deliveryAggregation := omit,
-				groupRequestIdentifier := omit,
-				filterCriteria := omit,
-				discoveryResultType := omit	
-
+				}
 			};
         	
        	
 			/**
 			 * @desc Base CREATE request primitive for Container resource
 			 */
-			template (value) RequestPrimitive m_createContainerBase := {
-				operation := int1,
-				to_ := "NotInitialized",
-				from_ := "NotInitialized",
+			template (value) RequestPrimitive m_createContainerBase modifies m_create := {
 				requestIdentifier := "m_createContainer" & f_rnd(1, 1000000),
 				resourceType := int3,
 				primitiveContent := {
 					
 					any_1 := {{Container_optional := m_contentCreateContainer}}
-				},
-				role := omit,
-				originatingTimestamp := omit,
-				requestExpirationTimestamp := omit,
-				resultExpirationTimestamp := omit,
-				operationExecutionTime := omit,
-				responseType := omit,
-				resultPersistence := omit,
-				resultContent := omit,
-				eventCategory := omit,
-				deliveryAggregation := omit,
-				groupRequestIdentifier := omit,
-				filterCriteria := omit,
-				discoveryResultType := omit	
-
+				}
 			};
 	
-    		template (value) RequestPrimitive m_createContainer(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_resourceName) := {
-    			operation := int1,
-    			to_ := f_addPrefix(p_parentResourceAddress),
-    			from_ := PX_AE_ID_STEM,
-    			requestIdentifier := "m_createContainer" & f_rnd(1, 1000000),
-    			resourceType := int3,
-    			primitiveContent := {
-    				any_1 := {{Container_optional := m_contentCreateContainer}}
-    			},
-				role := omit,
-				originatingTimestamp := omit,
-				requestExpirationTimestamp := omit,
-				resultExpirationTimestamp := omit,
-				operationExecutionTime := omit,
-				responseType := omit,
-				resultPersistence := omit,
-				resultContent := omit,
-				eventCategory := omit,
-				deliveryAggregation := omit,
-				groupRequestIdentifier := omit,
-				filterCriteria := omit,
-				discoveryResultType := omit	
-
-    		};
+			template (value) RequestPrimitive m_createContainer(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_resourceName) modifies m_create := {
+				to_ := p_parentResourceAddress,
+				from_ := PX_AE_ID_STEM,
+				requestIdentifier := "m_createContainer" & f_rnd(1, 1000000),
+				resourceType := int3,
+				primitiveContent := {
+					any_1 := {{Container_optional := m_contentCreateContainer}}
+				}
+			};
         	
-    		template (value) RequestPrimitive m_createContentInstance(XSD.ID p_parentResourceAddress, XSD.String p_primitiveContent) := {
-    			operation := int1,
-    			to_ := f_addPrefix(p_parentResourceAddress),
-    			from_ := "admin:admin",
-    			requestIdentifier := "m_createContentInstance" & f_rnd(1, 1000000),
-    			resourceType := int4,
-    			primitiveContent := {
-    				any_1 := {{ContentInstance_optional := m_contentCreateContentInstance(p_primitiveContent)}}	
-    			},
-				role := omit,
-				originatingTimestamp := omit,
-				requestExpirationTimestamp := omit,
-				resultExpirationTimestamp := omit,
-				operationExecutionTime := omit,
-				responseType := omit,
-				resultPersistence := omit,
-				resultContent := omit,
-				eventCategory := omit,
-				deliveryAggregation := omit,
-				groupRequestIdentifier := omit,
-				filterCriteria := omit,
-				discoveryResultType := omit	
-
-    		};
+			template (value) RequestPrimitive m_createContentInstance(XSD.ID p_parentResourceAddress, XSD.String p_primitiveContent) modifies m_create := {
+				to_ := p_parentResourceAddress,
+				from_ := "admin:admin",
+				requestIdentifier := "m_createContentInstance" & f_rnd(1, 1000000),
+				resourceType := int4,
+				primitiveContent := {
+					any_1 := {{ContentInstance_optional := m_contentCreateContentInstance(p_primitiveContent)}}	
+				}
+			};
     		
        	
 			/**
 			 * @desc Base CREATE request primitive for Group resource
 			 */
-			template (value) RequestPrimitive m_createGroupBase := {
-				operation := int1,
-				to_ := "NotInitialized",
-				from_ := "NotInitialized",
+			template (value) RequestPrimitive m_createGroupBase modifies m_create := {
 				requestIdentifier := "m_createGroup" & f_rnd(1, 1000000),
 				resourceType := int9,
 				primitiveContent := {
 					any_1 := {{Group_optional := m_contentCreateGroup (1, {"/" & PX_CSE_NAME & "/" & "NotInitialized"}, omit)}}	//TODO: p_resourceId
-				},
-				role := omit,
-				originatingTimestamp := omit,
-				requestExpirationTimestamp := omit,
-				resultExpirationTimestamp := omit,
-				operationExecutionTime := omit,
-				responseType := omit,
-				resultPersistence := omit,
-				resultContent := omit,
-				eventCategory := omit,
-				deliveryAggregation := omit,
-				groupRequestIdentifier := omit,
-				filterCriteria := omit,
-				discoveryResultType := omit	
-
-				};
+				}
+			};
         	
-        	template (value) RequestPrimitive m_createGroup(XSD.ID p_parentResourceAddress, in template (omit)  XSD.String p_name, in template (omit) AcpType p_accessControlPolicyIDs, in template (value) XSD.AnyURI p_memberId ) := {
-        		operation := int1,
-        		to_ := f_addPrefix(p_parentResourceAddress),
-        		from_ := PX_AE_ID_STEM,
-        		requestIdentifier := "m_createGroup" & f_rnd(1, 1000000),
-        		resourceType := int9,
-        		primitiveContent := {
-        			any_1 := {{Group_optional := m_contentCreateGroup (1, {"/" & PX_CSE_NAME & "/" & valueof(p_memberId)}, p_accessControlPolicyIDs)}}	//TODO: p_resourceId
-        		},
-				role := omit,
-				originatingTimestamp := omit,
-				requestExpirationTimestamp := omit,
-				resultExpirationTimestamp := omit,
-				operationExecutionTime := omit,
-				responseType := omit,
-				resultPersistence := omit,
-				resultContent := omit,
-				eventCategory := omit,
-				deliveryAggregation := omit,
-				groupRequestIdentifier := omit,
-				filterCriteria := omit,
-				discoveryResultType := omit	
-
-        	};
+			template (value) RequestPrimitive m_createGroup(XSD.ID p_parentResourceAddress, in template (omit)  XSD.String p_name, in template (omit) AcpType p_accessControlPolicyIDs, in template (value) XSD.AnyURI p_memberId ) modifies m_create := {
+				to_ := p_parentResourceAddress,
+				from_ := PX_AE_ID_STEM,
+				requestIdentifier := "m_createGroup" & f_rnd(1, 1000000),
+				resourceType := int9,
+				primitiveContent := {
+					any_1 := {{Group_optional := m_contentCreateGroup (1, {"/" & PX_CSE_NAME & "/" & valueof(p_memberId)}, p_accessControlPolicyIDs)}}	//TODO: p_resourceId
+				}
+			};
         	
        	
 			/**
 			 * @desc Base CREATE request primitive for PollingChannel resource
 			 */
-			template (value) RequestPrimitive m_createPollingChannelBase := {
-				operation := int1,
-				to_ := "NotInitialized",
-				from_ := "NotInitialized",
+			template (value) RequestPrimitive m_createPollingChannelBase modifies m_create := {
 				requestIdentifier := "m_createPollingChannel" & f_rnd(1, 1000000),
 				resourceType := int15,
 				primitiveContent := {
-					any_1 := {{PollingChannel_optional := m_contentCreatePollingChannel (omit)}}	
-				},
-				role := omit,
-				originatingTimestamp := omit,
-				requestExpirationTimestamp := omit,
-				resultExpirationTimestamp := omit,
-				operationExecutionTime := omit,
-				responseType := omit,
-				resultPersistence := omit,
-				resultContent := omit,
-				eventCategory := omit,
-				deliveryAggregation := omit,
-				groupRequestIdentifier := omit,
-				filterCriteria := omit,
-				discoveryResultType := omit	
-
-				};
+					any_1 := {{PollingChannel_optional := m_contentCreatePollingChannel (-)}}	
+				}
+			};
         	
-        	template (value) RequestPrimitive m_createPollingChannel(XSD.ID p_parentResourceAddress, in template (value)XSD.ID p_originatorId, in template (omit) AcpType p_accessControlPolicyIDs ) := {
-        		operation := int1,
-        		to_ := f_addPrefix(p_parentResourceAddress),
-        		from_ := p_originatorId,
-        		requestIdentifier := "m_createPollingChannel" & f_rnd(1, 1000000),
-        		resourceType := int15,
-        		primitiveContent := {
-        			any_1 := {{PollingChannel_optional := m_contentCreatePollingChannel (p_accessControlPolicyIDs)}}	
-        		},
-				role := omit,
-				originatingTimestamp := omit,
-				requestExpirationTimestamp := omit,
-				resultExpirationTimestamp := omit,
-				operationExecutionTime := omit,
-				responseType := omit,
-				resultPersistence := omit,
-				resultContent := omit,
-				eventCategory := omit,
-				deliveryAggregation := omit,
-				groupRequestIdentifier := omit,
-				filterCriteria := omit,
-				discoveryResultType := omit	
-
-        	};
+			template (value) RequestPrimitive m_createPollingChannel(XSD.ID p_parentResourceAddress, in template (value)XSD.ID p_originatorId, in template (omit) AcpType p_accessControlPolicyIDs ) modifies m_create := {
+				to_ := p_parentResourceAddress,
+				from_ := p_originatorId,
+				requestIdentifier := "m_createPollingChannel" & f_rnd(1, 1000000),
+				resourceType := int15,
+				primitiveContent := {
+					any_1 := {{PollingChannel_optional := m_contentCreatePollingChannel ()}}	
+				}
+			};
         	
 			/**
 			 * @desc Base CREATE request primitive for Schedule resource
 			 */
-        	template (value) RequestPrimitive m_createScheduleBase := {
-        		operation := int1,
-        		to_ := "NotInitialized",
-        		from_ := "NotInitialized",
-        		requestIdentifier := "m_createSchedule" & f_rnd(1, 1000000),
-        		resourceType := int18,
-        		primitiveContent := {
-        			any_1 := {{Schedule_optional := m_contentCreateSchedule ({{"0,0,0 1 2,1,1,*"}})}}	
-        		},
-				role := omit,
-        		originatingTimestamp := omit,
-        		requestExpirationTimestamp := omit,
-        		resultExpirationTimestamp := omit,
-        		operationExecutionTime := omit,
-        		responseType := omit,
-        		resultPersistence := omit,
-        		resultContent := omit,
-        		eventCategory := omit,
-        		deliveryAggregation := omit,
-        		groupRequestIdentifier := omit,
-        		filterCriteria := omit,
-        		discoveryResultType := omit	
-        
-        	};
+			template (value) RequestPrimitive m_createScheduleBase modifies m_create := {
+				requestIdentifier := "m_createSchedule" & f_rnd(1, 1000000),
+				resourceType := int18,
+				primitiveContent := {
+					any_1 := {{Schedule_optional := m_contentCreateSchedule ({{"0,0,0 1 2,1,1,*"}})}}	
+				}
+			};
         	
-        	template (value) RequestPrimitive m_createSchedule(XSD.ID p_parentResourceAddress, in template (omit)  XSD.String p_name, in template (value) ScheduleEntries p_scheduleElement ) := {
-        		operation := int1,
-        		to_ := f_addPrefix(p_parentResourceAddress),
-        		from_ := PX_AE_ID_STEM,
-        		requestIdentifier := "m_createSchedule" & f_rnd(1, 1000000),
-        		resourceType := int18,
-        		primitiveContent := {
-        			any_1 := {{Schedule_optional := m_contentCreateSchedule (p_scheduleElement)}}	
-        		},
-				role := omit,
-				originatingTimestamp := omit,
-				requestExpirationTimestamp := omit,
-				resultExpirationTimestamp := omit,
-				operationExecutionTime := omit,
-				responseType := omit,
-				resultPersistence := omit,
-				resultContent := omit,
-				eventCategory := omit,
-				deliveryAggregation := omit,
-				groupRequestIdentifier := omit,
-				filterCriteria := omit,
-				discoveryResultType := omit	
-
-        	};
+			template (value) RequestPrimitive m_createSchedule(XSD.ID p_parentResourceAddress, in template (omit)  XSD.String p_name, in template (value) ScheduleEntries p_scheduleElement ) modifies m_create := {
+				to_ := p_parentResourceAddress,
+				from_ := PX_AE_ID_STEM,
+				requestIdentifier := "m_createSchedule" & f_rnd(1, 1000000),
+				resourceType := int18,
+				primitiveContent := {
+					any_1 := {{Schedule_optional := m_contentCreateSchedule (p_scheduleElement)}}	
+				}
+			};
         	
 			//Added by @Naum
-			template (value) RequestPrimitive m_createServiceSubscribedAppRule (in ListOfM2MID p_applicableCredIDs, in ListOfM2MID p_allowedApp_IDs, in ListOfM2MID p_allowedAEs) := {
-				operation := int1,
-				to_ := "NotInitialized",
+			template (value) RequestPrimitive m_createServiceSubscribedAppRule (in ListOfM2MID p_applicableCredIDs, in ListOfM2MID p_allowedApp_IDs, in ListOfM2MID p_allowedAEs) modifies m_create := {
 				from_ := PX_AE_ID_STEM,
-				requestIdentifier := "m_createCSE" & f_rnd(1, 1000000),
-				resourceType := int1,
+				requestIdentifier := "m_createServiceSubscribedAppRule" & f_rnd(1, 1000000),
+				resourceType := int19,//FIXME Is this the correct value?
 				primitiveContent := {
 					any_1 := {{ServiceSubscribedAppRule_optional := m_contentCreateServiceSubscribedAppRule (p_applicableCredIDs, p_allowedApp_IDs, p_allowedAEs)}}
-				},
-				role := omit,
-				originatingTimestamp := omit,
-				requestExpirationTimestamp := omit,
-				resultExpirationTimestamp := omit,
-				operationExecutionTime := omit,
-				responseType := omit,
-				resultPersistence := omit,
-				resultContent := omit,
-				eventCategory := omit,
-				deliveryAggregation := omit,
-				groupRequestIdentifier := omit,
-				filterCriteria := omit,
-				discoveryResultType := omit	
-
+				}
 			};
         	
        	
 			/**
 			 * @desc Base CREATE request primitive for Subscription resource
 			 */
-			template (value) RequestPrimitive m_createSubscriptionBase := {
-				operation := int1,
-				to_ := "NotInitialized",
-				from_ := "NotInitialized",
+			template (value) RequestPrimitive m_createSubscriptionBase modifies m_create := {
 				requestIdentifier := "m_createSubscription" & f_rnd(1, 1000000),
 				resourceType := int23,
 				primitiveContent := {
 					any_1 := {{Subscription_optional := m_contentCreateSubscription ({"Not Initialized"})}}	
-				},
-				role := omit,
-				originatingTimestamp := omit,
-				requestExpirationTimestamp := omit,
-				resultExpirationTimestamp := omit,
-				operationExecutionTime := omit,
-				responseType := omit,
-				resultPersistence := omit,
-				resultContent := omit,
-				eventCategory := omit,
-				deliveryAggregation := omit,
-				groupRequestIdentifier := omit,
-				filterCriteria := omit,
-				discoveryResultType := omit	
-
+				}
 			};
         	
-        	template (value) RequestPrimitive m_createSubscription(XSD.ID p_parentResourceAddress, in template (omit)  XSD.String p_name, in template (value) ListOfURIs p_notificationURI ) := {
-        		operation := int1,
-        		to_ := f_addPrefix(p_parentResourceAddress),
-        		from_ := PX_AE_ID_STEM,
-        		requestIdentifier := "m_createSubscription" & f_rnd(1, 1000000),
-        		resourceType := int23,
-        		primitiveContent := {
-					any_1 := {{Subscription_optional := m_contentCreateSubscription (p_notificationURI)}}	
-        		},
-				role := omit,
-				originatingTimestamp := omit,
-				requestExpirationTimestamp := omit,
-				resultExpirationTimestamp := omit,
-				operationExecutionTime := omit,
-				responseType := omit,
-				resultPersistence := omit,
-				resultContent := omit,
-				eventCategory := omit,
-				deliveryAggregation := omit,
-				groupRequestIdentifier := omit,
-				filterCriteria := omit,
-				discoveryResultType := omit	
-
-        	};
+			template (value) RequestPrimitive m_createSubscription(XSD.ID p_parentResourceAddress, in template (omit)  XSD.String p_name, in template (value) ListOfURIs p_notificationURI := {"NotInitialized"}) modifies m_create := {
+				to_ := p_parentResourceAddress,
+				from_ := PX_AE_ID_STEM,
+				requestIdentifier := "m_createSubscription" & f_rnd(1, 1000000),
+				resourceType := int23,
+				primitiveContent := {
+					any_1 := {{Subscription_optional := m_contentCreateSubscription (p_notificationURI, p_name)}}	
+				}
+			};
+        	
+			template (value) RequestPrimitive m_createSubscriptionAdvanced(	XSD.ID p_parentResourceAddress, 
+																		   in template (omit)  XSD.String p_name := omit,
+																		   in template (value) ListOfURIs p_notificationURI,
+																		   in template (omit) EventNotificationCriteria p_eventNotificationCriteria := omit,
+																		   in template (omit) XSD.PositiveInteger p_expirationCounter := omit,
+																		   in template (omit) BatchNotify p_batchNotify := omit,
+																		   in template (omit) XSD.Boolean p_latestNotify := omit,
+																		   in template (omit) XSD.AnyURI p_subscriberURI := omit,
+																		   in template (omit) NotificationContentType p_notificationContentType := int1) modifies m_createSubscription := {
+				primitiveContent := {
+					any_1 := {{Subscription_optional := m_contentCreateSubscriptionAdvanced (p_notificationURI, p_name, p_eventNotificationCriteria, p_expirationCounter, p_batchNotify, p_latestNotify, p_subscriberURI, p_notificationContentType)}}	
+				}
+			};
+        	
+			//@Martin
+			template (value) RequestPrimitive m_createLocationPolicy(in template (value) LocationSource locationSource, in template (omit) AcpType p_accessControlPolicyIDs, in template (omit) XSD.Duration locationUpdatePeriod, in template (omit) NodeID locationTargetID, in template (omit) XSD.AnyURI locationServerAddress) modifies m_create := {
+				requestIdentifier	:= "m_createLocationPolicy" & f_rnd(1, 1000000), //the requestIdentifier is supposed to be set similar as "C190XX7T/001"  by prepending the AE-ID-Stem and slash(‘/’) in front of it
+				resourceType		:= int10,
+				primitiveContent	:= {        	    
+							any_1 := {{ LocationPolicy_optional := m_contentCreateLocationPolicy(locationSource, p_accessControlPolicyIDs, locationUpdatePeriod, locationTargetID, locationServerAddress) }}
+				},
+				resultContent := int1//default
+			};
+			//@Martin
+			template (value) RequestPrimitive m_createNotification(in template (value) Representation resourcePresentation, in template (omit)NotificationEventType notifEventType, in template (omit) XSD.AnyURI subscriptionReference, in template (omit) XSD.AnyURI notifForwardingURI) modifies m_create := {
+			  requestIdentifier	:= "m_createNotification" & f_rnd(1, 1000000),
+			  primitiveContent	:= {	
+							any_1 :=	{{ Notification := m_contentCreateNotification(resourcePresentation, notifEventType, subscriptionReference, notifForwardingURI)}}        	    
+			  },
+			  resultContent		:= int1 //default
+        	  
+			};
         	
-        	//@Martin
-        	template (value) RequestPrimitive m_createLocationPolicy(XSD.ID p_parentResourceAddress, in template (omit) AcpType p_accessControlPolicyIDs, in template (omit) XSD.Duration locationUpdatePeriod, in template (omit) NodeID locationTargetID, in template (omit) XSD.AnyURI locationServerAddress) := {
-        	  	operation 			:= int1,  //create
-        	  	to_ 				:= p_parentResourceAddress,
-        	  	from_				:= PX_AE_ID_STEM, //AE originator id e.g.
-        	  	requestIdentifier	:= "m_createLocationPolicy", //the requestIdentifier is supposed to be set similar as "C190XX7T/001"  by prepending the AE-ID-Stem and slash(‘/’) in front of it
-        	  	resourceType		:= int10,
-        	  	primitiveContent	:= {        	    
-        	    			any_1 := {{ LocationPolicy_optional := m_contentCreateLocationPolicy(p_accessControlPolicyIDs, locationUpdatePeriod, locationTargetID, locationServerAddress) }}
-        	  },
-        	  	role := omit,
-			  	originatingTimestamp := omit,
-			  	requestExpirationTimestamp := omit,
-				resultExpirationTimestamp := omit,
-				operationExecutionTime := omit,
-				responseType := omit,
-				resultPersistence := omit,
-				resultContent := int1,//default
-				eventCategory := omit,
-				deliveryAggregation := omit,
-				groupRequestIdentifier := omit,
-				filterCriteria := omit,
-				discoveryResultType := omit	        	  
-        	};
         	
-    	}//end group Create
+		}//end group Create
     	
-    	group Delete {
+		group Delete {
     	
-        	template (value) RequestPrimitive m_deleteRequest(XSD.ID p_resourceAddress) := {
-        		operation := int4,
-        		to_ := f_addPrefix(p_resourceAddress),
-        		from_ := PX_AE_ID_STEM,
-        		requestIdentifier := "m_deleteAe" & f_rnd(1, 1000000),
-        		resourceType := omit,
-        		primitiveContent := omit, 
-        		role := omit,
+			template (value) RequestPrimitive m_deleteRequest(XSD.ID p_resourceAddress) := {
+				operation := int4,
+				to_ := p_resourceAddress,
+				from_ := PX_SUPER_USER,
+				requestIdentifier := "m_deleteResource" & f_rnd(1, 1000000),
+				resourceType := omit,
+				primitiveContent := omit, 
+				role := omit, 
 				originatingTimestamp := omit,
 				requestExpirationTimestamp := omit,
 				resultExpirationTimestamp := omit,
@@ -933,9 +615,8 @@ module OneM2M_Templates {
 				deliveryAggregation := omit,
 				groupRequestIdentifier := omit,
 				filterCriteria := omit,
-				discoveryResultType := omit	
-
-        	};
+				discoveryResultType := omit
+			};
         	
 			template (value) RequestPrimitive m_delete(XSD.ID p_resourceAddress) := {
 				operation := int4,
@@ -944,7 +625,7 @@ module OneM2M_Templates {
 				requestIdentifier := "m_deleteAe" & f_rnd(1, 1000000),
 				resourceType := omit,
 				primitiveContent := omit, 
-				role := omit,
+				role := omit, 
 				originatingTimestamp := omit,
 				requestExpirationTimestamp := omit,
 				resultExpirationTimestamp := omit,
@@ -956,26 +637,93 @@ module OneM2M_Templates {
 				deliveryAggregation := omit,
 				groupRequestIdentifier := omit,
 				filterCriteria := omit,
-				discoveryResultType := omit	
+				discoveryResultType := omit
 
 			};
         	
-    	}//end group Delete
+		}//end group Delete
+    	
+		group Notify {
+    		
+			/**
+			 * @desc Base NOTIFY request primitive
+			 */
+			template RequestPrimitive mw_notifyBase := {
+				operation := int5,
+				to_ := ?,
+				from_ := *,
+				requestIdentifier := ?,
+				resourceType := *,
+				primitiveContent := { any_1 := {{ Notification := mw_contentNotificationBase}} },
+				role := *,
+				originatingTimestamp := *,
+				requestExpirationTimestamp := *,
+				resultExpirationTimestamp := *,
+				operationExecutionTime := *,
+				responseType := *,
+				resultPersistence := *,
+				resultContent := *,
+				eventCategory := *,
+				deliveryAggregation := *,
+				groupRequestIdentifier := *,
+				filterCriteria := *,
+				discoveryResultType := *
+			};
+			
+			/**
+			 * @desc Base NOTIFY request primitive
+			 */
+			template RequestPrimitive mw_aggregatedNotifyBase := {
+				operation := int5,
+				to_ := ?,
+				from_ := *,
+				requestIdentifier := ?,
+				resourceType := *,
+				primitiveContent := { any_1 := {{ AggregatedNotification := ?}} },
+				role := *,
+				originatingTimestamp := *,
+				requestExpirationTimestamp := *,
+				resultExpirationTimestamp := *,
+				operationExecutionTime := *,
+				responseType := *,
+				resultPersistence := *,
+				resultContent := *,
+				eventCategory := *,
+				deliveryAggregation := *,
+				groupRequestIdentifier := *,
+				filterCriteria := *,
+				discoveryResultType := *
+			};
+			
+			/**
+			 * @desc Base NOTIFY request primitive
+			 */
+			
+			template RequestPrimitive mw_notify(in template Notification p_notification) modifies mw_notifyBase := {
+				primitiveContent := { 
+					any_1 := {{ Notification := p_notification}}
+				}
+			};
+			
+
+			
+    		
+		}//end of group Notify
 	}//end group RequestPrimitives
 	
 	group ContentCreate {
 		
 
 			template (value) AEAnnc_optional mw_contentCreateAEannc (in template (omit)  XSD.String p_name, in template (omit) AcpType p_accessControlPolicyIDs, XSD.ID p_appId := PX_APP_ID) := {
-    		resourceName := p_name,//O
-    		resourceType := omit,//NP
-    		resourceID := omit,//NP
-    		parentID := omit,//NP
-    		creationTime := omit,//NP
-    		lastModifiedTime := omit,//NP
-    		labels := omit,//O
-    		accessControlPolicyIDs := p_accessControlPolicyIDs,//O
-    		expirationTime := omit,//O
+			resourceName := p_name,//O
+			resourceType := omit,//NP
+			resourceID := omit,//NP
+			parentID := omit,//NP
+			creationTime := omit,//NP
+			lastModifiedTime := omit,//NP
+			labels := omit,//O
+			accessControlPolicyIDs := p_accessControlPolicyIDs,//O
+			expirationTime := omit,//O
 			link := omit,//O
 			appName := omit,//O
 			app_ID := p_appId,//M
@@ -988,12 +736,12 @@ module OneM2M_Templates {
 			choice := omit//NP
 		};	
 		
-    	/**
-    	 * @desc Base primitiveContent for CREATE operation for AE resource
-    	 * @param p_name Resource name
-    	 * @param p_accessControlPolicyIDs ACP IDs for the AE
-    	 */
-    	template (value) AE_optional m_contentCreateAe (in template (omit) AcpType p_accessControlPolicyIDs, in template (omit)  XSD.String p_name := c_defaultResourceName, in template (omit) XSD.ID p_appId := PX_APP_ID) := {
+		/**
+		 * @desc Base primitiveContent for CREATE operation for AE resource
+		 * @param p_name Resource name
+		 * @param p_accessControlPolicyIDs ACP IDs for the AE
+		 */
+		template (value) AE_optional m_contentCreateAe (in template (omit) AcpType p_accessControlPolicyIDs, in template (omit)  XSD.String p_name := c_defaultResourceName, in template (omit) XSD.ID p_appId := PX_APP_ID, in template (omit) PoaList p_poaList) := {
 
 			resourceName := p_name,//O
 			resourceType := omit,//NP
@@ -1004,26 +752,26 @@ module OneM2M_Templates {
 			labels := omit,//O
 			accessControlPolicyIDs := p_accessControlPolicyIDs,//O
 			expirationTime := omit,//O
-    		announceTo := omit,//O
-    		announcedAttribute := omit,//O
-    		appName := omit,//O
+			announceTo := omit,//O
+			announcedAttribute := omit,//O
+			appName := omit,//O
 			app_ID := p_appId,//M
-    		aE_ID := omit,//NP
-    		pointOfAccess := omit, //O {"http://127.0.0.1:1400/monitor"},//{"http://192.168.1.92:18080/notifications/AE"}, // TODO: Check this => AE PoA
-    		ontologyRef := omit,//O
-    		nodeLink := omit,//NP
-    		requestReachability := true,//M
-    		contentSerialization := omit,//O
-    		choice := omit//NP
-    	};	
+			aE_ID := omit,//NP
+			pointOfAccess := p_poaList, //O {"http://127.0.0.1:1400/monitor"},//{"http://192.168.1.92:18080/notifications/AE"}, // TODO: Check this => AE PoA
+			ontologyRef := omit,//O
+			nodeLink := omit,//NP
+			requestReachability := true,//M
+			contentSerialization := omit,//O
+			choice := omit//NP
+		};	
     	
-    	/**
-    	 * @desc Base primitiveContent for CREATE operation for AccessControlPolicy resource
-    	 * @param p_name Resource name
-    	 * @param p_acor Allowed originators
-    	 * @param p_allowedOperations Allowed operations
-    	 */
-    	template (value) AccessControlPolicy_optional m_contentCreateAcp (in template (omit) ResourceName p_name := c_defaultResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63 ) := {
+		/**
+		 * @desc Base primitiveContent for CREATE operation for AccessControlPolicy resource
+		 * @param p_name Resource name
+		 * @param p_acor Allowed originators
+		 * @param p_allowedOperations Allowed operations
+		 */
+		template (value) AccessControlPolicy_optional m_contentCreateAcp (in template (omit) XSD.String p_name := c_defaultResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63 ) := {
 			resourceName := p_name,//O
 			resourceType := omit,//NP
 			resourceID := omit,//NP
@@ -1035,25 +783,19 @@ module OneM2M_Templates {
 			announceTo := omit,//O
 			announcedAttribute := omit,//O
 			privileges := {
-				accessControlRule_list := {
-					{
-						accessControlOriginators := p_acor,//{"*"},//{PX_AE_ID_STEM}, //{"admin:admin"},
-						accessControlOperations := p_allowedOperations,
-						accessControlContexts_list := {}
-					}
-				}
+				accessControlRule_list := {valueof(m_createAcr(p_acor, p_allowedOperations))}
 			},//M
 			selfPrivileges := {
-				accessControlRule_list := {
-					{
-						accessControlOriginators := p_acor, //{"*"},//{PX_AE_ID_STEM}, //{"admin:admin"},
-						accessControlOperations := int63,
-						accessControlContexts_list := {}
-					}
-				}
+				accessControlRule_list := {valueof(m_createAcr(p_acor, int63))}
 			},//M
 			choice := omit //NP
 		};
+		
+		template (value) AccessControlRule m_createAcr (in template (value) ListOfURIs p_acor, in template (value) AccessControlOperations p_allowedOperations) := {
+			accessControlOriginators := p_acor,//{"*"},//{PX_AE_ID_STEM}, //{"admin:admin"},
+			accessControlOperations := p_allowedOperations,
+			accessControlContexts_list := {}
+		}
     	
 		//added by @Naum
 		template (value) CSEBase_optional m_contentCreateCSEBase (in ServiceSubscribedAppRule p_serviceSubscribedAppRule) := {
@@ -1070,7 +812,6 @@ module OneM2M_Templates {
 			supportedResourceType := omit,
 			pointOfAccess := omit,
 			nodeLink := omit,
-    		
 			choice := {
 				choice_list := {{
 				  serviceSubscribedAppRule := p_serviceSubscribedAppRule
@@ -1078,16 +819,16 @@ module OneM2M_Templates {
 			}
 		}
     	
-    	/**
-    	 * @desc Base primitiveContent for CREATE operation for Group resource
-    	 * @param p_maxNrOfMembers Max number of members
-    	 * @param p_memberIds Member IDs
-    	 * @param p_accessControlPolicyIDs ACP IDs for the Group
-    	 * @param p_name Resource name
-    	 */
-    	template (value) Group_optional m_contentCreateGroup (	in template (value) XSD.NonNegativeInteger p_maxNrOfMembers,
-    															in template (value) ListOfURIs p_memberIds,
-    															in template (omit) AcpType p_accessControlPolicyIDs,
+		/**
+		 * @desc Base primitiveContent for CREATE operation for Group resource
+		 * @param p_maxNrOfMembers Max number of members
+		 * @param p_memberIds Member IDs
+		 * @param p_accessControlPolicyIDs ACP IDs for the Group
+		 * @param p_name Resource name
+		 */
+		template (value) Group_optional m_contentCreateGroup (	in template (value) XSD.NonNegativeInteger p_maxNrOfMembers,
+																in template (value) ListOfURIs p_memberIds,
+																in template (omit) AcpType p_accessControlPolicyIDs,
 																in template (omit) XSD.String p_name := c_defaultResourceName) := {
 			resourceName := p_name,//O
 			resourceType := omit,//NP
@@ -1101,7 +842,7 @@ module OneM2M_Templates {
 			announceTo := omit,//O
 			announcedAttribute := omit,//O
 			creator := omit,//O
-			memberType := int2,//TODO: To be set to omit //O
+			memberType := omit,//O
 			currentNrOfMembers := omit,//NP
 			maxNrOfMembers := p_maxNrOfMembers,//M
 			memberIDs := p_memberIds,//M
@@ -1110,31 +851,30 @@ module OneM2M_Templates {
 			consistencyStrategy := omit,//O
 			groupName := omit,//O
 			choice := omit//NP
-    	};    	
+		};    	
     	
-    	/**
-    	 * @desc Base primitiveContent for CREATE operation for PollingChannel resource
-    	 * @param p_accessControlPolicyIDs ACP IDs for the PollingChannel
-    	 * @param p_name Resource name
-    	 */
-    	template (value) PollingChannel_optional m_contentCreatePollingChannel (in template (omit) AcpType p_accessControlPolicyIDs, 
-																				in template (omit) XSD.String p_name := c_defaultResourceName) := {
+		/**
+		 * @desc Base primitiveContent for CREATE operation for PollingChannel resource
+		 * @param p_accessControlPolicyIDs ACP IDs for the PollingChannel
+		 * @param p_name Resource name
+		 */
+		template (value) PollingChannel_optional m_contentCreatePollingChannel (in template (omit) XSD.String p_name := c_defaultResourceName) := {
 			resourceName := p_name,//O
-            resourceType := omit,//NP
-            resourceID := omit,//NP
-            parentID := omit,//NP
-            creationTime := omit,//NP
-            lastModifiedTime := omit,//NP
-            labels := omit,//O
-            expirationTime := omit//O
-    	};    	
+			resourceType := omit,//NP
+			resourceID := omit,//NP
+			parentID := omit,//NP
+			creationTime := omit,//NP
+			lastModifiedTime := omit,//NP
+			labels := omit,//O
+			expirationTime := omit//O
+		};    	
     	
-    	/**
-    	 * @desc Base primitiveContent for CREATE operation for Schedule resource
-    	 * @param p_scheduleElement Schedule
-    	 * @param p_name Resource name
-    	 */
-    	template (value) Schedule_optional m_contentCreateSchedule (in template (value) ScheduleEntries p_scheduleElement,
+		/**
+		 * @desc Base primitiveContent for CREATE operation for Schedule resource
+		 * @param p_scheduleElement Schedule
+		 * @param p_name Resource name
+		 */
+		template (value) Schedule_optional m_contentCreateSchedule (in template (value) ScheduleEntries p_scheduleElement,
 																	in template (omit) XSD.String p_name := c_defaultResourceName) := {
 			resourceName := p_name,//O
 			resourceType := omit,//NP
@@ -1148,33 +888,33 @@ module OneM2M_Templates {
 			announcedAttribute := omit,//O
 			scheduleElement := p_scheduleElement,//M
 			choice := omit//NP
-    	};    	
+		};    	
     	
 		template (value) ServiceSubscribedAppRule_optional m_contentCreateServiceSubscribedAppRule (in ListOfM2MID p_applicableCredIDs, in ListOfM2MID p_allowedApp_IDs, in ListOfM2MID p_allowedAEs) := {
-		  	resourceName := omit,
-			resourceType := omit,
-			resourceID := omit,
-			parentID := omit,
-			creationTime := omit,
-			lastModifiedTime := omit,
-			labels := omit,
-			accessControlPolicyIDs := omit,
-			expirationTime := omit,
-			applicableCredIDs := p_applicableCredIDs,
-			allowedApp_IDs := p_allowedApp_IDs,
-			allowedAEs := p_allowedAEs,
-			choice := omit
+			resourceName := omit,//TODO TS-0004 7.4.29.1 2 Missing attribute
+			resourceType := omit,//NP
+			resourceID := omit,//NP
+			parentID := omit,//NP
+			creationTime := omit,//NP
+			lastModifiedTime := omit,//NP
+			labels := omit,//O
+			accessControlPolicyIDs := omit,//O
+			expirationTime := omit,//O
+			applicableCredIDs := p_applicableCredIDs,//O
+			allowedApp_IDs := p_allowedApp_IDs,//O
+			allowedAEs := p_allowedAEs,//O
+			choice := omit //O
 		}
     	
 
-    	/**
-    	 * @desc Base primitiveContent for CREATE operation for Subscription resource
-    	 * @param p_notificationURI Notification URI
-    	 * @param p_name Resource name
-    	 */
-    	template (value) Subscription_optional m_contentCreateSubscription (in template (value) ListOfURIs p_notificationURI,
+		/**
+		 * @desc Base primitiveContent for CREATE operation for Subscription resource
+		 * @param p_notificationURI Notification URI
+		 * @param p_name Resource name
+		 */
+		template (value) Subscription_optional m_contentCreateSubscription (in template (value) ListOfURIs p_notificationURI,
 																			in template (omit) XSD.String p_name := c_defaultResourceName) := {
-			resourceName := c_defaultResourceName,//O
+			resourceName := p_name,//O
 			resourceType := omit,//NP
 			resourceID := omit,//NP
 			parentID := omit,//NP
@@ -1189,23 +929,65 @@ module OneM2M_Templates {
 			groupID := omit,//O
 			notificationForwardingURI := omit,//O
 			batchNotify := omit,//O
+			
 			rateLimit := omit,//O
 			preSubscriptionNotify := omit,//O
 			pendingNotification := omit,//O
 			notificationStoragePriority := omit,//O
 			latestNotify := omit,//O
-			notificationContentType := int1, //TODO Set to omit once xsd is fixed,//O
+			notificationContentType := omit, //O
 			notificationEventCat := omit,//O
 			creator := omit,//O
 			subscriberURI := omit,//O
 			choice := omit//NP
-    	};   	
+		};   	
+    	
+		template (value) Subscription_optional m_contentCreateSubscriptionAdvanced (in template (value) ListOfURIs p_notificationURI,
+																					in template (omit)  XSD.String p_name := c_defaultResourceName,
+																					in template (omit) EventNotificationCriteria p_eventNotificationCriteria,
+																					in template (omit) XSD.PositiveInteger p_expirationCounter,
+																					in template (omit) BatchNotify p_batchNotify,
+																					in template (omit) XSD.Boolean p_latestNotify,
+																					in template (omit) XSD.AnyURI p_subscriberURI,
+																					in template (omit) NotificationContentType p_notificationContentType) modifies m_contentCreateSubscription := {
+			eventNotificationCriteria := p_eventNotificationCriteria,//O
+			expirationCounter := p_expirationCounter,//O
+			batchNotify := p_batchNotify,//O
+			latestNotify := p_latestNotify,//O
+			notificationContentType := p_notificationContentType, //TODO Set to omit once xsd is fixed,//O
+			subscriberURI := p_subscriberURI//O
+		}; 
+		
+		template (value) EventNotificationCriteria m_eventNotificationCriteria ( in EventNotificationCriteria.notificationEventType_list p_notificationEventType_list := {}, in EventNotificationCriteria.attribute p_attribute_list := {}) := { //the parameter should be a list of NotificationEventTypeEventType
+			createdBefore := omit,
+			createdAfter := omit,
+			modifiedSince := omit,
+			unmodifiedSince := omit,
+			stateTagSmaller := omit,
+			stateTagBigger := omit,
+			expireBefore := omit,
+			expireAfter := omit,
+			sizeAbove := omit,
+			sizeBelow := omit,
+			operationMonitor_list := {},
+			attribute := p_attribute_list, // TODO this list should be able to be omited see 9.6.8 
+			notificationEventType_list := p_notificationEventType_list// TODO this list should be able to be omited see 9.6.8 (TS0001)
+		};
+        
+		template (value) BatchNotify m_batchNotifyNumber3Duration1 (in XSD.NonNegativeInteger p_number) := {
+			number := p_number,
+			duration := "PT1S" //TODO duration has to be set to 1s and match to the Duration regex 
+		};
+		//normaly duration can be omited
+		
+		
+         	
     	
-    	/**
-    	 * @desc Base primitiveContent for CREATE operation for ContentInstance resource
-    	 * @param p_primitiveContent Content for the ContentInstance
-    	 */
-    	template (value) ContentInstance_optional m_contentCreateContentInstance(XSD.String p_primitiveContent) := {
+		/**
+		 * @desc Base primitiveContent for CREATE operation for ContentInstance resource
+		 * @param p_primitiveContent Content for the ContentInstance
+		 */
+		template (value) ContentInstance_optional m_contentCreateContentInstance(XSD.String p_primitiveContent) := {
 			resourceName := c_defaultResourceName,//O
 			resourceType := omit,//NP
 			resourceID := omit,//NP
@@ -1225,14 +1007,14 @@ module OneM2M_Templates {
 				embed_values := {p_primitiveContent},
 				attr := omit,
 				elem_list := {}  
-			}//M
+			} //M
 		};
 		
-    	/**
-    	 * @desc Base primitiveContent for CREATE operation for Container resource
-    	 * @param p_name Resource name
-    	 */
-    	template (value) Container_optional m_contentCreateContainer (in template (omit) XSD.String p_name := c_defaultResourceName):= {
+		/**
+		 * @desc Base primitiveContent for CREATE operation for Container resource
+		 * @param p_name Resource name
+		 */
+		template (value) Container_optional m_contentCreateContainer (in template (omit) XSD.String p_name := c_defaultResourceName):= {
 			resourceName := p_name,//O
 			resourceType := omit,//NP
 			resourceID := omit,//NP
@@ -1254,31 +1036,51 @@ module OneM2M_Templates {
 			locationID := omit,//O
 			ontologyRef := omit,//O
 			choice := omit//NP
-    	};
+		};
     	
-    	//@Martin
-    	template (value) LocationPolicy_optional m_contentCreateLocationPolicy (in template (omit) AcpType p_accessControlPolicyIDs, in template (value) XSD.Duration locationUpdatePeriod, in template (value) NodeID locationTargetID, in template (value) XSD.AnyURI locationServerAddress) := {
-    	  	resourceName 			:= c_defaultResourceName, //O
-    	  	resourceType			:= omit, //NP
-    	    resourceID				:= omit, //NP
-    	    parentID				:= omit, //NP
-    	  	creationTime			:= omit, //NP
-    	  	lastModifiedTime		:= omit, //NP
-    	  	labels 					:= LABELS,//O
-    	  	accessControlPolicyIDs 	:= p_accessControlPolicyIDs, //O
-    	  	expirationTime 			:= omit, //O
-    	  	announceTo 				:= omit, 				   //O
-    	  	announcedAttribute		:= omit, 			      //O
-    		locationSource 			:= PX_LOCATION_SOURCE, //M
-    		locationUpdatePeriod 	:= locationUpdatePeriod, //O
-    		locationTargetID 		:= locationTargetID, 	//O
-    		locationServer 			:= locationServerAddress,//O
-    		locationContainerID		:= omit,    		   //NP
-    		locationContainerName 	:= PX_LOCATION_CONTAINER_NAME,//O    		
-    	  	locationStatus			:= omit,              //NP
-    	    choice 					:= omit  	         //NP
+		//@Martin
+		template (value) LocationPolicy_optional m_contentCreateLocationPolicy (in template (value) LocationSource locationSource, in template (omit) AcpType p_accessControlPolicyIDs, in template (value) XSD.Duration locationUpdatePeriod, in template (value) NodeID locationTargetID, in template (value) XSD.AnyURI locationServerAddress) := {
+			resourceName 				:= c_defaultResourceName, //O
+			resourceType				:= omit, //NP
+			resourceID					:= omit, //NP
+			parentID					:= omit, //NP
+			creationTime				:= omit, //NP
+			lastModifiedTime			:= omit, //NP
+			labels 						:= LABELS,//O
+			accessControlPolicyIDs 	:= p_accessControlPolicyIDs, //O
+			expirationTime 			:= omit, //O
+			announceTo 				:= omit, 				   //O
+			announcedAttribute		:= omit, 			      //O
+			locationSource 			:= locationSource, //M
+			locationUpdatePeriod 		:= locationUpdatePeriod, //O
+			locationTargetID 			:= locationTargetID, 	//O
+			locationServer 			:= locationServerAddress,//O
+			locationContainerID		:= omit,    		   //NP
+			locationContainerName 	:= PX_LOCATION_CONTAINER_NAME,//O    		
+			locationStatus				:= omit,              //NP
+			choice 					:= omit  	         //NP
     	   	  	
-    	};
+		};
+    	
+		//@Martin
+		template (value) Notification m_contentCreateNotification (in template (value) Representation p_resourcePresentation, 
+																	in template (omit) NotificationEventType p_notifEventType, 
+																	in template (omit) XSD.AnyURI p_subReference, 
+																	in template (omit) XSD.AnyURI p_notifForwardingURI) := {
+		  notificationEvent := {
+			representation := p_resourcePresentation,
+			operationMonitor := {
+				operation := omit,
+				originator := omit
+			},
+			notificationEventType := p_notifEventType    	    
+		  },
+		  verificationRequest := omit,
+		  subscriptionDeletion := omit,
+		  subscriptionReference := p_subReference,
+		  creator := omit,
+		  notificationForwardingURI := p_notifForwardingURI
+		};
     	
 	}//end group ContentCreate
 	
@@ -1328,6 +1130,11 @@ module OneM2M_Templates {
 			selfPrivileges := omit,//O
 			choice := omit //NP
 		};
+		
+		template (value) AccessControlPolicy_optional m_contentUpdateAcpPrivileges(in template(omit) SetOfAcrs p_privileges, in template(omit) SetOfAcrs p_selfPrivileges) modifies m_contentUpdateAcp := {
+			privileges := p_privileges,//O
+			selfPrivileges := p_selfPrivileges//O
+		};
     	
 		/**
 		 * @desc Base primitiveContent for UPDATE operation for Group resource
@@ -1419,33 +1226,7 @@ module OneM2M_Templates {
 			subscriberURI := omit,//NP
 			choice := omit//NP
 		};
-		
-		/**
-		 * @desc Base primitiveContent for UPDATE operation for AE resource
-		 */
-		template (value) ContentInstance_optional m_contentUpdateContentInstance(XSD.String p_primitiveContent) := {
-			resourceName := omit,//NP
-			resourceType := omit,//NP
-			resourceID := omit,//NP
-			parentID := omit,//NP
-			creationTime := omit,//NP
-			lastModifiedTime := omit,//NP
-			labels := omit,//O
-			expirationTime := omit,//O
-			announceTo := omit,//O
-			announcedAttribute := omit,//O
-			stateTag := omit,//NP
-			creator := omit,//O
-			contentInfo := omit,//O
-			contentSize := omit,//NP
-			ontologyRef := omit,//O
-			content := { 
-				embed_values := {p_primitiveContent},
-				attr := omit,
-				elem_list := {}  
-			}//O
-		};
-		
+				
 		/**
 		 * @desc Base primitiveContent for UPDATE operation for Container resource
 		 */
@@ -1474,27 +1255,27 @@ module OneM2M_Templates {
 		};
 		
 		//@Martin
-    	template (value) LocationPolicy_optional m_contentUpdateLocationPolicy (in template (omit) AcpType p_accessControlPolicyIDs, in template (value) XSD.Duration locationUpdatePeriod) := {
-    	  	resourceName 			:= omit,//NP
-    	  	resourceType			:= omit,//NP
-    	    resourceID				:= omit,//NP
-    	    parentID				:= omit,//NP
-    	  	creationTime			:= omit,//NP
-    	  	lastModifiedTime		:= omit,//NP
-    	  	labels 					:= LABELS,//O
-    	  	accessControlPolicyIDs 	:= p_accessControlPolicyIDs,//O
-    	  	expirationTime 			:= omit,//O    	  	
-    	  	announceTo 				:= omit,//O
-    	  	announcedAttribute		:= omit,//O
-    		locationSource 			:= omit,//NP
-    		locationUpdatePeriod 	:= locationUpdatePeriod, //O
-    		locationTargetID 		:= omit, //NP
-    		locationServer 			:= omit, //NP
-    		locationContainerID		:= omit, //NP  
-    		locationContainerName 	:= PX_LOCATION_CONTAINER_NAME, //O    		 		
-    	  	locationStatus			:= omit, //NP
-    	    choice 					:= omit  //NP	   	  	
-    	};
+		template (value) LocationPolicy_optional m_contentUpdateLocationPolicy (in template (omit) AcpType p_accessControlPolicyIDs, in template (value) XSD.Duration locationUpdatePeriod) := {
+			resourceName 			:= omit,//NP
+			resourceType			:= omit,//NP
+			resourceID				:= omit,//NP
+			parentID				:= omit,//NP
+			creationTime			:= omit,//NP
+			lastModifiedTime		:= omit,//NP
+			labels 					:= LABELS,//O
+			accessControlPolicyIDs 	:= p_accessControlPolicyIDs,//O
+			expirationTime 			:= omit,//O    	  	
+			announceTo 				:= omit,//O
+			announcedAttribute		:= omit,//O
+			locationSource 			:= omit,//NP
+			locationUpdatePeriod 	:= locationUpdatePeriod, //O
+			locationTargetID 		:= omit, //NP
+			locationServer 			:= omit, //NP
+			locationContainerID		:= omit, //NP  
+			locationContainerName 	:= PX_LOCATION_CONTAINER_NAME, //O    		 		
+			locationStatus			:= omit, //NP
+			choice 					:= omit  //NP	   	  	
+		};
 		
 	}//end group ContentUpdate
 
@@ -1523,6 +1304,29 @@ module OneM2M_Templates {
 			choice := *//O
 		};
     	
+		template AE_optional mw_contentAe_allOmit := {
+			resourceName := omit,//M
+			resourceType := omit,//M
+			resourceID := omit,//M
+			parentID := omit,//M
+			creationTime := omit,//M
+			lastModifiedTime := omit,//M
+			labels := omit,//O
+			accessControlPolicyIDs := omit,//O
+			expirationTime := omit,//M
+			announceTo := omit,//O
+			announcedAttribute := omit,//M
+			appName := omit,//O
+			app_ID := omit,//M
+			aE_ID := omit,//M
+			pointOfAccess := omit,//O
+			ontologyRef := omit,//O
+			nodeLink := omit,//O
+			requestReachability := omit,//M
+			contentSerialization := omit,//O
+			choice := omit//O
+		};
+    	
 		template AccessControlPolicy_optional mw_contentAcpBase := {
 			resourceName := ?,//M
 			resourceType := ?,//M
@@ -1660,7 +1464,7 @@ module OneM2M_Templates {
 			choice := {childResource_list := ?}	//O
 		}
 		
-		template Group_optional mw_contentGroup_rc6 modifies mw_contentGroupBase := {
+		template Group_optional mw_contentGroup_rc6 modifies mw_contentGroupBase := { 
 			resourceName := omit,//M
 			resourceType := omit,//M
 			resourceID := omit,//M
@@ -1899,6 +1703,7 @@ module OneM2M_Templates {
 			contentSize := ?,//M
 			ontologyRef := *,//O
 			content := ?//M
+			
 		};
 		
 		template Container_optional mw_contentContainerBase := {
@@ -1969,31 +1774,60 @@ module OneM2M_Templates {
 		
 		template Container_optional mw_contentContainer_rc6 modifies mw_contentContainerBase := {
 			resourceName := omit,//M
-            resourceType := omit,//M
-            resourceID := omit,//M
-            parentID := omit,//M
-            creationTime := omit,//M
-            lastModifiedTime := omit,//M
-            labels := omit,//O
-            accessControlPolicyIDs := omit,//O
-            expirationTime := omit,//M
-            announceTo := omit,//O
-            announcedAttribute := omit,//M
-            stateTag := omit,//M
-            creator := omit,//M
-            maxNrOfInstances := omit,//O
-            maxByteSize := omit,//O
-            maxInstanceAge := omit,//O
-            currentNrOfInstances := omit,//M
-            currentByteSize := omit,//M
-            locationID := omit,//O
-            ontologyRef := omit,//O
-            choice := {childResource_list := ?}//O
+			resourceType := omit,//M
+			resourceID := omit,//M
+			parentID := omit,//M
+			creationTime := omit,//M
+			lastModifiedTime := omit,//M
+			labels := omit,//O
+			accessControlPolicyIDs := omit,//O
+			expirationTime := omit,//M
+			announceTo := omit,//O
+			announcedAttribute := omit,//M
+			stateTag := omit,//M
+			creator := omit,//M
+			maxNrOfInstances := omit,//O
+			maxByteSize := omit,//O
+			maxInstanceAge := omit,//O
+			currentNrOfInstances := omit,//M
+			currentByteSize := omit,//M
+			locationID := omit,//O
+			ontologyRef := omit,//O
+			choice := {childResource_list := ?}//O
 		}
 		
 		template Container_optional mw_contentContainer_rc7 modifies mw_contentContainerBase := {
 		
 		}
+		
+		template Notification mw_contentNotificationAllOmit := {
+			notificationEvent := omit,
+			verificationRequest := omit,
+			subscriptionDeletion := omit,
+			subscriptionReference := omit,
+			creator := omit,
+			notificationForwardingURI := omit
+		};
+
+		template Notification mw_contentNotificationBase := {
+			notificationEvent := *,//O
+			verificationRequest := *,//O
+			subscriptionDeletion := *,//O
+			subscriptionReference := ?,//M
+			creator := *,//O
+			notificationForwardingURI := *//O
+		};
+
+
+		template Notification mw_contentNotification (in template Representation p_representation) modifies mw_contentNotificationBase := {
+			notificationEvent := {
+				representation := p_representation,
+				operationMonitor := *,
+				notificationEventType := ?
+			}
+		};
+
+
 	}//end group responseContent
 	
 	group SpecialContents {
@@ -2074,20 +1908,6 @@ module OneM2M_Templates {
 			notificationContentType := omit,
 			notificationEventCat := omit
 		};
-    	
-		template (value) ContentInstance_update_invalid m_contentUpdateContentInstance_invalid(XSD.String p_primitiveContent) := {
-			labels := omit,
-			creationTime := omit,
-			announceTo := omit,
-			contentInfo := omit,
-			contentSize := omit,
-			ontologyRef := omit,
-			content_ := { 
-				embed_values := {p_primitiveContent},
-				attr := omit,
-				elem_list := {}  
-			}
-		};
 		
 		template (value) Container_update_invalid m_contentUpdateContainer_invalid := {
 			labels := omit,
@@ -2116,7 +1936,7 @@ module OneM2M_Templates {
 			originatingTimestamp := *,
 			resultExpirationTimestamp := *,
 			eventCategory := *
-    	};
+		};
     	
 		template ResponsePrimitive mw_responsePrimitiveInverse(ResponseStatusCode p_statusCode) := {
 			responseStatusCode := complement(p_statusCode),
@@ -2129,7 +1949,7 @@ module OneM2M_Templates {
 			eventCategory := *
 		};
     	
-    	template ResponsePrimitive mw_responsePrimitiveOK(in template PrimitiveContent p_content := *) := {
+		template ResponsePrimitive mw_responsePrimitiveOK(in template PrimitiveContent p_content := *) := {
 			responseStatusCode := (int2000, int2001, int2002, int2004),
 			requestIdentifier := ?,
 			primitiveContent := p_content,
@@ -2137,11 +1957,11 @@ module OneM2M_Templates {
 			from_ := *,
 			originatingTimestamp := *,
 			resultExpirationTimestamp := *,
-			eventCategory := *	
-    	};
+			eventCategory := *
+		};
         		 
-    	template ResponsePrimitive mw_responsePrimitiveKO := {
- 			responseStatusCode := complement(int2000, int2001, int2002, int2004),
+		template ResponsePrimitive mw_responsePrimitiveKO := {
+			responseStatusCode := complement(int2000, int2001, int2002, int2004),
 			requestIdentifier := ?,
 			primitiveContent := *,
 			to_ := *,
@@ -2149,29 +1969,24 @@ module OneM2M_Templates {
 			originatingTimestamp := *,
 			resultExpirationTimestamp := *,
 			eventCategory := *
-    	};
+		};
+    	
+		group Notify{
+    	
+			template ResponsePrimitive m_responseNotification(ResponseStatusCode p_statusCode, in template(omit) PrimitiveContent p_notification := omit) := {
+				responseStatusCode := p_statusCode,
+				requestIdentifier := "m_responseNotification" & f_rnd(1, 1000000),
+				primitiveContent := p_notification,
+				to_ := omit,
+				from_ := omit,
+				originatingTimestamp := omit,
+				resultExpirationTimestamp := omit,
+				eventCategory := omit
+			};
+    		
+		}
+    	
 	}//end group ResponsePrimitives	
 	
-	/**
-	 * @desc Get the prefix depending on the addressing format and binding (Temporal funciton as this should be done by TA)
-	 * @param v_address Actual address
-	 * @return Address with prefix
-	 * @verdict 
-	 */
-	function f_addPrefix(XSD.ID v_address) return XSD.ID {
-		//TODO Test, to be removed
-		if(PX_ADDRESSING_FORMAT == e_cseRelative) {
-			v_address := "/" & v_address;
-        } else if (PX_ADDRESSING_FORMAT == e_spRelative) {
-			v_address := "/~" & v_address;
-        } else {
-			v_address := "/~" & v_address;
-        } 
-		
-		return v_address;
 	
-	}
-	
-
-
 }  // end of module
diff --git a/LibOneM2M/OneM2M_TestSystem.ttcn b/LibOneM2M/OneM2M_TestSystem.ttcn
index 8087455ebcf137e7a225bb63d93c518f1993b439..3b93a2d083c81f4d1bf47e0c9dde21ab36a5f165 100644
--- a/LibOneM2M/OneM2M_TestSystem.ttcn
+++ b/LibOneM2M/OneM2M_TestSystem.ttcn
@@ -7,7 +7,7 @@
  *  
  *  @author     ETSI
  *  @version    $URL: https://forge.etsi.org/svn/oneM2M/branches/Release1/ttcn/LibOneM2M/OneM2M_TestSystem.ttcn $
- *              $Id: OneM2M_TestSystem.ttcn 105 2016-08-31 13:01:46Z reinaortega $
+ *              $Id: OneM2M_TestSystem.ttcn 175 2016-11-22 12:39:39Z reinaortega $
  *  @desc       Test System module for oneM2M
  *
  */
@@ -47,7 +47,7 @@ module OneM2M_TestSystem {
 		timer tc_wait;
 		//global variables
 		var MyResourcesList vc_resourcesList;
-		var IntegerList vc_resourcesIndexToBeDeleted;
+		var IntegerList vc_resourcesIndexToBeDeleted := {};
 	}
 		
 	type component CseTester extends Tester {
diff --git a/LibOneM2M/OneM2M_Types.ttcn b/LibOneM2M/OneM2M_Types.ttcn
index 75d9f403f262d5fae82719e46c1b4d0bafcea1b0..dbdc1faad6c914fce5f754dd7138a0839edd5aa4 100644
--- a/LibOneM2M/OneM2M_Types.ttcn
+++ b/LibOneM2M/OneM2M_Types.ttcn
@@ -7,7 +7,7 @@
  *  
  *  @author     ETSI
  *  @version    $URL: https://forge.etsi.org/svn/oneM2M/branches/Release1/ttcn/LibOneM2M/OneM2M_Types.ttcn $
- *              $Id: OneM2M_Types.ttcn 173 2016-11-22 08:10:48Z reinaortega $
+ *              $Id: OneM2M_Types.ttcn 175 2016-11-22 12:39:39Z reinaortega $
  *  @desc       Test System module for oneM2M
  *
  */
@@ -3228,11 +3228,17 @@ with {
   variant (notification_list[-]) "name as 'notification'";
 };
 
+//FIXME To be added
+type union Representation {
+	anytype resource, 
+	ResponsePrimitive responsePrimitive
+};
 
 type record Notification_1
 {
 	record {
-		XSD.AnyType representation optional,
+		//XSD.AnyType representation optional, To be exchanged by Representation
+		Representation representation optional,
 		record {
 			XSD.AnyType representation optional,
 			record {
@@ -4664,5 +4670,5 @@ with {
   encode "XML";
   variant "namespace as 'http://www.onem2m.org/xml/protocols' prefix 'm2m'";
   variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'";
-  extension "anytype ServiceSubscribedAppRule_optional, charstring, AnyURI, AttributeList, AE, AccessControlPolicy, AccessControlPolicy_optional, ACP_update_invalid, AE_optional, AE_update_invalid,AEAnnc_optional, Container_optional, CSEBase_optional, Container_update_invalid, ContentInstance_optional, ContentInstance_update_invalid, Group_optional, Group_update_invalid, Schedule_optional, Schedule_update_invalid, Subscription_optional, Subscription_update_invalid, PollingChannel_optional, PollingChannel_update_invalid, LocationPolicy_optional, LocationPolicy_update_invalid"
+  extension "anytype AggregatedResponse, AggregatedNotification,Notification, ServiceSubscribedAppRule_optional, charstring, AnyURI, AttributeList, AE, AccessControlPolicy, AccessControlPolicy_optional, ACP_update_invalid, AE_optional, AE_update_invalid,AEAnnc_optional, Container_optional, CSEBase_optional, Container_update_invalid, ContentInstance_optional, ContentInstance_update_invalid, Group_optional, Group_update_invalid, Schedule_optional, Schedule_update_invalid, Subscription_optional, Subscription_update_invalid, PollingChannel_optional, PollingChannel_update_invalid, LocationPolicy_optional, LocationPolicy_update_invalid"
 }
diff --git a/LibOneM2M/OneM2M_TypesAndValues.ttcn b/LibOneM2M/OneM2M_TypesAndValues.ttcn
index 5c67beea7af12b55441eb771076a69d63cc2d0e8..52810978d0316b774bccb4cec5347ff64fb69ae2 100644
--- a/LibOneM2M/OneM2M_TypesAndValues.ttcn
+++ b/LibOneM2M/OneM2M_TypesAndValues.ttcn
@@ -7,7 +7,7 @@
  *  
  *  @author     ETSI
  *  @version    $URL: https://forge.etsi.org/svn/oneM2M/branches/Release1/ttcn/LibOneM2M/OneM2M_TypesAndValues.ttcn $
- *              $Id: OneM2M_TypesAndValues.ttcn 102 2016-08-30 09:28:49Z reinaortega $
+ *              $Id: OneM2M_TypesAndValues.ttcn 175 2016-11-22 12:39:39Z reinaortega $
  *  @desc       Module containing types and values for oneM2M
  *
  */
@@ -22,6 +22,7 @@ module OneM2M_TypesAndValues {
 	const XSD.String c_defaultResourceName := "MyResource";
 	const charstring c_aeAuxName := "MyAe";
 	const XSD.String c_acpAuxName := "MyAcp";
+	const charstring c_invalid_location_update_period	:= "-PT30M10S" ;//duration set to invalid value  (minus value)
 	
 	//AccessControlOperations
 	const XSD.Integer c_C   := 1;
@@ -89,6 +90,8 @@ module OneM2M_TypesAndValues {
 	const XSD.Integer c_CRUDNDi   := 63;
 	
 	type NhURI ParentID;
+	type record length(0 .. infinity) of RequestPrimitive RequestPrimitiveList;
+	type record length(1 .. infinity) of RequestPrimitiveList RequestPrimitiveMatrix;
 
 } 
 // end of module
diff --git a/OneM2M_Testcases.ttcn b/OneM2M_Testcases.ttcn
index f33d9f3800c7b2060cc31ef945c3fcd2e9b50070..88a582b0a0e34b0e1c14b6ea2bf5e8088f1eea97 100644
--- a/OneM2M_Testcases.ttcn
+++ b/OneM2M_Testcases.ttcn
@@ -7,12 +7,10 @@
  *  
  *  @author     ETSI
  *  @version    $URL: https://forge.etsi.org/svn/oneM2M/branches/Release1/ttcn/OneM2M_Testcases.ttcn $
- *              $Id: OneM2M_Testcases.ttcn 173 2016-11-22 08:10:48Z reinaortega $
+ *              $Id: OneM2M_Testcases.ttcn 175 2016-11-22 12:39:39Z reinaortega $
  *  @desc       Module containing test cases for oneM2M
  *
  */
- //Test
-
 module OneM2M_Testcases {
 
 	import from OneM2M_TestSystem all;
@@ -20,10 +18,12 @@ module OneM2M_Testcases {
 	import from OneM2M_Types all;//{type XSD.ID};
 	import from OneM2M_TypesAndValues all;
 	import from OneM2M_Pixits all;
+	import from OneM2M_Pics all;
 	import from OneM2M_Functions all;
-	import from LibCommon_Time {modulepar all};
+	import from LibCommon_Time all;
 	import from XSD all;
 	
+	
 	//Demos used for validation purposes
 	group oneM2M_demos {
 	
@@ -97,10 +97,8 @@ module OneM2M_Testcases {
 				unmap(self:mcaPort, system:mcaPort); 
 				stop;
 			}	
-		}
 		
-	
-	
+		}//end group helpingTestCases
 	
 	}//end group oneM2M_demos
 	
@@ -116,7 +114,7 @@ module OneM2M_Testcases {
 				var integer v_resourceIndex := -1;
 				var ResourceType v_resourceType := int2;
                 
-                // Test component configuration
+				// Test component configuration
 				f_cf01Up();
                 
 				//Preambule
@@ -159,7 +157,7 @@ module OneM2M_Testcases {
 				var integer v_cseBaseIndex := -1;
 				var ResourceType v_resourceType := int2;
                 
-                // Test component configuration
+				// Test component configuration
 				f_cf01Up();
 	  	  	
 				//Preambule
@@ -201,7 +199,7 @@ module OneM2M_Testcases {
 				var integer v_cseBaseIndex := -1;
 				var ResourceType v_resourceType := int2;
                 
-                // Test component configuration
+				// Test component configuration
 				f_cf01Up();
 				
 				//Preambule
@@ -243,7 +241,7 @@ module OneM2M_Testcases {
 				var integer v_cseBaseIndex := -1;
 				var ResourceType v_resourceType := int2;
                 
-                // Test component configuration
+				// Test component configuration
 				f_cf01Up();
 	  	  	
 				//Preambule
@@ -285,7 +283,7 @@ module OneM2M_Testcases {
 				var integer v_cseBaseIndex := -1;
 				var ResourceType v_resourceType := int2;
                 
-                // Test component configuration
+				// Test component configuration
 				f_cf02Up();
 	  	  	
 				//Preambule
@@ -320,6 +318,95 @@ module OneM2M_Testcases {
 				f_cf01Down();
 					
 			}
+			
+			testcase TC_CSE_REG_BV_006() runs on CseTester system CseSystem {
+			  
+				var MsgIn v_response;
+				var RequestPrimitive v_request;
+				var integer v_aeIndex := -1;
+				var ResourceType v_resourceType := int2;
+				
+				// Test control
+    				
+				// Test component configuration
+				f_cf01Up();
+    			
+				// Test adapter configuration
+    			
+				// Preamble
+				v_aeIndex := f_cse_preamble_registerAeWithId("C-AE-ID-STEM");//c_CRUDNDi);
+				
+				//Test Body	
+				v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));				
+    									
+				v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_aeIndex);
+				
+				mcaPort.send(m_request(v_request));
+				tc_ac.start;
+				alt {
+					[] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) {
+						tc_ac.stop;
+						setverdict(pass, testcasename() & ": AE creation rejected.");
+					}
+					[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int4005))) -> value v_response{
+						tc_ac.stop;
+						setverdict(fail, testcasename() & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
+					}
+					[] tc_ac.timeout {
+						setverdict(inconc, testcasename() & ": No answer while creating AE");
+					}
+				}	
+								
+				// Postamble
+				f_cse_postamble_deleteResources();
+					
+				// Tear down
+				f_cf01Down();
+			
+			}
+			
+			testcase TC_CSE_REG_BV_007() runs on CseTester system CseSystem {
+	  	  	
+				var MsgIn v_response;
+				var RequestPrimitive v_request;
+				var integer v_cseBaseIndex := -1;
+				var ResourceType v_resourceType := int2;
+                
+				// Test component configuration
+				f_cf02Up();
+	  	  	
+				//Preambule
+				v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule({"S"});//c_CRUDNDi);
+	
+				//Test Body
+				v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));				
+    									
+				v_request := f_getUpdateRequestPrimitive(v_resourceType,v_cseBaseIndex, v_request);
+	  	  		
+				mcaPort.send(m_request(v_request));
+				tc_ac.start;
+
+				alt {
+					[] mccPort.receive(mw_request(mw_createAEannc(omit, omit, "APP_ID"))) {
+						tc_ac.stop;
+						setverdict(pass, testcasename() & ": AE creation redirected.");
+					}
+					[] mccPort.receive {
+						tc_ac.stop;
+						setverdict(fail, testcasename() & ": Error while creating AE");
+					}
+					[] tc_ac.timeout {
+						setverdict(inconc, testcasename() & ": No answer while creating AE");
+					}
+				}	
+								
+				// Postamble
+				f_cse_postamble_deleteResources();
+				
+				// Tear down
+				f_cf01Down();
+					
+			}
 	  	  	
 		}//end Registration
 		
@@ -384,7 +471,7 @@ module OneM2M_Testcases {
 					v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
     									
 					// Test Body
-					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex)));
+					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
 					v_request.resultContent := int0;//Nothing
 					mcaPort.send(m_request(v_request));
 					tc_ac.start;
@@ -494,7 +581,7 @@ module OneM2M_Testcases {
 					v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
     									
 					// Test Body
-					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex)));
+					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
 					v_request.resultContent := int1;//Attributes
 					mcaPort.send(m_request(v_request));
 					tc_ac.start;
@@ -604,7 +691,7 @@ module OneM2M_Testcases {
 					v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
     									
 					// Test Body
-					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex)));
+					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
 					v_request.resultContent := int2;//Attributes
 					mcaPort.send(m_request(v_request));
 					tc_ac.start;
@@ -714,8 +801,8 @@ module OneM2M_Testcases {
 					v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
     									
 					// Test Body
-					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex)));
-					v_request.resultContent := int1;//Attributes
+					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
+					v_request.resultContent := int3;//Hierarchical address and attributes
 					mcaPort.send(m_request(v_request));
 					tc_ac.start;
 					alt {
@@ -824,7 +911,7 @@ module OneM2M_Testcases {
 					v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
     									
 					// Test Body
-					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex)));
+					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
 					v_request.resultContent := int1;//Attributes
 					mcaPort.send(m_request(v_request));
 					tc_ac.start;
@@ -934,7 +1021,7 @@ module OneM2M_Testcases {
 					v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
     									
 					// Test Body
-					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex)));
+					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
 					v_request.resultContent := int1;//Attributes
 					mcaPort.send(m_request(v_request));
 					tc_ac.start;
@@ -1044,7 +1131,7 @@ module OneM2M_Testcases {
 					v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
     									
 					// Test Body
-					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex)));
+					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
 					v_request.resultContent := int1;//Attributes
 					mcaPort.send(m_request(v_request));
 					tc_ac.start;
@@ -1084,32 +1171,56 @@ module OneM2M_Testcases {
 						// Local variables
 						var template RequestPrimitive v_createRequest := m_createContainerBase;
 						var ResponsePrimitive v_responsePrimitive;
+						var integer v_sizeResourceTypeList;
+						var integer i;
+						var RequestPrimitiveMatrix v_requestPrimitivematrix;
+						var CseTester v_notifyHandler := CseTester.create("NotifyHandler") alive;//TODO useless but need to be initialized see if we can remove it
+						
+						v_requestPrimitivematrix := {
+							{},
+							{valueof(m_createAeAux(omit,omit))},
+							{valueof(m_createContainerBase)}
+						}
+						v_sizeResourceTypeList := lengthof(v_requestPrimitivematrix);
 						
 						v_createRequest.primitiveContent.any_1[0].Container_optional.resourceName := omit;
-                        
-						v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int3, v_createRequest);//Container
 						
-						log(v_responsePrimitive);
-                        
-                        if(getverdict == pass){
-                            if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.resourceName)){
-                            	setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
-                            }
-                        }
+						for (i := 0; i<v_sizeResourceTypeList; i := i+1){
+							v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int3, v_createRequest, v_requestPrimitivematrix[i], v_notifyHandler);
+							log(v_responsePrimitive);
+							if(getverdict == pass){
+								if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.resourceName)){
+									setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
+								}
+							}
+						}  
 					}
 
 					testcase TC_CSE_DMR_CRE_BV_001_02() runs on CseTester system CseSystem {
 						// Local variables
 						var template RequestPrimitive v_createRequest := m_createGroupBase;
 						var ResponsePrimitive v_responsePrimitive;
+						var RequestPrimitiveMatrix v_requestPrimitivematrix;
+						var integer v_sizeResourceTypeList;
+						var integer i;
+						var CseTester v_notifyHandler := CseTester.create("NotifyHandler") alive;
+						
+						//CSEBase int5, remoteCSE int16, AE int2
+						v_requestPrimitivematrix := {
+							{},
+							{valueof(m_createAeAux(omit,omit))}
+						}
+						v_sizeResourceTypeList := lengthof(v_requestPrimitivematrix);
 						
 						v_createRequest.primitiveContent.any_1[0].Group_optional.resourceName := omit;
 						
-						v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int9, v_createRequest);//Group
-						
-						if(getverdict == pass){
-							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.resourceName)){
-								setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
+						for (i := 0; i<v_sizeResourceTypeList; i := i+1){
+							v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int3, v_createRequest, v_requestPrimitivematrix[i],v_notifyHandler);
+							log(v_responsePrimitive);
+							if(getverdict == pass){
+								if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.resourceName)){
+									setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
+								}
 							}
 						}
 					}
@@ -1118,14 +1229,26 @@ module OneM2M_Testcases {
 						// Local variables
 						var template RequestPrimitive v_createRequest := m_createAcpBase;
 						var ResponsePrimitive v_responsePrimitive;
+						var integer v_sizeResourceTypeList;
+						var integer i;
+						var RequestPrimitiveMatrix v_requestPrimitivematrix;
+						var CseTester v_notifyHandler := CseTester.create("NotifyHandler") alive;
+
+						//CSEBase int5, remoteCSE int16, AE int2
+						v_requestPrimitivematrix := {
+							{},
+							{valueof(m_createAeAux(omit,omit))}
+						}
+						v_sizeResourceTypeList := lengthof(v_requestPrimitivematrix);
 						
 						v_createRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.resourceName := omit;
-	
-						v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int1, v_createRequest);//AccessControlPolicy
-						
-						if(getverdict == pass){
-							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.resourceName)){
-								setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
+
+						for (i := 0; i<v_sizeResourceTypeList; i := i+1){
+							v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int1, v_createRequest, v_requestPrimitivematrix[i], v_notifyHandler);//AccessControlPolicy
+							if(getverdict == pass){
+								if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.resourceName)){
+									setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
+								}
 							}
 						}
 					}
@@ -1134,14 +1257,28 @@ module OneM2M_Testcases {
 						// Local variables
 						var template RequestPrimitive v_createRequest := m_createScheduleBase;
 						var ResponsePrimitive v_responsePrimitive;
+						var integer v_sizeResourceTypeList;
+						var integer i;
+						var RequestPrimitiveMatrix v_requestPrimitivematrix;
+						var CseTester v_notifyHandler := CseTester.create("NotifyHandler") alive;
+						
+//						CSEBase int5, remoteCSE int16, AE int2, subscription int23 
+						v_requestPrimitivematrix := {
+							{},
+							{valueof(m_createAeAux(omit,omit))},
+							{valueof(m_createSubscriptionBase)}
+						}
+						v_sizeResourceTypeList := lengthof(v_requestPrimitivematrix);
 						
 						v_createRequest.primitiveContent.any_1[0].Schedule_optional.resourceName := omit;
-	
-						v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int18, v_createRequest);//Schedule
+
+						for (i := 0; i<v_sizeResourceTypeList; i := i+1){
+							v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int18, v_createRequest, v_requestPrimitivematrix[i], v_notifyHandler);//Schedule
 						
-						if(getverdict == pass){
-							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.resourceName)){
-								setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
+							if(getverdict == pass){
+								if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.resourceName)){
+									setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
+								}
 							}
 						}
 					}
@@ -1150,14 +1287,25 @@ module OneM2M_Testcases {
 						// Local variables
 						var template RequestPrimitive v_createRequest := m_createPollingChannelBase;
 						var ResponsePrimitive v_responsePrimitive;
+						var integer v_sizeResourceTypeList;
+						var integer i;
+						var RequestPrimitiveMatrix v_requestPrimitivematrix;
+						var CseTester v_notifyHandler := CseTester.create("NotifyHandler") alive;
+						
+						//remoteCSE int16, AE int2
+						v_requestPrimitivematrix := {
+							{valueof(m_createAeAux(omit,omit))}
+						}
+						v_sizeResourceTypeList := lengthof(v_requestPrimitivematrix);
 						
 						v_createRequest.primitiveContent.any_1[0].PollingChannel_optional.resourceName := omit;
-	
-						v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int15, v_createRequest);//PollingChannel
-						
-						if(getverdict == pass){
-							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.resourceName)){
-								setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
+
+						for (i := 0; i<v_sizeResourceTypeList; i := i+1){
+							v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int15, v_createRequest, v_requestPrimitivematrix[i], v_notifyHandler);//PollingChannel
+							if(getverdict == pass){
+								if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.resourceName)){
+									setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
+								}
 							}
 						}
 					}
@@ -1166,65 +1314,111 @@ module OneM2M_Testcases {
 						// Local variables
 						var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
 						var ResponsePrimitive v_responsePrimitive;
+						var integer v_sizeResourceTypeList;
+						var integer i;
+						var RequestPrimitiveMatrix v_requestPrimitivematrix;
+						var CseTester v_notifyHandler := CseTester.create("NotifyHandler") alive;
+						
+						//accessControlPolicy int1, CSEBase int5, remoteCSE int16, AE int2, container int, schedule int, locationPolicy int, delivery int, request int, group int, mgmtCmd int,
+						// node int, m2mServiceSubscriptionProfile int, statsConfig int, statsCollect int, serviceSubscribedAppRule int
+	
+						// mgmtObj int, execInstance int, serviceSubscribedNode int, pollingChannelURI int (doesn't exist in Release2), eventConfig int, 
+						v_requestPrimitivematrix := {
+							{},
+							{valueof(m_createAeAux(omit,omit))},
+							{valueof(m_createContainerBase)},
+							{valueof(m_createAcpBase)},
+							{valueof(m_createScheduleBase)},
+							{valueof(m_createGroupBase)}
+							//{m_createLocationPolicy(int1,omit,omit,omit,omit)}
+							//{m_createServiceSubscribedAppRule()} //TODO set correct parameters
+						}
+						v_sizeResourceTypeList := lengthof(v_requestPrimitivematrix);
 						
 						v_createRequest.primitiveContent.any_1[0].Subscription_optional.resourceName := omit;
 
-						v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int23, v_createRequest);//Subscription
-						
-						if(getverdict == pass){
-							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.resourceName)){
-								setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
+						for (i := 0; i<v_sizeResourceTypeList; i := i+1){
+						v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int23, v_createRequest, v_requestPrimitivematrix[i], v_notifyHandler);//Subscription
+							if(getverdict == pass){
+								if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.resourceName)){
+									setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
+								}
 							}
 						}
 					}
 					
-    				function f_CSE_DMR_CRE_BV_001(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on CseTester return ResponsePrimitive {
+					function f_CSE_DMR_CRE_BV_001(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, in RequestPrimitiveList p_requestPrimitiveList, in CseTester p_notifyHandler) runs on CseTester return ResponsePrimitive {
     				
-    					// Local variables
-    					var MsgIn v_response;
-    					var RequestPrimitive v_request;
-    					
-						var integer v_aeIndex := -1;
+						// Local variables
+						var MsgIn v_response;
+						var RequestPrimitive v_request;
+						var integer v_sizeResourceTypeList := lengthof(p_requestPrimitiveList);
+						var integer i;
+						var integer v_parentIndex := -1;
+						var integer v_resourceIndex := -1;
+						var integer v_ae2Index := -1;
+						var PoaList v_poaList := {"http://" & PX_TESTER_ADDRESS & "/"};
     										   
-    					// Test control
+						// Test control
     				
-    					// Test component configuration
-    					f_cf01Up();
+						// Test component configuration
+						f_cf01Up();
     				
-    					// Test adapter configuration
+						// Test adapter configuration
     				
-    					// Preamble
-						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); 			
+						// Preamble
+    					
+						for (i := 0; i<v_sizeResourceTypeList; i := i+1){
+							if(match(int23, p_requestPrimitiveList[i].resourceType)){
+								v_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE_ID_STEM, "MyAe2", v_poaList), -1); // AE2 is registred
+								p_requestPrimitiveList[i].primitiveContent.any_1[0].Subscription_optional.notificationURI := {f_getResourceAddress(v_ae2Index)}; 
+								p_notifyHandler.start(f_subscriptionVerificationHandler(f_getResourceAddress(v_parentIndex)));
+							}
+							v_parentIndex := f_cse_createResource(p_requestPrimitiveList[i].resourceType, p_requestPrimitiveList[i], v_parentIndex);
+						}										
     									
-    					// Test Body
+						// Test Body
     					
-    					v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex);
-						
-    					mcaPort.send(m_request(v_request));
-    					tc_ac.start;
-    					alt {
-    						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
-    							tc_ac.stop;
-    							setverdict(pass, testcasename() & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfuly");
-    						}
-    						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
-    							tc_ac.stop;
-    							setverdict(fail, testcasename() & ": Error while creating resource type " & int2str(enum2int(p_resourceType)));
-    						}
-    						[] tc_ac.timeout {
-    							setverdict(inconc, testcasename() & ": No answer while creating resource type " & int2str(enum2int(p_resourceType)));
-    						}
-    					}	
+						if(match(int23, p_requestPrimitive.resourceType)){
+							v_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE_ID_STEM, "MyAe2", v_poaList), -1); // AE2 is registred
+							p_requestPrimitive.primitiveContent.any_1[0].Subscription_optional.notificationURI := {f_getResourceAddress(v_ae2Index)}; 
+							p_notifyHandler.start(f_subscriptionVerificationHandler(f_getResourceAddress(v_parentIndex)));
+						}
+    					
+						v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex);
+						
+						mcaPort.send(m_request(v_request));
+						tc_ac.start;
+						alt {
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+								tc_ac.stop;
+								setverdict(pass, testcasename() & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfuly");
+								v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, v_parentIndex);
+								if (v_sizeResourceTypeList == 0){
+										vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_resourceIndex};
+								}
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error while creating resource type " & int2str(enum2int(p_resourceType)));
+							}
+							[] tc_ac.timeout {
+								setverdict(inconc, testcasename() & ": No answer while creating resource type " & int2str(enum2int(p_resourceType)));
+							}
+						}	
     								
-    					// Postamble
-    					f_cse_postamble_deleteResources();
+						// Postamble
+						f_cse_postamble_deleteResources();
+						vc_resourcesIndexToBeDeleted := {};
     					
 						// Tear down
+						//notifyHandler.stop;
 						f_cf01Down();
+						
     					
-    					return v_response.primitive.responsePrimitive;
+						return v_response.primitive.responsePrimitive;
     					    				
-    				}//end f_CSE_DMR_CRE_BV_001
+					}//end f_CSE_DMR_CRE_BV_001
     				
 				} // end g_CSE_DMR_CRE_BV_001
 								
@@ -1233,7 +1427,7 @@ module OneM2M_Testcases {
 					
 					testcase TC_CSE_DMR_CRE_BV_002_01() runs on CseTester system CseSystem {
 						// Local variables
-                        var ResponsePrimitive v_responsePrimitive;
+						var ResponsePrimitive v_responsePrimitive;
                         
 						v_responsePrimitive := f_CSE_DMR_CRE_BV_002(int3, m_createContainerBase);//container
 						
@@ -1337,8 +1531,9 @@ module OneM2M_Testcases {
 						// Local variables
 						var MsgIn v_response;
 						var RequestPrimitive v_request;
-						
 						var integer v_aeIndex := -1;
+						var CseTester v_notifyHandler;
+						var integer v_ae2Index := -1;
 										   
 						// Test control
 				
@@ -1348,7 +1543,9 @@ module OneM2M_Testcases {
 						// Test adapter configuration
 				
 						// Preamble
-						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); 		
+						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); 
+						
+						f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType);
 									
 						// Test Body
 						v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex);
@@ -1358,14 +1555,14 @@ module OneM2M_Testcases {
 						alt {
 							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
 								tc_ac.stop;
-								setverdict(pass, testcasename() & ": Container created successfuly");
+								setverdict(pass, testcasename() & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfuly");
 							}
 							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
 								tc_ac.stop;
-								setverdict(fail, testcasename() & ": Error while creating container");
+								setverdict(fail, testcasename() & ": Error while creating resource type " & int2str(enum2int(p_resourceType)));
 							}
 							[] tc_ac.timeout {
-								setverdict(inconc, testcasename() & ": No answer while creating container");
+								setverdict(inconc, testcasename() & ": No answer while creating resource type " & int2str(enum2int(p_resourceType)));
 							}
 						}	
 								
@@ -1420,59 +1617,62 @@ module OneM2M_Testcases {
 					}
 					
 				
-    				function f_CSE_DMR_CRE_BV_003(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on CseTester {//system CseSystem { MRO system keyword not supported on functions in Titan
+					function f_CSE_DMR_CRE_BV_003(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on CseTester {//system CseSystem { MRO system keyword not supported on functions in Titan
     				
-    					// Local variables
-    					var MsgIn v_response;
-    					var RequestPrimitive v_request;
-    					
+						// Local variables
+						var MsgIn v_response;
+						var RequestPrimitive v_request;
 						var integer v_aeIndex := -1;
 						var integer v_resourceIndex := -1;
+						var CseTester v_notifyHandler;
+						var integer v_ae2Index := -1;
     										   
-    					// Test control
+						// Test control
     				
-    					// Test component configuration
-    					f_cf01Up(); 
+						// Test component configuration
+						f_cf01Up(); 
     				
-    					// Test adapter configuration
+						// Test adapter configuration
     				
-    					// Preamble
-						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+						// Preamble
+						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi)
+						
+						f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType);
 						
 						v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 	
 						
 						v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex);			
   					    						    									
-    					// Test Body
+						// Test Body
 						v_request.requestIdentifier := "Existing resource";
     					
-    					mcaPort.send(m_request(v_request));
-    					tc_ac.start;
-    					alt {
-    						[] mcaPort.receive(mw_response(mw_responsePrimitive(int4105))) -> value v_response {
-    							tc_ac.stop;
-    							setverdict(pass, testcasename() & ": Resource already exists");
-    						}
-    						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
-    							tc_ac.stop;
-    							setverdict(fail, testcasename() & ": Error while creating an already existing resource");
-    						}
+						mcaPort.send(m_request(v_request));
+						tc_ac.start;
+						alt {
+							[] mcaPort.receive(mw_response(mw_responsePrimitive(int4105))) -> value v_response {
+								tc_ac.stop;
+								setverdict(pass, testcasename() & ": Resource already exists");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error while creating an already existing resource");
+							}
 							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
 								tc_ac.stop;
 								setverdict(fail, testcasename() & ": Creating a resource that already exists");
 							}
-    						[] tc_ac.timeout {
-    							setverdict(inconc, testcasename() & ": No answer while creating resource");
-    						}
-    					}	
+							[] tc_ac.timeout {
+								setverdict(inconc, testcasename() & ": No answer while creating resource");
+							}
+						}	
     								
-    					// Postamble
-    					f_cse_postamble_deleteResources();
+						// Postamble
+						f_cse_postamble_deleteResources();
     					
 						// Tear down
 						f_cf01Down();
     				
-    				}//end f_CSE_DMR_CRE_BV_003
+					}//end f_CSE_DMR_CRE_BV_003
     				
 				}// end group g_CSE_DMR_CRE_BV_003
 				
@@ -1519,10 +1719,14 @@ module OneM2M_Testcases {
 						// Local variables
 						var MsgIn v_response;
 						var RequestPrimitive v_request;
-						
+						var integer v_acpAuxIndex := -1;
 						var integer v_aeIndex := -1;
 											   
 						// Test control
+						if(not(PICS_ACP_SUPPORT)) {
+							setverdict(inconc, testcasename() & ": AccessControlPolicy support is required to run this test case");
+							stop;
+						}
     				
 						// Test component configuration
 						f_cf01Up(); 
@@ -1531,11 +1735,13 @@ module OneM2M_Testcases {
     				
 						// Preamble
 						if (p_resourceType != int23) {
-							v_aeIndex := f_cse_preamble_registerAe(int62);//c_RUDNDi);
+							v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int62);//c_RUDNDi)
 						} else {
-							v_aeIndex := f_cse_preamble_registerAe(int60);//c_UDNDi);
-						}	 					
-							
+							v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int60);//c_UDNDi);
+						}	
+												
+						v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+						
 						// Test Body
 						if(p_resourceType == int15) {
 							v_request := valueof(m_createPollingChannel(f_getResourceAddress(v_aeIndex), PX_AE_ID_STEM, omit));
@@ -1566,6 +1772,9 @@ module OneM2M_Testcases {
 						// Postamble
 						f_cse_postamble_deleteResources();
     				
+						// Tear down
+						f_cf01Down();
+    				
 					}//end f_CSE_DMR_CRE_BV_004
     				
 				}// end group g_CSE_DMR_CRE_BV_004
@@ -1648,9 +1857,10 @@ module OneM2M_Testcases {
 						// Local variables
 						var MsgIn v_response;
 						var RequestPrimitive v_request;
-						
 						var integer v_aeIndex := -1;
 						var integer v_resourceIndex := -1;
+						var CseTester v_notifyHandler;
+						var integer v_ae2Index := -1;
 						    										   
 						// Test control
     				
@@ -1662,10 +1872,12 @@ module OneM2M_Testcases {
 						// Preamble
 						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
 						
+						f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType);
+						
 						v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
     									
 						// Test Body
-						mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_resourceIndex))));
+						mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))));
 
 						tc_ac.start;
 						alt {
@@ -1707,7 +1919,7 @@ module OneM2M_Testcases {
 						var RequestPrimitive v_request;
 						
 						var integer v_aeIndex := -1;
-						var XSD.ID v_resourceId := "NonExisting";
+						var XSD.ID v_resourceId := "nonexisting";
     										   
 						// Test control
     				
@@ -1720,10 +1932,10 @@ module OneM2M_Testcases {
 						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); 		
 						
 						// Test Body
-						if(PX_UNSTRUCTURED) {
-							mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(-2) & "/" & v_resourceId)));
+						if(PX_UNSTRUCTURED and (PX_ADDRESSING_FORMAT == e_cseRelative)) {
+							mcaPort.send(m_request(m_retrieveResource(v_resourceId, f_getOriginator(v_aeIndex))));
 						} else {
-							mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_aeIndex) & "/" & v_resourceId)));
+							mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_aeIndex) & "/" & v_resourceId, f_getOriginator(v_aeIndex))));
 						}
 
 						tc_ac.start;
@@ -1801,13 +2013,15 @@ module OneM2M_Testcases {
 						// Local variables
 						var MsgIn v_response;
 						var RequestPrimitive v_request;
-						
 						var XSD.ID v_acpId;
 						var integer v_aeIndex := -1;
+						var integer v_acpAuxIndex := -1;
 						var integer v_resourceIndex := -1;
+						var CseTester v_notifyHandler;
+						var integer v_ae2Index := -1;
     										   
 						// Test control
-						if(not(PX_ACP_SUPPORT)) {
+						if(not(PICS_ACP_SUPPORT)) {
 							log(testcasename() & ":AccessControlPolicy support is required for executing this test case");
 							stop;
 						}
@@ -1818,14 +2032,18 @@ module OneM2M_Testcases {
 						// Test adapter configuration
     				
 						// Preamble
-						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi;
+						v_acpAuxIndex := f_cse_preamble_createAcpAux(-, -);//c_CRUDNDi)
+						
+						v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)});//c_CRUDNDi;
+						
+						f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType);
 										
- 						v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 	
+						v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 	
 
 						f_cse_updateAcpAuxResource(int61); //c_CUDNDi
 								
 						// Test Body
-						mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_resourceIndex))));
+						mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))));
 
 						tc_ac.start;
 						alt {
@@ -1924,10 +2142,11 @@ module OneM2M_Testcases {
 						// Local variables
 						var MsgIn v_response;
 						var RequestPrimitive v_request;
-						
 						var XSD.String v_attribute := "#pi";//Attribute parentId to be retrieved
 						var integer v_aeIndex := -1;
 						var integer v_resourceIndex := -1;
+						var CseTester v_notifyHandler;
+						var integer v_ae2Index := -1;
     										   
 						// Test control
     				
@@ -1939,10 +2158,12 @@ module OneM2M_Testcases {
 						// Preamble
 						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);	
 						
+						f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType);
+						
 						v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
     									
 						// Test Body
-						mcaPort.send(m_request(m_retrieveResourceAttributeToOption(f_getResourceAddress(v_resourceIndex) & v_attribute)));
+						mcaPort.send(m_request(m_retrieveResourceAttributeToOption(f_getResourceAddress(v_resourceIndex) & v_attribute, f_getOriginator(v_resourceIndex))));
 
 						tc_ac.start;
 						alt {
@@ -2042,10 +2263,10 @@ module OneM2M_Testcases {
 						// Local variables
 						var MsgIn v_response;
 						var RequestPrimitive v_request;
-						
-						var XSD.String v_attribute := "#pi";//Attribute parentId to be retrieved
 						var integer v_aeIndex := -1;
 						var integer v_resourceIndex := -1;
+						var CseTester v_notifyHandler;
+						var integer v_ae2Index := -1;
     										   
 						// Test control
     				
@@ -2057,10 +2278,12 @@ module OneM2M_Testcases {
 						// Preamble
 						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
 						
+						f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType);
+						
 						v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
     									
 						// Test Body
-						mcaPort.send(m_request(m_retrieveResourceAttributeContentOption(f_getResourceAddress(v_resourceIndex) ,	{"pi"})));
+						mcaPort.send(m_request(m_retrieveResourceAttributeContentOption(f_getResourceAddress(v_resourceIndex) ,	{"pi"}, f_getOriginator(v_resourceIndex))));
 
 						tc_ac.start;
 						alt {
@@ -2166,9 +2389,10 @@ module OneM2M_Testcases {
 						// Local variables
 						var MsgIn v_response;
 						var RequestPrimitive v_request;
-						
 						var integer v_aeIndex := -1;
 						var integer v_resourceIndex := -1;
+						var CseTester v_notifyHandler;
+						var integer v_ae2Index := -1;
     										   
 						// Test control
     				
@@ -2180,11 +2404,13 @@ module OneM2M_Testcases {
 						// Preamble
 						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
 						
+						f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType);
+						
 						v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
     									
 						// Test Body
 						mcaPort.send(m_request(m_retrieveResourceAttributeContentOption(f_getResourceAddress(v_resourceIndex) ,
-																						{"parentID", "creationTime"})));
+																						{"parentID", "creationTime"}, f_getOriginator(v_resourceIndex))));
 
 						tc_ac.start;
 						alt {
@@ -2260,9 +2486,10 @@ module OneM2M_Testcases {
 						// Local variables
 						var MsgIn v_response;
 						var RequestPrimitive v_request;
-						
 						var integer v_aeIndex := -1;
 						var integer v_resourceIndex := -1;
+						var CseTester v_notifyHandler;
+						var integer v_ae2Index := -1;
 											   
 						// Test control
     				
@@ -2274,11 +2501,13 @@ module OneM2M_Testcases {
 						// Preamble
 						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
 						
+						f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType);
+						
 						v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
     									
 						// Test Body
 						mcaPort.send(m_request(m_retrieveResourceAttributeContentOption(f_getResourceAddress(v_resourceIndex),
-																						{"lbl"})));
+																						{"lbl"}, f_getOriginator(v_resourceIndex))));
 
 						tc_ac.start;
 						alt {
@@ -2291,7 +2520,7 @@ module OneM2M_Testcases {
 							}
 							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
 								tc_ac.stop;
-								setverdict(fail, testcasename() & ": Error while retrieving non existing resource attribute");
+								setverdict(fail, testcasename() & ": Error : attribute was retrieved while it doesn't exist");
 							}
 							[] tc_ac.timeout {
 								setverdict(inconc, testcasename() & ": No answer while retrieving resource attribute");
@@ -2353,9 +2582,10 @@ module OneM2M_Testcases {
 						// Local variables
 						var MsgIn v_response;
 						var RequestPrimitive v_request;
-						
 						var integer v_aeIndex := -1;
 						var integer v_resourceIndex := -1;
+						var CseTester v_notifyHandler;
+						var integer v_ae2Index := -1;
 											   
 						// Test control
     				
@@ -2367,11 +2597,13 @@ module OneM2M_Testcases {
 						// Preamble
 						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
 						
+						f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType);
+						
 						v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
     									
 						// Test Body
 						mcaPort.send(m_request(m_retrieveResourceAttributeContentOption(f_getResourceAddress(v_resourceIndex),
-																						{"lbl", "at"})));
+																						{"lbl", "at"}, f_getOriginator(v_resourceIndex))));
 
 						tc_ac.start;
 						alt {
@@ -2384,7 +2616,7 @@ module OneM2M_Testcases {
 							}
 							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
 								tc_ac.stop;
-								setverdict(fail, testcasename() & ": Error while retrieving non existing resource attributes");
+								setverdict(fail, testcasename() & ": Error : attribute was retrieved while it doesn't exist");
 							}
 							[] tc_ac.timeout {
 								setverdict(inconc, testcasename() & ": No answer while retrieving resource attributes");
@@ -2425,9 +2657,9 @@ module OneM2M_Testcases {
 							//Check attribute 1
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Container_optional)) {
-        							if(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.labels != v_labels_2){
-        								setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
-        							}
+									if(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.labels != v_labels_2){
+										setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
+									}
 								}
 							}
 						}
@@ -2475,9 +2707,9 @@ module OneM2M_Testcases {
 							//Check attribute 1
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy)) {
-									if(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy.labels != v_labels_2){
-        								setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
-        							}
+									if(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.labels != v_labels_2){
+										setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
+									}
 								}
 							}
 						}
@@ -2502,8 +2734,8 @@ module OneM2M_Testcases {
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional)) {
 									if(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.labels != v_labels_2){
-        								setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
-        							}
+										setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
+									}
 								}
 							}
 						}
@@ -2527,9 +2759,9 @@ module OneM2M_Testcases {
 							//Check attribute 1
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional)) {
-        							if(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.labels != v_labels_2){
-        								setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
-        							}
+									if(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.labels != v_labels_2){
+										setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
+									}
 								}
 							}
 						}
@@ -2553,8 +2785,8 @@ module OneM2M_Testcases {
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional)) {
 									if(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.labels != v_labels_2){
-        								setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
-        							}
+										setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
+									}
 								}
 							}
 						}
@@ -2566,9 +2798,10 @@ module OneM2M_Testcases {
 						// Local variables
 						var MsgIn v_response;
 						var RequestPrimitive v_request;
-						
 						var integer v_aeIndex := -1;
 						var integer v_resourceIndex := -1;
+						var CseTester v_notifyHandler;
+						var integer v_ae2Index := -1;
     										   
 						// Test control
     				
@@ -2580,6 +2813,8 @@ module OneM2M_Testcases {
 						// Preamble
 						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
 						
+						f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_createRequestPrimitive, p_resourceType);
+						
 						v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_aeIndex); 				
     									
 						// Test Body
@@ -2618,7 +2853,7 @@ module OneM2M_Testcases {
 					testcase TC_CSE_DMR_UPD_BV_002_01() runs on CseTester system CseSystem {
 						// Local variables
 						var Labels v_labels_1 := {"VALUE_1"};
-                        var template RequestPrimitive v_updateRequest := m_updateContainerBase;
+						var template RequestPrimitive v_updateRequest := m_updateContainerBase;
 						var ResponsePrimitive v_responsePrimitive;
 
 						v_updateRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_1;
@@ -2629,9 +2864,9 @@ module OneM2M_Testcases {
 							//Check attribute 1
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Container_optional)) {
-        							if(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.labels != v_labels_1){
-        								setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
-        							}
+									if(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.labels != v_labels_1){
+										setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
+									}
 								}
 							}
 						}
@@ -2651,9 +2886,9 @@ module OneM2M_Testcases {
 							//Check attribute 1
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Group_optional)) {
-        							if(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.labels != v_labels_1){
-        								setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
-        							}
+									if(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.labels != v_labels_1){
+										setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
+									}
 								}
 							}
 						}
@@ -2673,9 +2908,9 @@ module OneM2M_Testcases {
 							//Check attribute 1
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional)) {
-        							if(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.labels != v_labels_1){
-        								setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
-        							}
+									if(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.labels != v_labels_1){
+										setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
+									}
 								}
 							}
 						}
@@ -2695,9 +2930,9 @@ module OneM2M_Testcases {
 							//Check attribute 1
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional)) {
-        							if(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.labels != v_labels_1){
-        								setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
-        							}
+									if(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.labels != v_labels_1){
+										setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
+									}
 								}
 							}
 						}
@@ -2717,9 +2952,9 @@ module OneM2M_Testcases {
 							//Check attribute 1
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional)) {
-        							if(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.labels != v_labels_1){
-        								setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
-        							}
+									if(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.labels != v_labels_1){
+										setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
+									}
 								}
 							}
 						}
@@ -2739,9 +2974,9 @@ module OneM2M_Testcases {
 							//Check attribute 1
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional)) {
-        							if(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.labels != v_labels_1){
-        								setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
-        							}
+									if(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.labels != v_labels_1){
+										setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
+									}
 								}
 							}
 						}
@@ -2754,6 +2989,8 @@ module OneM2M_Testcases {
 						var RequestPrimitive v_request;
 						var integer v_aeIndex := -1;
 						var integer v_resourceIndex := -1;
+						var CseTester v_notifyHandler;
+						var integer v_ae2Index := -1;
     										   
 						// Test control
     				
@@ -2764,7 +3001,9 @@ module OneM2M_Testcases {
     				
 						// Preamble
 						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
-											    
+						
+						f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_createRequestPrimitive, p_resourceType);
+						
 						v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_aeIndex); 				
     									
 						// Test Body
@@ -2806,7 +3045,7 @@ module OneM2M_Testcases {
 						var Labels v_labels_2 := {"To be deleted"};
 						var AttributeList v_nullFields;
 						var ResponsePrimitive v_responsePrimitive;
-                        var template RequestPrimitive v_createRequest := m_createContainerBase;
+						var template RequestPrimitive v_createRequest := m_createContainerBase;
 						var template RequestPrimitive v_updateRequest := m_updateContainerBase;
 						
 						v_createRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_1;
@@ -2820,11 +3059,11 @@ module OneM2M_Testcases {
 							//Check attribute 1
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Container_optional)) {
-        							if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.labels)){ 
-        								if(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.labels != {""}) {
-        									setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly");
-        								}
-        							}
+									if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.labels)){ 
+										if(not(match(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.labels,{""}))) {
+											setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly");
+										}
+									}
 								}
 							}
 						}
@@ -2850,9 +3089,9 @@ module OneM2M_Testcases {
 							//Check attribute 1
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Group_optional)) {
-        							if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.labels)){
-        								setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly")
-        							}
+									if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.labels)){
+										setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly")
+									}
 								}
 							}
 						}
@@ -2878,9 +3117,9 @@ module OneM2M_Testcases {
 							//Check attribute 1
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional)) {
-        							if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.labels)){
-        								setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly")
-        							}
+									if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.labels)){
+										setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly")
+									}
 								}
 							}
 						}
@@ -2906,9 +3145,9 @@ module OneM2M_Testcases {
 							//Check attribute 1
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional)) {
-        							if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.labels)){
-        								setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly")
-        							}
+									if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.labels)){
+										setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly")
+									}
 								}
 							}
 						}
@@ -2934,9 +3173,9 @@ module OneM2M_Testcases {
 							//Check attribute 1
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional)) {
-        							if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.labels)){
-        								setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly")
-        							}
+									if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.labels)){
+										setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly")
+									}
 								}
 							}
 						}
@@ -2962,9 +3201,9 @@ module OneM2M_Testcases {
 							//Check attribute 1
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional)) {
-        							if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.labels)){
-        								setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly")
-        							}
+									if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.labels)){
+										setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly")
+									}
 								}
 							}
 						}
@@ -2977,6 +3216,8 @@ module OneM2M_Testcases {
 						var RequestPrimitive v_request;
 						var integer v_aeIndex := -1;
 						var integer v_resourceIndex := -1;
+						var CseTester v_notifyHandler;
+						var integer v_ae2Index := -1;
     										   
 						// Test control
     				
@@ -2987,7 +3228,9 @@ module OneM2M_Testcases {
     				
 						// Preamble
 						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
-											    
+						
+						f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_createRequestPrimitive, p_resourceType);
+						
 						v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_aeIndex); 				
     									
 						// Test Body
@@ -3044,40 +3287,37 @@ module OneM2M_Testcases {
 						if(getverdict == pass){
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Container_optional)) {
-        							//Check attribute 1
-        							if(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.expirationTime != valueof(v_updateRequest.primitiveContent.any_1[0].Container_optional.expirationTime)){
-        								setverdict(fail, testcasename() & ": Error: Expiration Time attribute not updated correctly")
-        							}
-        							//Check attribute 2
-        							if(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.maxNrOfInstances != valueof(v_updateRequest.primitiveContent.any_1[0].Container_optional.maxNrOfInstances)){
-        								setverdict(fail, testcasename() & ": Error: MaxNrOfInstances attribute not updated correctly")
-        							}
-        							//Check attribute 3
-        							if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.labels)){
-        								setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly")
-        							}
-								}
+									//Check attribute 1
+									if(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.expirationTime != valueof(v_updateRequest.primitiveContent.any_1[0].Container_optional.expirationTime)){
+										setverdict(fail, testcasename() & ": Error: Expiration Time attribute not updated correctly")
+									}
+									//Check attribute 2
+									if(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.maxNrOfInstances != valueof(v_updateRequest.primitiveContent.any_1[0].Container_optional.maxNrOfInstances)){
+										setverdict(fail, testcasename() & ": Error: MaxNrOfInstances attribute not updated correctly")
+									}
+									//Check attribute 3
+									if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.labels)){
+										setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly")
+									}
+								}
 							}
 						}
 					}
 
 					testcase TC_CSE_DMR_UPD_BV_004_02() runs on CseTester system CseSystem {
 						// Local variables
-						var XSD.String v_groupName_1 := "VALUE_1";//Attribute 1
-						var XSD.String v_groupName_2 := "VALUE_2";
+						var XSD.String v_groupName_1 := "VALUE_1";
 						var Labels v_labels_1 := {"VALUE_1"};
 						var Labels v_labels_2 := {"To be deleted"};
-						var AcpType v_acp := {"ACP_ID"};
 						
 						var AttributeList_1 v_nullFields;
 						var template RequestPrimitive v_createRequest := m_createGroupBase;
 						var template RequestPrimitive v_updateRequest := m_updateGroupBase;
 						var ResponsePrimitive v_responsePrimitive;
-						
-						v_createRequest.primitiveContent.any_1[0].Group_optional.groupName:= v_groupName_1;//Attribute 1
+												
 						v_createRequest.primitiveContent.any_1[0].Group_optional.labels := v_labels_1;//Attribute 3
-						v_updateRequest.primitiveContent.any_1[0].Group_optional.groupName:= v_groupName_2;//Attribute 1
-						v_updateRequest.primitiveContent.any_1[0].Group_optional.accessControlPolicyIDs := v_acp;//Attribute 2 //TODO Check another attribute
+						v_updateRequest.primitiveContent.any_1[0].Group_optional.expirationTime := "20301231T012345";//Attribute 1
+						v_updateRequest.primitiveContent.any_1[0].Group_optional.groupName:= v_groupName_1;//Attribute 2
 						v_updateRequest.primitiveContent.any_1[0].Group_optional.labels := v_labels_2;//Attribute 3
 						
 						v_nullFields := {"labels"};
@@ -3087,18 +3327,18 @@ module OneM2M_Testcases {
 						if(getverdict == pass){
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Group_optional)) {
-        							//Check attribute 1
-        							if(not match(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.groupName, valueof(v_updateRequest.primitiveContent.any_1[0].Group_optional.groupName))){
-        								setverdict(fail, testcasename() & ": Error: Expiration Time attribute not updated correctly")
-        							}
-        							//Check attribute 2
-        							if(not match(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.accessControlPolicyIDs, valueof(v_updateRequest.primitiveContent.any_1[0].Group_optional.accessControlPolicyIDs))){
-        								setverdict(fail, testcasename() & ": Error: MaxNrOfInstances attribute not updated correctly")
-        							}
-        							//Check attribute 3
-        							if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.labels)){
-        								setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly")
-        							}
+									//Check attribute 1
+									if(not match(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.groupName, valueof(v_updateRequest.primitiveContent.any_1[0].Group_optional.groupName))){
+										setverdict(fail, testcasename() & ": Error: groupName attribute not updated correctly")
+									}
+									//Check attribute 2
+									if(not match(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.expirationTime, valueof(v_updateRequest.primitiveContent.any_1[0].Group_optional.expirationTime))){
+										setverdict(fail, testcasename() & ": Error: expirationTime attribute not updated correctly")
+									}
+									//Check attribute 3
+									if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.labels)){
+										setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly")
+									}
 								}
 							}
 						}
@@ -3108,16 +3348,7 @@ module OneM2M_Testcases {
 						// Local variables
 						var Labels v_labels_1 := {"VALUE_1"};
 						var Labels v_labels_2 := {"To be deleted"};
-						var SetOfAcrs v_privileges_1 := {
-							accessControlRule_list := {
-								{
-									accessControlOriginators := {"admin:admin"},
-									accessControlOperations := int63,
-									accessControlContexts_list := {}
-								}
-							}
-						}
-						var SetOfAcrs v_privileges_2 := {
+						var SetOfAcrs v_privileges_2 := { //
 							accessControlRule_list := {
 								{
 									accessControlOriginators := {"admin:admin"},
@@ -3127,11 +3358,11 @@ module OneM2M_Testcases {
 							}
 						}
 						var AttributeList_1 v_nullFields;
-						var template RequestPrimitive v_createRequest := m_createAcpBase;
+						var template RequestPrimitive v_createRequest := m_createAcpBase;// privileges set by default to 63 for *
 						var template RequestPrimitive v_updateRequest := m_updateAcpBase;
 						var ResponsePrimitive v_responsePrimitive;
 						
-						v_createRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges := v_privileges_1;//Attribute 1
+						v_createRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.labels := v_labels_1;//Attribute 3
 						v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges := v_privileges_2; //Attribute 1
 						v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.announceTo := {PX_URI_CSE};//Attribute 2
 						v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.labels := v_labels_2;//Attribute 3
@@ -3143,18 +3374,18 @@ module OneM2M_Testcases {
 						if(getverdict == pass){
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional)) {
-        							//Check attribute 1
-        							if(not match(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges, valueof(v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges))){
-        								setverdict(fail, testcasename() & ": Error: Privileges attribute not updated correctly")
-        							}
-        							//Check attribute 2
-        							if(not match(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.announceTo, valueof(v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.announceTo))){
-        								setverdict(fail, testcasename() & ": Error: Expiration Time attribute not updated correctly")
-        							}
-        							//Check attribute 3
-        							if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.labels)){
-        								setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly")
-        							}
+									//Check attribute 1
+									if(not match(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges, valueof(v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges))){
+										setverdict(fail, testcasename() & ": Error: Privileges attribute not updated correctly")
+									}
+									//Check attribute 2
+									if(not match(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.announceTo, valueof(v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.announceTo))){
+										setverdict(fail, testcasename() & ": Error: Announce_to attribute not updated correctly")
+									}
+									//Check attribute 3
+									if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.labels)){
+										setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly")
+									}
 								}
 							}
 						}
@@ -3181,18 +3412,18 @@ module OneM2M_Testcases {
 						if(getverdict == pass){
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional)) {
-        							//Check attribute 1
-        							if(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.scheduleElement != valueof(v_updateRequest.primitiveContent.any_1[0].Schedule_optional.scheduleElement)){
-        								setverdict(fail, testcasename() & ": Error: Expiration Time attribute not updated correctly")
-        							}
-        							//Check attribute 2
-        							if(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.announceTo != valueof(v_updateRequest.primitiveContent.any_1[0].Schedule_optional.announceTo)){
-        								setverdict(fail, testcasename() & ": Error: MaxNrOfInstances attribute not updated correctly")
-        							}
-        							//Check attribute 3
-        							if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.labels)){
-        								setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly")
-        							}
+									//Check attribute 1
+									if(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.scheduleElement != valueof(v_updateRequest.primitiveContent.any_1[0].Schedule_optional.scheduleElement)){
+										setverdict(fail, testcasename() & ": Error: Expiration Time attribute not updated correctly")
+									}
+									//Check attribute 2
+									if(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.announceTo != valueof(v_updateRequest.primitiveContent.any_1[0].Schedule_optional.announceTo)){
+										setverdict(fail, testcasename() & ": Error: MaxNrOfInstances attribute not updated correctly")
+									}
+									//Check attribute 3
+									if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.labels)){
+										setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly")
+									}
 								}
 							}
 						}
@@ -3202,14 +3433,15 @@ module OneM2M_Testcases {
 						// Local variables
 						var Labels v_labels_1 := {"VALUE_1"};
 						var Labels v_labels_2 := {"To be deleted"};
+						var AcpType v_acp := {"ACP_ID"};
 						var AttributeList_1 v_nullFields;
 						var template RequestPrimitive v_createRequest := m_createPollingChannelBase;
 						var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase;
 						var ResponsePrimitive v_responsePrimitive;
 						
 						v_createRequest.primitiveContent.any_1[0].PollingChannel_optional.labels := v_labels_1;//Attribute 3
-						// No Attribute 1
-						// TODO Find another attribute 2
+						//No Attribute 1
+						//v_updateRequest.primitiveContent.any_1[0].PollingChannel_optional.accessControlPolicyIDs := v_acp;//Attribute 2 TODO Find another alternative for Attribute 2
 						v_updateRequest.primitiveContent.any_1[0].PollingChannel_optional.labels := v_labels_2;//Attribute 3
 						
 						v_nullFields := {"labels"};
@@ -3219,15 +3451,16 @@ module OneM2M_Testcases {
 						if(getverdict == pass){
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional)) {
-        							//Check attribute 1
+									//Check attribute 1
         							
-        							//Check attribute 2
-        							// TODO Add checking for attribute 2 
-        							
-        							//Check attribute 3
-        							if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.labels)){
-        								setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly")
-        							}
+									//Check attribute 2 TODO once another alternative is found, activate this checking
+									/*if(not match(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.accessControlPolicyIDs, valueof(v_updateRequest.primitiveContent.any_1[0].PollingChannel_optional.accessControlPolicyIDs))){
+										setverdict(fail, testcasename() & ": Error: ACPI attribute not added correctly")
+									}*/
+									//Check attribute 3
+									if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.labels)){
+										setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly")
+									}
 								}
 							}
 						}
@@ -3236,18 +3469,15 @@ module OneM2M_Testcases {
 					testcase TC_CSE_DMR_UPD_BV_004_06() runs on CseTester system CseSystem {
 						// Local variables
 						var Labels v_labels_1 := {"VALUE_1"};
-						var Labels v_labels_2 := {"VALUE_2"};
-						var AcpType v_acp := {"ACP_ID"};
 						var AttributeList_1 v_nullFields;
 						var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
 						var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
 						var ResponsePrimitive v_responsePrimitive;
 						
-						v_createRequest.primitiveContent.any_1[0].Subscription_optional.labels := v_labels_1;//Attribute 1
-						v_createRequest.primitiveContent.any_1[0].Subscription_optional.expirationCounter := 5;//Attribute 3
-						v_updateRequest.primitiveContent.any_1[0].Subscription_optional.labels := v_labels_2;//Attribute 1
-						v_updateRequest.primitiveContent.any_1[0].Subscription_optional.accessControlPolicyIDs := v_acp; //Attribute 2
-						v_updateRequest.primitiveContent.any_1[0].Subscription_optional.expirationCounter := 1;//Attribute 3
+						v_createRequest.primitiveContent.any_1[0].Subscription_optional.expirationCounter := 10;//Attribute 3
+						v_updateRequest.primitiveContent.any_1[0].Subscription_optional.expirationTime := "20301231T012345";//Attribute 1
+						v_updateRequest.primitiveContent.any_1[0].Subscription_optional.labels := v_labels_1;//Attribute 2
+						v_updateRequest.primitiveContent.any_1[0].Subscription_optional.expirationCounter := 5;//Attribute 3
 						
 						v_nullFields := {"expirationCounter"};
       							
@@ -3256,21 +3486,21 @@ module OneM2M_Testcases {
 						if(getverdict == pass){
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional)) {
-            						//Check attribute 1
-            						if(not match(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.labels, valueof(v_updateRequest.primitiveContent.any_1[0].Subscription_optional.labels))){
-            							setverdict(fail, testcasename() & ": Error: Expiration Time attribute not updated correctly")
-            						}
-            						//Check attribute 2
-            						if(not match(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.accessControlPolicyIDs, valueof(v_updateRequest.primitiveContent.any_1[0].Subscription_optional.accessControlPolicyIDs))){
-            							setverdict(fail, testcasename() & ": Error: MaxNrOfInstances attribute not updated correctly")
-            						}
-            						//Check attribute 3
-            						if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.expirationCounter)){
-            							setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly")
-            						}
+									//Check attribute 1
+									if(not match(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.labels, valueof(v_updateRequest.primitiveContent.any_1[0].Subscription_optional.labels))){
+										setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
+									}
+									//Check attribute 2
+									if(not match(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.expirationTime, valueof(v_updateRequest.primitiveContent.any_1[0].Subscription_optional.expirationTime))){
+										setverdict(fail, testcasename() & ": Error: expirationTime attribute not updated correctly")
+									}
+									//Check attribute 3
+									if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.expirationCounter)){
+										setverdict(fail, testcasename() & ": Error: expirationCounter attribute not deleted correctly")
+									}
 								}
 							}
-    					}
+						}
 					}
 					
 					function f_CSE_DMR_UPD_BV_004(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, template (omit) AttributeList_1 p_nullFields := omit) runs on CseTester return ResponsePrimitive {
@@ -3280,6 +3510,8 @@ module OneM2M_Testcases {
 						var RequestPrimitive v_request;
 						var integer v_aeIndex := -1;
 						var integer v_resourceIndex := -1;
+						var CseTester v_notifyHandler;
+						var integer v_ae2Index := -1;
     										   
 						// Test control
     				
@@ -3290,9 +3522,11 @@ module OneM2M_Testcases {
     				
 						// Preamble
 						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
-					    
+						
+						f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_createRequestPrimitive, p_resourceType);
+						
 						v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_aeIndex); 				
-    									
+    					
 						// Test Body
 						v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive);
 						
@@ -3324,9 +3558,9 @@ module OneM2M_Testcases {
     				
 				} // end g_CSE_DMR_UPD_BV_004
 				
-				group g_CSE_DMR_UPD_BO_005{
+				group g_CSE_DMR_UPD_BI_005{
 					
-					testcase TC_CSE_DMR_UPD_BO_005_01() runs on CseTester system CseSystem {
+					testcase TC_CSE_DMR_UPD_BI_005_01() runs on CseTester system CseSystem {
 						// Local variables
 						var XSD.PositiveInteger v_expirationCounter := 1;
 						var template RequestPrimitive v_updateRequest := m_updateContainerBase;
@@ -3335,10 +3569,10 @@ module OneM2M_Testcases {
 
 						v_updateRequest.primitiveContent.any_1[0].Container_update_invalid.expirationCounter := v_expirationCounter;
 						
-						f_CSE_DMR_UPD_BO_005(int3, m_createContainerBase, v_updateRequest);//Container
+						f_CSE_DMR_UPD_BI_005(int3, m_createContainerBase, v_updateRequest);//Container
 					}
 
-					testcase TC_CSE_DMR_UPD_BO_005_02() runs on CseTester system CseSystem {
+					testcase TC_CSE_DMR_UPD_BI_005_02() runs on CseTester system CseSystem {
 						// Local variables
 						var XSD.PositiveInteger v_expirationCounter := 1;
 						var template RequestPrimitive v_updateRequest := m_updateGroupBase;
@@ -3347,10 +3581,10 @@ module OneM2M_Testcases {
 						
 						v_updateRequest.primitiveContent.any_1[0].Group_update_invalid.expirationCounter := v_expirationCounter;
 						
-						f_CSE_DMR_UPD_BO_005(int9, m_createGroupBase, v_updateRequest);//Group
+						f_CSE_DMR_UPD_BI_005(int9, m_createGroupBase, v_updateRequest);//Group
 					}
 					
-					testcase TC_CSE_DMR_UPD_BO_005_03() runs on CseTester system CseSystem {
+					testcase TC_CSE_DMR_UPD_BI_005_03() runs on CseTester system CseSystem {
 						// Local variables
 						var XSD.PositiveInteger v_expirationCounter := 1;
 						var template RequestPrimitive v_updateRequest := m_updateAcpBase;
@@ -3359,10 +3593,10 @@ module OneM2M_Testcases {
 						
 						v_updateRequest.primitiveContent.any_1[0].ACP_update_invalid.expirationCounter := v_expirationCounter;
 								
-						f_CSE_DMR_UPD_BO_005(int1, m_createAcpBase, v_updateRequest);//AccessControlPolicy
+						f_CSE_DMR_UPD_BI_005(int1, m_createAcpBase, v_updateRequest);//AccessControlPolicy
 					}
 				
-					testcase TC_CSE_DMR_UPD_BO_005_04() runs on CseTester system CseSystem {
+					testcase TC_CSE_DMR_UPD_BI_005_04() runs on CseTester system CseSystem {
 						// Local variables
 						var XSD.PositiveInteger v_expirationCounter := 1;
 						var template RequestPrimitive v_updateRequest := m_updateScheduleBase;
@@ -3371,10 +3605,10 @@ module OneM2M_Testcases {
 
 						v_updateRequest.primitiveContent.any_1[0].Schedule_update_invalid.expirationCounter := v_expirationCounter;
 										
-						f_CSE_DMR_UPD_BO_005(int18, m_createScheduleBase, v_updateRequest);//Schedule
+						f_CSE_DMR_UPD_BI_005(int18, m_createScheduleBase, v_updateRequest);//Schedule
 					}
 					
-					testcase TC_CSE_DMR_UPD_BO_005_05() runs on CseTester system CseSystem {
+					testcase TC_CSE_DMR_UPD_BI_005_05() runs on CseTester system CseSystem {
 						// Local variables
 						var XSD.PositiveInteger v_expirationCounter := 1;
 						var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase;
@@ -3383,10 +3617,10 @@ module OneM2M_Testcases {
 						
 						v_updateRequest.primitiveContent.any_1[0].PollingChannel_update_invalid.expirationCounter := v_expirationCounter;
 							
-						f_CSE_DMR_UPD_BO_005(int15, m_createPollingChannelBase, v_updateRequest);//PollingChannel
+						f_CSE_DMR_UPD_BI_005(int15, m_createPollingChannelBase, v_updateRequest);//PollingChannel
 					}
 					
-					testcase TC_CSE_DMR_UPD_BO_005_06() runs on CseTester system CseSystem {
+					testcase TC_CSE_DMR_UPD_BI_005_06() runs on CseTester system CseSystem {
 						// Local variables
 						var XSD.NonNegativeInteger v_maxNrOfInstances := 5;
 						var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
@@ -3395,10 +3629,10 @@ module OneM2M_Testcases {
 						
 						v_updateRequest.primitiveContent.any_1[0].Subscription_update_invalid.maxNrOfInstances := v_maxNrOfInstances;
 								
-						f_CSE_DMR_UPD_BO_005(int23, m_createSubscriptionBase, v_updateRequest);//Subscription
-						}
+						f_CSE_DMR_UPD_BI_005(int23, m_createSubscriptionBase, v_updateRequest);//Subscription
+					}
 					
-					function f_CSE_DMR_UPD_BO_005(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on CseTester {
+					function f_CSE_DMR_UPD_BI_005(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on CseTester {
     				
 						// Local variables
 						var MsgIn v_response;
@@ -3414,7 +3648,7 @@ module OneM2M_Testcases {
     				
 						// Preamble
 						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
-						
+
 						// Test Body
 						v_request := f_getUpdateRequestPrimitive(p_resourceType, v_aeIndex, p_updateRequestPrimitive);
 						
@@ -3423,7 +3657,7 @@ module OneM2M_Testcases {
 						mcaPort.send(m_request(v_request));
 						tc_ac.start;
 						alt {
-							[] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) -> value v_response {
+							[] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response {
 								tc_ac.stop;
 								setverdict(pass, testcasename() & ": Resource " & c_defaultResourceName & " of type " & int2str(enum2int(p_resourceType)) & " not found");
 							}
@@ -3446,9 +3680,9 @@ module OneM2M_Testcases {
 						// Tear down
 						f_cf01Down();
     					    				
-					}//end f_CSE_DMR_UPD_BO_005
+					}//end f_CSE_DMR_UPD_BI_005
     				
-				} // end g_CSE_DMR_UPD_BO_005
+				} // end g_CSE_DMR_UPD_BI_005
 				
 				group g_CSE_DMR_UPD_BO_006{
 					
@@ -3521,9 +3755,16 @@ module OneM2M_Testcases {
 						var MsgIn v_response;
 						var RequestPrimitive v_request;
 						var integer v_aeIndex := -1;
+						var integer v_acpAuxIndex := -1;
 						var integer v_resourceIndex := -1;
+						var CseTester v_notifyHandler;
+						var integer v_ae2Index := -1;
     										   
 						// Test control
+						if(not(PICS_ACP_SUPPORT)) {
+							setverdict(inconc, testcasename() & ": AccessControlPolicy support is required to run this test case");
+							stop;
+						}
     				
 						// Test component configuration
 						f_cf01Up();
@@ -3531,8 +3772,11 @@ module OneM2M_Testcases {
 						// Test adapter configuration
     				
 						// Preamble
-						v_aeIndex := f_cse_preamble_registerAe(int59);//c_CRDNDi);
+						v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int59);//c_CRDNDi)
+						
+						v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);//c_CRDNDi);
 						
+						f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_createRequestPrimitive, p_resourceType);
 						
 						v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_aeIndex); 				
 																
@@ -3645,6 +3889,8 @@ module OneM2M_Testcases {
 						var RequestPrimitive v_request;
 						var integer v_aeIndex := -1;
 						var integer v_resourceIndex := -1;
+						var CseTester v_notifyHandler;
+						var integer v_ae2Index := -1;
     										   
 						// Test control
     				
@@ -3656,6 +3902,8 @@ module OneM2M_Testcases {
 						// Preamble
 						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
 						
+						f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_createRequestPrimitive, p_resourceType);
+						
 						v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_aeIndex); 				
 																
 						// Test Body
@@ -3778,6 +4026,8 @@ module OneM2M_Testcases {
 						var RequestPrimitive v_request;
 						var integer v_aeIndex := -1;
 						var integer v_resourceIndex := -1;
+						var CseTester v_notifyHandler;
+						var integer v_ae2Index := -1;
     										   
 						// Test control
     				
@@ -3789,6 +4039,8 @@ module OneM2M_Testcases {
 						// Preamble
 						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
 						
+						f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_createRequestPrimitive, p_resourceType);
+						
 						v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_aeIndex); 				
 																
 						// Test Body
@@ -3824,1060 +4076,5368 @@ module OneM2M_Testcases {
     				
 				} // end g_CSE_DMR_UPD_BO_008				
 
-			}//end group Update
-			
-		}//end group Data_Management_and_Repository
+				group g_CSE_DMR_UPD_BV_009{
+
+					testcase TC_CSE_DMR_UPD_BV_009() runs on CseTester system CseSystem {
+						var MsgIn v_response;
+						var integer v_aeIndex := -1;
+						var integer v_containerIndex := -1;
+						var RequestPrimitive v_updateRequest := valueof(m_updateContainerBase);
+						var Labels v_labels_1:= {"VALUE_1"};
+						v_updateRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_1;
+				   
+						// Test control
+
+						// Test component configuration
+						f_cf01Up();
+
+						// Test adapter configuration
+
+						// Preamble
+						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
 		
-		//@Martin
-		group Location {
-		  		    
-		  	group g_CSE_LOC_BV_001{  		    
-		    
-     	     testcase TC_CSE_LOC_BV_001() runs on CseTester system CseSystem {
-     	    	
-     	    	var integer v_aeAuxIndex 		:= -1;	
-     	    	var XSD.ID p_aeResourceAddress 	:= PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;    	      	     	
-     	     	var RequestPrimitive v_request;
-     	     	var MsgIn v_response;
-     	     	
-     	     	//Test component configuration
-     	     	f_cf01Up();
-     	     	
-     	     	//Preamble
-     	     	v_aeAuxIndex := f_cse_preamble_registerAe();
-     	     	     	     	
-     	     	//Set requestPrimitive
-     	     	v_request	 := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(p_aeResourceAddress, omit, omit, omit, omit), v_aeAuxIndex);
-     	     	
-     	     	//Test Body
-     	     	mcaPort.send(m_request(v_request));
-     	    	tc_ac.start;
-     	    	alt{
-     	    	  [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value v_response { //BAD REQUEST
-     	    	    tc_ac.stop;
-     	    	    setverdict(pass, testcasename() & "Resource <locationPolicy> create request is rejected due to invalid request body message!!");     	    	    
-     	    	  }
-     	    	  [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
-     	    	    tc_ac.stop;
-    				setverdict(fail, testcasename() & ": Error while handling an invalid locationPolicy resource create request with response status code:" & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));     	    	    
-     	    	  }
-     	    	   [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
-     	    	    tc_ac.stop;
-    				setverdict(fail, testcasename() & ": Created a locationPolicy resource for an invalid create request with response status code:" & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));     	    	    
-     	    	  } 
-     	    	  [] tc_ac.timeout {
-    					setverdict(inconc, testcasename() & ": Timeout due to no response received from requested server!");
-    			  }   	    	  
-     	    	      	    	  
-     	    	}
-     	    	// Postamble
-    			f_cse_postamble_deleteResources();	
-    			
-				// Tear down
-				f_cf01Down();
-     	    
-     	    }// end testcase TC_CSE_LOC_BV_001
-		}//end group g_CSE_LOC_BV_001
-			
-			
-		group g_CSE_LOC_BV_002{  	    
-		    testcase TC_CSE_LOC_BV_002() runs on CseTester system CseSystem {
-				
-				var integer v_aeAuxIndex 				:= -1;				
-				var XSD.ID p_aeResourceAddress			:= PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
-				var XSD.Duration locationUpdatePeriod 	:= PX_LOCATION_UPDATE_PERIOD;  
-				var XSD.Token locationTargetID			:= PX_LOCATION_TARGET_ID;
-				var XSD.AnyURI locationServerAddress	:= PX_LOCATION_SERVER_ADDRESS;
-				var RequestPrimitive v_request;
-				var MsgIn v_response;
-     	     	
-     	     	//Test component configuration
-     	     	f_cf01Up();
-     	     	
-     	     	//Preamble
-     	     	v_aeAuxIndex := f_cse_preamble_registerAe();
-     	     	     	     	
-     	     	//Set requestPrimitive
-     	     	v_request	 := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(p_aeResourceAddress, omit, locationUpdatePeriod, locationTargetID, locationServerAddress), v_aeAuxIndex);
-     	     	    									
-    			// Test Body					
-    			mcaPort.send(m_request(v_request));
-    			tc_ac.start;
-    			alt {
-    				[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
-    					tc_ac.stop;
-    					setverdict(pass, testcasename() & ": Resource locationPolicy is created successfuly with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!");
-    				}
-    				[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
-    					tc_ac.stop;
-    					setverdict(fail, testcasename() & ": Error occurrs with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)) & "while handling a valid locationPolicy resource create request!");
-    				}
-    				[] tc_ac.timeout {
-    					setverdict(inconc, testcasename() & ": Timeout due to no response from requested server!");
-    				}
-    			}	
-    								
-    			// Postamble
-    			f_cse_postamble_deleteResources();	
-    			
-				// Tear down
-				f_cf01Down();                        
-				
-			 }// end testcase TC_CSE_LOC_BV_002	
-			
-	    }//end group g_CSE_LOC_BV_002
-	
-			  
-		  group g_CSE_LOC_BO_001{
-		    
-		    testcase TC_CSE_LOC_BO_001() runs on CseTester system CseSystem {//no AE_ID presented in the from_ is assigned privilege to do locationPolicy resource create operation!!
-		      	
-		      	var integer v_aeAuxIndex 				:= -1;
-		        var XSD.ID p_aeResourceAddress 			:= PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
-				var XSD.Duration locationUpdatePeriod 	:= PX_LOCATION_UPDATE_PERIOD;    
-				var XSD.Token locationTargetID			:= PX_LOCATION_TARGET_ID;
-				var XSD.AnyURI locationServerAddress	:= PX_LOCATION_SERVER_ADDRESS;
-				var RequestPrimitive v_request;	
-				var MsgIn v_response;
-				     	     	
-     	     	//Test component configuration
-     	     	f_cf01Up();
-     	     	
-     	     	//Preamble
-     	     	v_aeAuxIndex 			:= f_cse_preamble_registerAe(int62);//c_RUDNDi //No resource creation privilege
-     	     	
-     	     	//Request target resource address
-     	     	p_aeResourceAddress		:= f_addPrefix(f_getResourceAddress(v_aeAuxIndex));
-     	     	
-     	     	//Set requestPrimitive
-     	     	v_request				:= f_getCreateRequestPrimitive(int10, m_createLocationPolicy(p_aeResourceAddress, omit, locationUpdatePeriod, locationTargetID, locationServerAddress), v_aeAuxIndex);
-     	        									
-    			// Test Body					
-    			mcaPort.send(m_request(v_request));
-    			tc_ac.start;
-    			alt {
-    				[] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response {
-    					tc_ac.stop;
-    					setverdict(pass, testcasename() & ": Access denied to create a resource including locationPolicy!");
-    				}
-    				[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
-    					tc_ac.stop;
-    					setverdict(fail, testcasename() & ": Error occurrs with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)) & "due to IUT failed to check the access privilege of originator!");
-    				}
-    				[] tc_ac.timeout {
-    					setverdict(inconc, testcasename() & ": Timeout due to no response from requested server!");
-    				}
-    			}
-    								
-    			// Postamble
-    			f_cse_postamble_deleteResources();	
-    			
-				// Tear down
-				f_cf01Down();				
-		      
-		      
-		    } // end testcase TC_CSE_LOC_BO_001
-		    
-		}//end group g_CSE_LOC_BO_001
-		    
-		group g_CSE_LOC_BO_002{  	
-		    testcase TC_CSE_LOC_BO_002() runs on CseTester system CseSystem {
-		      	
-		      	var integer v_aeAuxIndex 				:= -1;
-		        var XSD.ID p_targetResourceAddress		:= PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName & "/" & c_defaultResourceName;
-				var XSD.Duration locationUpdatePeriod 	:= PX_LOCATION_UPDATE_PERIOD;  
-				var XSD.Token locationTargetID			:= PX_LOCATION_TARGET_ID;
-				var XSD.AnyURI locationServerAddress	:= PX_LOCATION_SERVER_ADDRESS;
-				var RequestPrimitive v_request;
-				var MsgIn v_response;
-								    				
-    			//Test component configuration
-     	     	f_cf01Up();
-     	     	
-     	     	//Preamble
-     	     	v_aeAuxIndex 	:= f_cse_preamble_registerAe();
-     	     	
-     	     	//Set requestPrimitive
-     	     	v_request		:= f_getCreateRequestPrimitive(int10, m_createLocationPolicy(p_targetResourceAddress, omit, locationUpdatePeriod, locationTargetID, locationServerAddress), v_aeAuxIndex);
-     	    							
-    			// Test Body					
-    			mcaPort.send(m_request(v_request));
-    			tc_ac.start;
-    			alt {
-    				[] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value v_response {
-    					tc_ac.stop;
-    					setverdict(pass, testcasename() & ": The targeted resource is not found!!");
-    				}
-    				[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
-    					tc_ac.stop;
-    					setverdict(fail, testcasename() & ": Error occurrs with response status code: "& int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)) & "due to IUT created a locationPolicy resource under a non-existed parent resource!");
-    				}
-    				[] tc_ac.timeout {
-    					setverdict(inconc, testcasename() & ": Timeout due to no response from requested server!");
-    				}
-    			}	
-    								
-    			// Postamble
-    			f_cse_postamble_deleteResources();	
-    			
-				// Tear down
-				f_cf01Down();
-				
-		    }// end testcase TC_CSE_LOC_BO_002
-		    
-		  }//end group g_CSE_LOC_BO_002
+						v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); 
 		
-		  
-		  group g_CSE_LOC_BI_001{
-		    
-		    testcase TC_CSE_LOC_BI_001() runs on CseTester system CseSystem {//reject a invalid update request with invalid attribtue locationUpdatePeriod
-		      
-		      	var integer v_aeAuxIndex 						:= -1;
-		      	var integer v_locPolicyResourceIndex			:= -1;
-		      	var XSD.ID p_aeResourceAddress 					:= PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
-		      	var XSD.ID p_defaultResourceAddress				:= PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName & "/" & c_defaultResourceName;
-				var XSD.Duration locationUpdatePeriod_invalid 	:= PX_LOCATION_UPDATE_PERIOD_INVALID;
-				var RequestPrimitive v_request;
-				var RequestPrimitive v_request_preamble;
-				var MsgIn v_response;
-								    				
-    			//Test component configuration
-     	     	f_cf01Up();
-     	     	
-     	     	//Preamble - register AE
-     	     	v_aeAuxIndex 				:= f_cse_preamble_registerAe();
-     	     	//Preamble - create a valid locationPolicy resource for later update use
-     	     	v_request_preamble			:= valueof(m_createLocationPolicy(p_aeResourceAddress, omit, PX_LOCATION_UPDATE_PERIOD, PX_LOCATION_TARGET_ID, PX_LOCATION_SERVER_ADDRESS));
-     	     	v_locPolicyResourceIndex	:= f_cse_createResource(int10, v_request_preamble, v_aeAuxIndex);     	     	
-     	     	
-     	     	//Set requestPrimitive
-     	     	v_request					:= f_getUpdateRequestPrimitive(int10, v_locPolicyResourceIndex, m_updateLocationPolicy(p_defaultResourceAddress, omit, locationUpdatePeriod_invalid));
-     	     	    									
-    			// Test Body					
-    			mcaPort.send(m_request(v_request));
-    			tc_ac.start;
-    			alt {
-    				[] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value v_response {
-    					tc_ac.stop;
-    					setverdict(pass, testcasename() & ": Update locationPolicy resource is rejected!!");
-    				}
-    				[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
-    					tc_ac.stop;
-    					setverdict(fail, testcasename() & ": Error occurrs with response status code: "& int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)) & "due to IUT failed to handle an invalid locationPolicy update request");
-    				}
-    				[] tc_ac.timeout {
-    					setverdict(inconc, testcasename() & ": Timeout due to no response from requested server!");
-    				}
-    			}	
-    								
-    			// Postamble
-    			f_cse_postamble_deleteResources();	 
-    			
-				// Tear down
-				f_cf01Down();      
-		      
-		    }//end testcase TC_CSE_LOC_BI_001
-		    
-		  }//end group g_CSE_LOC_BI_001
-		  
-		  
-		}//end group Location
+						// Test Body
+						if(ispresent(vc_resourcesList[v_containerIndex].resource.any_1[0].Container_optional.stateTag)) { 
 		
-        group Group_Managment {
-        
-                    
-            // Test objective:
-            // Check that the IUT rejects the creation of the group resource when member ID exceed max number
-            // of members.
-            group g_CSE_GMG_BV_001 {
-                
-                testcase TC_CSE_GMG_BV_001() runs on CseTester system CseSystem {
-                    
-                    // Local variables
-                    var MsgIn v_response;
-                    var RequestPrimitive v_request;
-                    var integer v_aeIndex := -1;
-                    var integer v_resourceIndex := -1;
-                                                                
-                    
-                    var template RequestPrimitive v_createRequest := m_createGroupBase;
-                    var ResponsePrimitive v_responsePrimitive;
+							v_updateRequest := f_getUpdateRequestPrimitive(int3, v_containerIndex, v_updateRequest);
+							f_cse_updateResource(v_updateRequest);
 
-                    v_createRequest.primitiveContent.any_1[0].Group_optional.currentNrOfMembers := 6;
-                    v_createRequest.primitiveContent.any_1[0].Group_optional.maxNrOfMembers := 5;
+							mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_containerIndex), f_getOriginator(v_containerIndex))));
 
-                                        
-                    //  Test control
-                    
-                    // Test component configuration
-                    f_cf01Up();
-                    
-                    // Test adapter configuration
-                                        
-                    // Preamble
-                    v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
-                                
-                    // Test Body
-                    v_request := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
+							tc_ac.start;
+							alt {
+								[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+									tc_ac.stop;
+									if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Container_optional.stateTag == 1) { //(Create and Delete)
+										setverdict(pass, testcasename() & ": The stateTag attribute is incremented");	
+									}
+									else{
+										setverdict(fail, testcasename() & ": Error the stateTag attribute is not incremented");
+									}
+								}
+								[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+									tc_ac.stop;
+									setverdict(fail, testcasename() & ": Error while retrieving resource attributes");
+								}
+								[] tc_ac.timeout {
+									setverdict(inconc, testcasename() & ": No answer while retrieving resource attributes");
+								}
+							}	
+				
+						}//end if
+						else{
+							setverdict(fail, testcasename() & ": Error the stateTag attribute is empty");
+						}
+		
+						// Postamble
+						f_cse_postamble_deleteResources();
+
+						// Tear down
+						f_cf01Down();
+			
+					}//end TC_CSE_DMR_UPD_BV_009
+					
+				} // end group g_CSE_DMR_UPD_BV_009
+
+			}//end group Update
+			
+			group Delete {
+			
+				group g_CSE_DMR_DEL_BV_001{
+
+					testcase TC_CSE_DMR_DEL_BV_001_01() runs on CseTester system CseSystem {
+						// Local variables
+                		
+						f_CSE_DMR_DEL_BV_001(int3, m_createContainerBase);//Container
+                		
+						if(getverdict == pass){
+							//check if "MyRessource" container resource isn't present in the IUT (for exemple attempt to update the resource)
+						};
+					};
                 
-                                                                         
-                    mcaPort.send(m_request(v_request));
-                    tc_ac.start;
-                    alt {
-                        [] mcaPort.receive(mw_response(mw_responsePrimitive(int6010))) -> value v_response {
-                            tc_ac.stop;
-                            setverdict(pass, testcasename() & ": Creation failed because member ID exceed max number of member");
-                        }
-                        [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
-                            tc_ac.stop;
-                            setverdict(fail, testcasename() & ": Error while retrieving resource");
-                        }
-                        [] tc_ac.timeout {
-                            setverdict(inconc, testcasename() & ": No answer while retrieving resource");
-                        }
-                    }
-                                    
-                    // Postamble
-                    f_cse_postamble_deleteResources();
-                    
-					// Tear down
-					f_cf01Down();
-                    
-                }
-            
-            } // end group g_CSE_GMG_BV_001
-        
+					testcase TC_CSE_DMR_DEL_BV_001_02() runs on CseTester system CseSystem {
+						// Local variables
+                		
+						f_CSE_DMR_DEL_BV_001(int9, m_createGroupBase);//Group
+					};
                 
-            
+					testcase TC_CSE_DMR_DEL_BV_001_03() runs on CseTester system CseSystem {
+						// Local variables
                 
-            // Test objective:
-            // Check that the IUT rejects the creation of the group resource when the memberType cannot
-            // be retrieved due to lack of privilege.
-            group g_CSE_GMG_BV_002 {
+						f_CSE_DMR_DEL_BV_001(int1, m_createAcpBase);//AccessControlPolicy
+					};
                 
-                testcase TC_CSE_GMG_BV_002() runs on CseTester system CseSystem
-                {
-            //TODO      
-                }
+					testcase TC_CSE_DMR_DEL_BV_001_04() runs on CseTester system CseSystem {
+						// Local variables
                 
-            } // end group g_CSE_GMG_BV_002
-            
-            
-            
-            // Test objective:
-            // Check that the IUT rejects the update of the group resource when the
-            // memberType cannot be retrieved due to lack of privilege.
-            group g_CSE_GMG_BV_003 {
+						f_CSE_DMR_DEL_BV_001(int18, m_createScheduleBase);//Schedule
+					};
                 
-                testcase TC_CSE_GMG_BV_003() runs on CseTester system CseSystem
-                {
-            //TODO                          
-                }
-            
-            } // end group g_CSE_GMG_BV_003
-            
-            // Test objective:
-            // Check that the IUT rejects the update of the group
-            // resource when member ID exceed max number of members.
-            group g_CSE_GMG_BV_004 {
+					testcase TC_CSE_DMR_DEL_BV_001_05() runs on CseTester system CseSystem {
+						// Local variables
                 
-                testcase TC_CSE_GMG_BV_004() runs on CseTester system CseSystem
-                {
-
-                    var MsgIn v_response;
-                    var RequestPrimitive v_request;
-                    var integer v_aeIndex := -1;
-                    var integer v_resourceIndex := -1;
-                    
-                    var template RequestPrimitive v_createRequest := m_createGroupBase;
-                    var template RequestPrimitive v_updateRequest := m_updateGroupBase;
-                            
-
-                    v_updateRequest.primitiveContent.any_1[0].Group_optional.currentNrOfMembers := 6;
-                    v_updateRequest.primitiveContent.any_1[0].Group_optional.maxNrOfMembers := 5;
+						f_CSE_DMR_DEL_BV_001(int15, m_createPollingChannelBase);//PollingChannel
+					};
                 
-                                    
-                    // Test control
-                    
-                    // Test component configuration
-                    f_cf01Up();
-                    
-                    // Test adapter configuration
-                                        
-                    // Preamble
-                    v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
-                    v_resourceIndex := f_cse_createResource(int9, v_createRequest, v_aeIndex);
-                    
-                    // Test Body
-                    v_request := f_getUpdateRequestPrimitive(int9, v_resourceIndex, v_updateRequest);
-                                     
-                                     
-                    mcaPort.send(m_request(v_request));
-                    tc_ac.start;
-                    alt {
-                        [] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) -> value v_response {
-                            tc_ac.stop;
-                            setverdict(pass, testcasename() & ": Update failed because member ID exceed max number of member");
-                        }
-                        [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
-                            tc_ac.stop;
-                            setverdict(fail, testcasename() & ": Error while retrieving resource");
-                        }
-                        [] tc_ac.timeout {
-                            setverdict(inconc, testcasename() & ": No answer while retrieving resource");
-                        }
-                    }
-                                    
-                    // Postamble
-                    f_cse_postamble_deleteResources();
-                    
-					// Tear down
-					f_cf01Down();
-                                    
-                }
+					testcase TC_CSE_DMR_DEL_BV_001_06() runs on CseTester system CseSystem {
+							// Local variables
                 
-            } // end group g_CSE_GMG_BV_004
-            
-            // Test objective:
-            // Check that the IUT accepts the creation of the  RESOURCE_TYPE resource by using
-            // fanOutPoint in group resource.
-            group g_CSE_GMG_BV_005 {
-            
-                testcase TC_CSE_GMG_BV_005() runs on CseTester system CseSystem
-                {
-                    
-                    // TODO: use right values for c_fanoutPointAddress and c_RessourceType1
-                    var XSD.AnyURI c_fanoutPointAddress := "FANOUTPOINT_ADDRESS";
-                    var ResourceType c_RessourceType1 := int1;
+						f_CSE_DMR_DEL_BV_001(int23, m_createSubscriptionBase);//Subscription
+					};	
                 
-                    // Local variables
-                    var MsgIn v_response;
-                    var RequestPrimitive v_request;
-                    var integer v_aeIndex := -1;
-                    var integer v_resourceIndex := -1;
-                                               
-                    
-                    var template RequestPrimitive v_createRequest := m_createGroupBase;
                 
-                        
-                    //v_createRequest.primitiveContent.any_1[0].Group_optional.fanOutPoint := c_fanoutPointAddress;FIXME
-                    v_createRequest.primitiveContent.any_1[0].Group_optional.resourceType := c_RessourceType1;
-                            
-                    
-                    // Test control
-                    
-                    // Test component configuration
-                    f_cf01Up();
-                    
-                    // Test adapter configuration
-                                        
-                    // Preamble
-                    v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
-                    v_resourceIndex := f_cse_createResource(int9, v_createRequest, v_aeIndex);
-                    
-                    // Test Body
-
-                    mcaPort.send(m_request(v_request));
-                    tc_ac.start;
-                    alt {
-                        [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
-                            tc_ac.stop;
-                            setverdict(pass, testcasename() & ": creation successfull by using fanOutPoint in group resource");
-                            
-//                          TODO: check for aggregatedResponse representation
-                            
-                        }
-                        [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
-                            tc_ac.stop;
-                            setverdict(fail, testcasename() & ": Error while retrieving resource");
-                        }
-                        [] tc_ac.timeout {
-                            setverdict(inconc, testcasename() & ": No answer while retrieving resource");
-                        }
-                    }
-                                    
-                    // Postamble
-                    f_cse_postamble_deleteResources();
-                    
-					// Tear down
-					f_cf01Down();                    
                 
-                }
+					function f_CSE_DMR_DEL_BV_001(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive) runs on CseTester {
+						// Local variables
+						var MsgIn v_response;
+						var RequestPrimitive v_request;
+						var integer v_aeIndex := -1;
+						var integer v_resourceIndex := -1;
+						var CseTester v_notifyHandler;
+						var integer v_ae2Index := -1;
+                							   
+						// Test control
                 
-            } // end group g_CSE_GMG_BV_005
-            
-            // Test objective:
-            // Check that the IUT returns successfully the resource of the group members by using
-            // fanOutPoint in group resource.
-            group g_CSE_GMG_BV_006 {
-            
-                testcase TC_CSE_GMG_BV_006() runs on CseTester system CseSystem
-                {
+						// Test component configuration
+						f_cf01Up();
                 
-                    
+						// Test adapter configuration
                 
-                    // TODO: use right values for c_fanoutPointAddress and c_RessourceType1
-                    var XSD.AnyURI c_fanoutPointAddress := "FANOUTPOINT_ADDRESS";
-                    var ResourceType c_RessourceType1 := int1;
+						// Preamble
+						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi)
+						
+						f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_createRequestPrimitive, p_resourceType);
+                		
+						v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_aeIndex); 				
+                												
+						// Test Body
+						v_request := valueof(m_deleteRequest(f_getResourceAddress(v_resourceIndex)));
+                		
+						mcaPort.send(m_request(v_request));
+						tc_ac.start;
+						alt {
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+								tc_ac.stop;
+								setverdict(pass, testcasename() & ": Resource" & int2str(enum2int(p_resourceType)) & " deleted successfuly");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error while deleting resource type " & int2str(enum2int(p_resourceType)));
+							}
+							[] tc_ac.timeout {
+								setverdict(inconc, testcasename() & ": No answer while deleting resource type " & int2str(enum2int(p_resourceType)));
+							}
+						}	
+                					
+						// Postamble
+						f_cse_postamble_deleteResources();
+                		
+						// Tear down
+						f_cf01Down();
+                							
+					};//end f_CSE_DMR_DEL_BV_001
                 
-                    // Local variables
-                    var XSD.ID v_resourceId := "NonExisting";
-                    var RequestPrimitive v_request;
-                    var MsgIn v_response;
-                    var integer v_aeIndex := -1;
-                    var integer v_resourceIndex := -1;
-                    
-                                
-                    v_request := valueof(m_retrieveResource(f_getResourceAddress(-2) & "/" & v_resourceId));
-                    //v_request.primitiveContent.any_1[0].Group_optional.fanOutPoint := c_fanoutPointAddress;FIXME
-                                                    
-                    
-                    // Test control
-                    
-                    // Test component configuration
-                    f_cf01Up();
-                    
-                    // Test adapter configuration
-                                        
-                    // Preamble
-                    v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
-                    v_resourceIndex := f_cse_createResource(int9, v_request, v_aeIndex);
-                    
-                    // Test Body
-
-                    mcaPort.send(m_request(valueof(v_request)));
-                    tc_ac.start;
-                    alt {
-                        [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value v_response {
-                            tc_ac.stop;
-                            setverdict(pass, testcasename() & ": retrieve attributes successfull by using fanOutPoint in group resource");
-                        
-//                          TODO: check for aggregatedResponse representation
-                        }
-                        [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
-                            tc_ac.stop;
-                            setverdict(fail, testcasename() & ": Error while retrieving resource");
-                        }
-                        [] tc_ac.timeout {
-                            setverdict(inconc, testcasename() & ": No answer while retrieving resource");
-                        }
-                    }
-                                    
-                    // Postamble
-                    f_cse_postamble_deleteResources();
-                    
-					// Tear down
-					f_cf01Down();
-                                    
-                }
-            
-            } // end group g_CSE_GMG_BV_006
-            
-            // Test objective:
-            // Check that the IUT accepts the update of the  RESOURCE_TYPE resource by using
-            // fanOutPoint in group resource.
-            group g_CSE_GMG_BV_007 {
-            
-                testcase TC_CSE_GMG_BV_007() runs on CseTester system CseSystem
-                {
-                                                            
-                    // TODO: use right values for c_fanoutPointAddress and c_RessourceType1
-                    var XSD.AnyURI c_fanoutPointAddress := "FANOUTPOINT_ADDRESS";
-    
-                    // Local variables
-                    var MsgIn v_response;
-                    var RequestPrimitive v_request;
-                    var integer v_aeIndex := -1;
-                    var integer v_resourceIndex := -1;
-                                                                
-                    var template RequestPrimitive v_createRequest := m_createGroupBase;
-                    var template RequestPrimitive v_updateRequest := m_updateGroupBase;
-                            
-                    //v_updateRequest.primitiveContent.any_1[0].Group_optional.fanOutPoint := c_fanoutPointAddress;FIXME
-                    
-                                    
-                    // Test control
-                    
-                    // Test component configuration
-                    f_cf01Up();
-                    
-                    // Test adapter configuration
-                                        
-                    // Preamble
-                    v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
-                    v_resourceIndex := f_cse_createResource(int9, v_createRequest, v_aeIndex);
-                    
-                    // Test Body
-                    v_request := f_getUpdateRequestPrimitive(int9, v_resourceIndex, v_updateRequest);
-                                     
-                                     
-                    mcaPort.send(m_request(v_request));
-                    tc_ac.start;
-                    alt {
-                        [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response {
-                            tc_ac.stop;
-                            setverdict(pass, testcasename() & ": update successfull by using fanOutPoint in group resource");
-                            
-//                          TODO: check for aggregatedResponse representation
-                            
-                        }
-                        [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
-                            tc_ac.stop;
-                            setverdict(fail, testcasename() & ": Error while retrieving resource");
-                        }
-                        [] tc_ac.timeout {
-                            setverdict(inconc, testcasename() & ": No answer while retrieving resource");
-                        }
-                    }
-                                    
-                    // Postamble
-                    f_cse_postamble_deleteResources();
-                    
-					// Tear down
-					f_cf01Down();
-                                    
-                }
-            
-            } // end group g_CSE_GMG_BV_007
-            
-            // Test objective:
-            // Check that the IUT could delete the  RESOURCE_TYPE resource by using
-            // fanOutPoint in group resource.
-            group g_CSE_GMG_BV_008_1 {
+				};//end of group g_CSE_DMR_DEL_BV_001
                 
-                testcase TC_CSE_GMG_BV_008_1() runs on CseTester system CseSystem
-                {
-                    // TODO: use right values for c_fanoutPointAddress and c_deleteAddress
-                    var XSD.AnyURI c_fanoutPointAddress := "FANOUTPOINT_ADDRESS";
-                    var XSD.ID c_deleteAddress := "DELETE";
+				group g_CSE_DMR_DEL_BV_002{
                 
-                    //Local variables
-                    var RequestPrimitive v_request;
-                    var integer v_aeIndex := -1;
-                    var integer v_resourceIndex := -1;
-                    var MsgIn v_response;
-                    
-                    
-                    var template RequestPrimitive v_createRequest := m_createGroupBase;
-                    var template RequestPrimitive v_deleteRequest := m_deleteRequest(c_deleteAddress);
-                            
-
-                    //v_deleteRequest.primitiveContent.any_1[0].Group_optional.fanOutPoint := c_fanoutPointAddress;FIXME
-                                    
-                    
-                    // Test control
-                    
-                    // Test component configuration
-                    f_cf01Up();
-                    
-                    // Test adapter configuration
-                                        
-                    // Preamble
-                    v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
-                    v_resourceIndex := f_cse_createResource(int9, v_createRequest, v_aeIndex);
-                    
-                    // Test Body
-                    v_request := f_getUpdateRequestPrimitive(int9, v_resourceIndex, v_deleteRequest);
-                                     
-                                     
-                    mcaPort.send(m_request(v_request));
-                    tc_ac.start;
-                    alt {
-                        [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) -> value v_response {
-                            tc_ac.stop;
-                            setverdict(pass, testcasename() & ": delete successfull by using fanOutPoint in group resource");
-                        }
-                        [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
-                            tc_ac.stop;
-                            setverdict(fail, testcasename() & ": Error while retrieving resource");
-                        }
-                        [] tc_ac.timeout {
-                            setverdict(inconc, testcasename() & ": No answer while retrieving resource");
-                        }
-                    }
-                                    
-                    // Postamble
-                    f_cse_postamble_deleteResources();
-                    
-					// Tear down
-					f_cf01Down();                    
-                                    
-                }
-            
-            } // end group g_CSE_GMG_BV_008_1
-            
-            // Test objective:
-            // Check that the IUT detects the presence of duplicate member IDs during the creation of the
-            // group resource and removes the duplicate member IDs prior to creation of the group resource.
-            group g_CSE_GMG_BV_008_2 {
+					testcase TC_CSE_DMR_DEL_BV_002_01() runs on CseTester system CseSystem {
+						// Local variables
+                		
+						f_CSE_DMR_DEL_BV_002(int3, m_createContainerBase);//Container
+					};
                 
-                testcase TC_CSE_GMG_BV_008_2() runs on CseTester system CseSystem
-                {
-                    
-                    // TODO: use right values for c_memberRessourceAddress
-                    var XSD.AnyURI c_memberRessourceAddress := "MEMBER_RESSOURCE_ADDRESS";
-
-                    // Local variables
-                    var MsgIn v_response;
-                    var integer v_aeIndex := -1;
-                    var integer v_resourceIndex := -1;
-                    var template RequestPrimitive v_createRequest := m_createGroupBase;
-                    
-                    // Test control
-                    
-                    // Test component configuration
-                    f_cf01Up();
-                    
-                    // Test adapter configuration
-                                        
-                    // Preamble
-                    v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
-            
-					v_createRequest := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
-            
-                    v_createRequest.primitiveContent.any_1[0].Group_optional := m_contentCreateGroup (1, {c_memberRessourceAddress, c_memberRessourceAddress}, omit);
-                                                            
-                    mcaPort.send(m_request(valueof(v_createRequest)));
-                    tc_ac.start;
-                    alt {
-                        [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
-                            tc_ac.stop;
-                            setverdict(pass, testcasename() & ": Resource created successfuly");
-                                    
-                            if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs)){
-                                setverdict(fail, testcasename(), ": Error, memberID attribute not provided");
-                            } else {
-                                if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs[0] != c_memberRessourceAddress){
-                                    setverdict(fail, testcasename(), ": Error, memberIDs attribute not correct");
-                                }
-                            }
-                            
-                        
-                        }
-                        [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
-                            tc_ac.stop;
-                            setverdict(fail, testcasename() & ": Error while creating resource");
-                        }
-                        [] tc_ac.timeout {
-                            setverdict(inconc, testcasename() & ": No answer while creating resource");
-                        }
-                    }
-                                    
-                    // Postamble
-                    f_cse_postamble_deleteResources();
-                    
-					// Tear down
-					f_cf01Down();
-                    
-                }
-            
-            } // end group g_CSE_GMG_BV_008_2
-            
-            // Test objective:
-            // Check that the IUT validates the resource type during the creation of the
-            // group resource when memberType attribute is not ‘mixed’.
-            group g_CSE_GMG_BV_009 {
-            
-                testcase TC_CSE_GMG_BV_009() runs on CseTester system CseSystem
-                {
-//                  Local variables
-                    var MsgIn v_response;
-                    var RequestPrimitive v_request;
-                    var integer v_aeIndex := -1;
-                    var integer v_resourceIndex := -1;
-                                               
-
-                    // TODO: use right values for c_RessourceType1
-                    var ResourceType c_RessourceType1 := int1;
-                    
-                    var ResponsePrimitive.primitiveContent v_responsePrimitive;
-                    
-                    var template RequestPrimitive v_createRequest := m_createGroupBase;
+					testcase TC_CSE_DMR_DEL_BV_002_02() runs on CseTester system CseSystem {
+						// Local variables
+                		
+						f_CSE_DMR_DEL_BV_002(int9, m_createGroupBase);//Group
+					};
                 
-                    
-                    
-                    // Test control
-                    
-                    // Test component configuration
-                    f_cf01Up();
-                    
-                    // Test adapter configuration
-                                        
-                    // Preamble
-                    v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
+					testcase TC_CSE_DMR_DEL_BV_002_03() runs on CseTester system CseSystem {
+						// Local variables
                 
-            
-                    v_request := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
+						f_CSE_DMR_DEL_BV_002(int1, m_createAcpBase);//AccessControlPolicy
+					};
                 
-                    v_request.primitiveContent.any_1[0].Group_optional.resourceType := c_RessourceType1;
-                                                            
-            
+					testcase TC_CSE_DMR_DEL_BV_002_04() runs on CseTester system CseSystem {
+						// Local variables
                 
-                    mcaPort.send(m_request(v_request));
-                    tc_ac.start;
-                    alt {
-                        [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
-                            tc_ac.stop;
-                            setverdict(pass, testcasename() & ": Resource created successfuly");
-                        
-                            if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated)){
-                                setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not provided");
-                            } else {
-                                if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated == false){
-                                    setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not correct");
-                                }
-                            }
-                                            
-                        }
-                        [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
-                            tc_ac.stop;
-                            setverdict(fail, testcasename() & ": Error while creating resource");
-                        }
-                        [] tc_ac.timeout {
-                            setverdict(inconc, testcasename() & ": No answer while creating resource" );
-                        }
-                    }
-                                    
-                    // Postamble
-                    f_cse_postamble_deleteResources();
-                    
-					// Tear down
-					f_cf01Down();
-                                        
-                }
-            } // end group g_CSE_GMG_BV_009
-            
-            
-            // Test objective:
-            // Check that the IUT handles unsuccessful validation of the resource type during the creation of the
-            // group resource when memberType attribute is not ‘mixed’ and the consistencyStrategy attribute is SET_MIXED.
-            group g_CSE_GMG_BV_010 {
-            
-                testcase TC_CSE_GMG_BV_010() runs on CseTester system CseSystem
-                {
-
-                    // TODO: use right values for c_RessourceType1 and c_RessourceType2
-                    var MemberType c_RessourceType1 := int1;
-                    var MemberType c_RessourceType2 := int2;
-
-                    // Local variables
-                    var ResponsePrimitive.primitiveContent v_responsePrimitive;
-                    var MsgIn v_response;
-                    var integer v_aeIndex := -1;
-                    var integer v_resourceIndex := -1;
-                    var RequestPrimitive v_request;
-                    
-                    var template RequestPrimitive v_createRequest := m_createGroupBase;
-                                                    
-                    // Test control
-                    
-                    // Test component configuration
-                    f_cf01Up();
-                    
-                    // Test adapter configuration
-                                        
-                    // Preamble
-                    v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
+						f_CSE_DMR_DEL_BV_002(int18, m_createScheduleBase);//Schedule
+					};
                 
-                            
+					testcase TC_CSE_DMR_DEL_BV_002_05() runs on CseTester system CseSystem {
+						// Local variables
                 
-                    v_request := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
+						f_CSE_DMR_DEL_BV_002(int15, m_createPollingChannelBase);//PollingChannel
+					};
                 
-                    v_request.primitiveContent.any_1[0].Group_optional.memberType := c_RessourceType2;
-                    v_request.primitiveContent.any_1[0].Group_optional.consistencyStrategy := int3; // MIXED
-                                                            
-                        
-                    mcaPort.send(m_request(v_request));
-                    tc_ac.start;
-                    alt {
-                        [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
-                            tc_ac.stop;
-                            setverdict(pass, testcasename() & ": Resource created successfuly");
-                        
-                        
-                            // check for memberTypeValidated
-                            if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated)){
-                                setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not provided");
-                            } else {
-                                if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated == false){
-                                    setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not correct");
-                                }
-                            }
-                            // check for memberType (MIXED)
-                            if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberType)){
-                                setverdict(fail, testcasename(), ": Error, memberType attribute not provided");
-                            } else {
-                                if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberType != int3){
-                                    setverdict(fail, testcasename(), ": Error, memberType attribute not correct");
-                                }
-                            }
-                        
-                        }
-                        [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
-                            tc_ac.stop;
-                            setverdict(fail, testcasename() & ": Error while creating resource");
-                        }
-                        [] tc_ac.timeout {
-                            setverdict(inconc, testcasename() & ": No answer while creating resource");
-                        }
-                    }
-                                    
-                    // Postamble
-                    f_cse_postamble_deleteResources();
-                    
-					// Tear down
-					f_cf01Down();                   
-                    
-                }
-            } // end group g_CSE_GMG_BV_010
-            
-            // Test objective:
-            // Check that the IUT handles unsuccessful validation of the resource type during the creation of the
-            // group resource when memberType attribute is not ‘mixed’ and the consistencyStrategy attribute is
-            // ABANDON_MEMBER,.
-            group g_CSE_GMG_BV_011 {
-            
-                testcase TC_CSE_GMG_BV_011() runs on CseTester system CseSystem
-                {
-
-                    // TODO: use right values for c_RessourceType1 and c_RessourceType2 and c_memberRessourceAddress1 and c_memberRessourceAddress2
-                    var MemberType c_RessourceType1 := int1;
-                    var MemberType c_RessourceType2 := int2;
-                    var XSD.AnyURI c_memberRessourceAddress1 := "MEMBER_RESSOURCE_ADDRESS_1";
-                    var XSD.AnyURI c_memberRessourceAddress2 := "MEMBER_RESSOURCE_ADDRESS_2";
+					testcase TC_CSE_DMR_DEL_BV_002_06() runs on CseTester system CseSystem {
+							// Local variables
                 
-//                  Local variables
-                    var MsgIn v_response;
-                    var integer v_aeIndex := -1;
-                    var integer v_resourceIndex := -1;
-                    var template RequestPrimitive v_createRequest := m_createGroupBase;
-                    var ResponsePrimitive.primitiveContent v_responsePrimitive;
-                                    
-                    // Test control
-                    
-                    // Test component configuration
-                    f_cf01Up();
-                    
-                    // Test adapter configuration
-                                        
-                    // Preamble
-                    v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
+						f_CSE_DMR_DEL_BV_002(int23, m_createSubscriptionBase);//Subscription
+					};
                 
-                    v_createRequest := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
-                    v_createRequest.primitiveContent.any_1[0].Group_optional.memberType := c_RessourceType1;
-                    v_createRequest.primitiveContent.any_1[0].Group_optional.consistencyStrategy := int1; // ABANDON_MEMBER
-                                                            
-                    mcaPort.send(m_request(valueof(v_createRequest)));
-                    tc_ac.start;
-                    alt {
-                        [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
-                            tc_ac.stop;
-                            setverdict(pass, testcasename() & ": Resource created successfuly");
-                        
-//                          check for memberTypeValidated
-                            if(not ispresent(v_responsePrimitive.any_1[0].Group_optional.memberTypeValidated)){
-                                setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not provided");
-                            } else {
-                                if(v_responsePrimitive.any_1[0].Group_optional.memberTypeValidated == false){
-                                    setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not correct");
-                                }
-                            }
-                            // check for membersId
-                            if(not ispresent(v_responsePrimitive.any_1[0].Group_optional.memberIDs)){
-                                setverdict(fail, testcasename(), ": Error, memberIDs attribute not provided");
-                            } else {
-                                if(v_responsePrimitive.any_1[0].Group_optional.memberIDs[0] != c_memberRessourceAddress1){
-                                    setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not correct");
-                                }
-                            }
-                        }
-                        [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
-                            tc_ac.stop;
-                            setverdict(fail, testcasename() & ": Error while creating resource");
-                        }
-                        [] tc_ac.timeout {
-                            setverdict(inconc, testcasename() & ": No answer while creating resource");
-                        }
-                    }
-                                    
-                    // Postamble
-                    f_cse_postamble_deleteResources();
-                    
-					// Tear down
-					f_cf01Down();                    
-                    
-                }
-            
-            } // end group g_CSE_GMG_BV_011
-            
-            // Test objective:
-            // Check that the IUT handles unsuccessful validation of the resource type during the creation of the
-            // group resource when memberType attribute is not ‘mixed’ and the consistencyStrategy attribute is
-            // ABANDON_GROUP.
-            group g_CSE_GMG_BV_012 {
                 
-                testcase TC_CSE_GMG_BV_012() runs on CseTester system CseSystem
-                {
-
-
-                    // TODO: use right values for c_RessourceType1 and c_RessourceType2 and c_memberRessourceAddress1 and c_memberRessourceAddress2
-                    var MemberType c_RessourceType1 := int1;
-                    var MemberType c_RessourceType2 := int2;
-                    var XSD.AnyURI c_memberRessourceAddress1 := "MEMBER_RESSOURCE_ADDRESS_1";
-                    var XSD.AnyURI c_memberRessourceAddress2 := "MEMBER_RESSOURCE_ADDRESS_2";
+					function f_CSE_DMR_DEL_BV_002(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive) runs on CseTester {
+						// Local variables
+						var MsgIn v_response;
+						var RequestPrimitive v_request;
+						var RequestPrimitive v_updateRequest;
+						var integer v_acpAuxIndex := -1;
+						var integer v_aeIndex := -1;
+						var integer v_resourceIndex := -1;
+						var CseTester v_notifyHandler;
+						var integer v_ae2Index := -1;
+						var AccessControlRule v_accessControlRule_1 := valueof(m_createAcr({PX_SUPER_USER}, int63));
+						var AccessControlRule v_accessControlRule_2;
+						var SetOfAcrs v_setOfArcs;
+                							   
+						// Test control
+						if(not(PICS_ACP_SUPPORT)) {
+							setverdict(inconc, testcasename() & ": AccessControlPolicy support is required to run this test case");
+							stop;
+						}
                 
-//                  Local variables
-                    var MsgIn v_response;
-                    var RequestPrimitive v_request;
-                    var integer v_aeIndex := -1;
-                    var integer v_resourceIndex := -1;
-                    
-                    var template RequestPrimitive v_createRequest := m_createGroupBase;
-                                            
-                    
-                    // Test control
-                    
-                    // Test component configuration
-                    f_cf01Up();
-                    
-                    // Test adapter configuration
-                                        
-                    // Preamble
-                    v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
-                                
-					v_createRequest := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
-                    v_createRequest.primitiveContent.any_1[0].Group_optional := m_contentCreateGroup (1, {c_memberRessourceAddress1, c_memberRessourceAddress2}, omit);
-                    v_createRequest.primitiveContent.any_1[0].Group_optional.memberType := c_RessourceType1;
-                    v_createRequest.primitiveContent.any_1[0].Group_optional.consistencyStrategy := int2; // ABANDON_GROUP
+						// Test component configuration
+						f_cf01Up();
                 
-                    mcaPort.send(m_request(valueof(v_createRequest)));
-                    tc_ac.start;
-                    alt {
-                        [] mcaPort.receive(mw_response(mw_responsePrimitive(int6010))) -> value v_response {//TODO Fix responseStatusCode
-                            tc_ac.stop;
-                            setverdict(pass, testcasename() & ": unsuccessful validation of the resource type during the creation of the group");
-                        }
-                        [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
-                            tc_ac.stop;
-                            setverdict(fail, testcasename() & ": Error while retrieving resource");
-                        }
-                        [] tc_ac.timeout {
-                            setverdict(inconc, testcasename() & ": No answer while retrieving resource");
-                        }
-                    }
-                    
-                    // Postamble
-                    f_cse_postamble_deleteResources();
-                    
-					// Tear down
-					f_cf01Down();
-					
-                }
-            
-            } // end group g_CSE_GMG_BV_012
-            
-        } // end group Group_Managment
-		
+						// Test adapter configuration
+                
+						// Preamble
+						v_acpAuxIndex := f_cse_preamble_createAcpAux(-,-);//c_CRDNDi);
+						v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);//c_CRUNDi);
+						v_accessControlRule_2 := valueof(m_createAcr({f_getOriginator(v_aeIndex)}, int55));
+						
+						f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_createRequestPrimitive, p_resourceType);
+                		
+						if (p_resourceType == int1){
+							p_createRequestPrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.selfPrivileges.accessControlRule_list := {v_accessControlRule_1,v_accessControlRule_2};
+						}
+						else{
+							f_setAcpId(p_createRequestPrimitive, {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)});
+							v_setOfArcs.accessControlRule_list := {v_accessControlRule_1, v_accessControlRule_2};
+							v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, -));
+							v_updateRequest := f_getUpdateRequestPrimitive(int1, vc_acpAuxIndex, v_updateRequest);
+							
+							mcaPort.send(m_request(v_updateRequest));
+							tc_ac.start;
+							alt {
+								[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+									tc_ac.stop;
+									setverdict(pass, testcasename() & ": Attribute of resource type int1 (Acp) updated successfuly");
+								}
+								[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+									tc_ac.stop;
+									setverdict(fail, testcasename() & ": Error while updating resource type int1 (Acp)");
+								}
+								[] tc_ac.timeout {
+									setverdict(inconc, testcasename() & ": No answer while updating resource type int1 (Acp)");
+								}
+							}
+						}
+                		
+						v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_aeIndex); 				
+                												
+						// Test Body
+						v_request := valueof(m_deleteRequest(f_getResourceAddress(v_resourceIndex)));
+						v_request.from_ := f_getResourceAddress(v_aeIndex);
+                		
+						mcaPort.send(m_request(v_request));
+						tc_ac.start;
+						alt {
+							[] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response {
+								tc_ac.stop;
+								setverdict(pass, testcasename() & ": Access denied to delete the resource " & int2str(enum2int(p_resourceType)));
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error resource deleted without having privileges");
+							}                			
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error while deleting a resource ");
+							}
+							[] tc_ac.timeout {
+								setverdict(inconc, testcasename() & ": No answer while deleting resource type " & int2str(enum2int(p_resourceType)));
+							}
+						}	
+                					
+						// Postamble
+						mcaPort.send(m_request(valueof(m_deleteRequest(f_getResourceAddress(v_aeIndex))))); 
+						// We are forced to delete the Ae because the delete request in the postamble_deleteResources is sent by Ae itself, witch doesn't have privileges
+						tc_ac.start;
+						alt {
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
+								tc_ac.stop;
+								log("Postamble: AE Resource deleted");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+								tc_ac.stop;
+								log("Postamble: Error while deleting resource");
+							}
+							[] tc_ac.timeout {
+								log("Postamble: No answer while deleting resource");
+							}	
+						}	
+						f_cse_postamble_deleteResources();
+                		
+						// Tear down
+						f_cf01Down();
+                							
+					};//end f_CSE_DMR_DEL_BV_002
+                	
+				};//end of group g_CSE_DMR_DEL_BV_002
+                
+				group g_CSE_DMR_DEL_BV_003{
+                	
+					testcase TC_CSE_DMR_DEL_BV_003_01() runs on CseTester system CseSystem {
+                	
+						// Local variables
+						var MsgIn v_response;
+						var RequestPrimitive v_request;
+						var integer v_aeIndex := -1;
+						var integer v_resourceIndex := -1;
+						var charstring c_falseAdressResource := "NoExistingResource";
+                							   
+						// Test control
+                
+						// Test component configuration
+						f_cf01Up();
+                
+						// Test adapter configuration
+                
+						// Preamble
+						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); 				
+                												
+						// Test Body
+						v_request := valueof(m_deleteRequest(f_getResourceAddress(v_aeIndex) & "/" & c_falseAdressResource));
+                		
+						mcaPort.send(m_request(v_request));
+						tc_ac.start;
+						alt {
+							[] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response {
+								tc_ac.stop;
+								setverdict(pass, testcasename() & ": Unexisting resource cannot be deleted");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error while deleting non existing resource");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error while deleting non existing resource");
+							}
+							[] tc_ac.timeout {
+								setverdict(inconc, testcasename() & ": No answer while deleting resource");
+							}
+						}		
+                					
+						// Postamble
+						f_cse_postamble_deleteResources();
+                		
+						// Tear down
+						f_cf01Down();
+                							
+					};//end f_CSE_DMR_DEL_BV_003
+				};//end of group g_CSE_DMR_DEL_BV_003
+                
+				group g_CSE_DMR_DEL_BV_004{
+                	
+					testcase TC_CSE_DMR_DEL_BV_004_01() runs on CseTester system CseSystem {
+						// Local variables
+                		
+						f_CSE_DMR_DEL_BV_004(int3, m_createContainerBase, int3, m_createContainerBase);//Container
+					};
+                
+					testcase TC_CSE_DMR_DEL_BV_004_02() runs on CseTester system CseSystem {
+						// Local variables
+                		
+						f_CSE_DMR_DEL_BV_004(int9, m_createGroupBase, int23, m_createSubscriptionBase);//Group
+					};
+                
+					testcase TC_CSE_DMR_DEL_BV_004_03() runs on CseTester system CseSystem {
+						// Local variables
+                
+						f_CSE_DMR_DEL_BV_004(int1, m_createAcpBase, int23, m_createSubscriptionBase);//AccessControlPolicy
+					};
+                
+					testcase TC_CSE_DMR_DEL_BV_004_04() runs on CseTester system CseSystem {
+						// Local variables
+                
+						f_CSE_DMR_DEL_BV_004(int18, m_createScheduleBase, int23, m_createSubscriptionBase);//Schedule
+					};
+                
+					testcase TC_CSE_DMR_DEL_BV_004_05() runs on CseTester system CseSystem {
+						// Local variables
+						// don't exist pollingChannel's child resource
+						//f_CSE_DMR_DEL_BV_004(int15, m_createPollingChannelBase, int23, m_createSubscriptionBase);//PollingChannel  TODO ResourceType needed is PollingChannelURI
+					};
+                
+					testcase TC_CSE_DMR_DEL_BV_004_06() runs on CseTester system CseSystem {
+							// Local variables
+                
+						f_CSE_DMR_DEL_BV_004(int23, m_createSubscriptionBase, int18, m_createScheduleBase);//Subscription
+					};	
+                
+                
+					function f_CSE_DMR_DEL_BV_004(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, ResourceType p_childResourceType, template RequestPrimitive p_createRequestPrimitiveChildResource) runs on CseTester {
+						// Local variables
+						var MsgIn v_response;
+						var RequestPrimitive v_request;
+						var integer v_aeIndex := -1;
+						var integer v_resourceIndex := -1;
+						var integer v_childResourceIndex := -1;
+						var CseTester v_notifyHandler;
+						var integer v_ae2Index := -1;
+                							   
+						// Test control
+                
+						// Test component configuration
+						f_cf01Up();
+                
+						// Test adapter configuration
+                
+						// Preamble
+						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+						
+						f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_createRequestPrimitive, p_resourceType);
+						
+						v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_aeIndex); 
+                
+						v_childResourceIndex := f_cse_createResource(p_childResourceType, p_createRequestPrimitiveChildResource, v_resourceIndex); 
+                												
+						// Test Body
+						v_request := valueof(m_deleteRequest(f_getResourceAddress(v_resourceIndex)));
+                		
+						mcaPort.send(m_request(v_request));
+						tc_ac.start;
+						alt {
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+								tc_ac.stop;
+								setverdict(pass, testcasename() & ":Resource type " & int2str(enum2int(p_resourceType)) & " delete successfuly");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error while deleting resource type " & int2str(enum2int(p_resourceType)));
+							}
+							[] tc_ac.timeout {
+								setverdict(inconc, testcasename() & ": No answer while deleting resource type " & int2str(enum2int(p_resourceType)));
+							}
+						}
+                		
+						mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_childResourceIndex), f_getOriginator(v_childResourceIndex))));
+                
+						tc_ac.start;
+						alt {
+							[] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response {
+								tc_ac.stop;
+								setverdict(pass, testcasename() & ": Error while retrieving non existing resource");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error while retrieving non existing resource");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error while retrieving non existing resource");
+							}
+							[] tc_ac.timeout {
+								setverdict(inconc, testcasename() & ": No answer while retrieving resource");
+							}
+						}		
+                					
+						// Postamble
+						f_cse_postamble_deleteResources();
+                		
+						// Tear down
+						f_cf01Down();
+                						
+					};//end f_CSE_DMR_DEL_BV_004
+				};//end of group g_CSE_DMR_DEL_BV_004
+
+				group g_CSE_DMR_DEL_BV_005{
+
+					testcase TC_CSE_DMR_DEL_BV_005_01() runs on CseTester system CseSystem {
+						// Local variables
+						f_CSE_DMR_DEL_BV_005(int3, m_createContainerBase, int3, m_createContainerBase);//Container
+					}
+            
+					function f_CSE_DMR_DEL_BV_005(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, ResourceType p_childResourceType, template RequestPrimitive p_createRequestPrimitiveChildResource) runs on CseTester {
+						// Local variables
+						var MsgIn v_response;
+						var RequestPrimitive v_request;
+						var integer v_aeIndex := -1;
+						var integer v_resourceIndex := -1;
+						var integer v_childResourceIndex := -1;            			
+            					   
+						// Test control
+            
+						// Test component configuration
+						f_cf01Up();
+            
+						// Test adapter configuration
+            
+						// Preamble
+						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+						
+						v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_aeIndex); 
+            			
+						if(ispresent(vc_resourcesList[v_resourceIndex].resource.any_1[0].Container_optional.stateTag)) {
+            				
+							v_childResourceIndex := f_cse_createResource(p_childResourceType, p_createRequestPrimitiveChildResource, v_resourceIndex); 
+            				
+							// Test Body
+							v_request := valueof(m_deleteRequest(f_getResourceAddress(v_childResourceIndex)));
+            	
+							mcaPort.send(m_request(v_request));
+							tc_ac.start;
+							alt {
+								[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+									tc_ac.stop;
+									setverdict(pass, testcasename() & ": Resource type " & int2str(enum2int(p_resourceType)) & " delete successfuly");
+								}
+								[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+									tc_ac.stop;
+									setverdict(fail, testcasename() & ": Error while deleting resource type " & int2str(enum2int(p_resourceType)));
+								}
+								[] tc_ac.timeout {
+									setverdict(inconc, testcasename() & ": No answer while deleting resource type " & int2str(enum2int(p_resourceType)));
+								}
+							}
+            	
+            	
+            	
+							mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))));
+            
+							tc_ac.start;
+							alt {
+								[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+									tc_ac.stop;
+									if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Container_optional.stateTag == 2) { //(Create and Delete)
+										setverdict(pass, testcasename() & ": The stateTag attribute is incremented");	
+									}
+									else{
+										setverdict(fail, testcasename() & ": Error the stateTag attribute is not incremented");
+									}
+								}
+								[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+									tc_ac.stop;
+									setverdict(fail, testcasename() & ": Error while retrieving resource attributes");
+								}
+								[] tc_ac.timeout {
+									setverdict(inconc, testcasename() & ": No answer while retrieving resource attributes");
+								}
+							}	
+            					
+						}//end if
+						else{
+							setverdict(fail, testcasename() & ": Error the stateTag attribute is empty");
+						}
+            			
+						// Postamble
+						f_cse_postamble_deleteResources();
+            
+						// Tear down
+						f_cf01Down();
+            				
+					}//end f_CSE_DMR_DEL_BV_005
+				} // end group g_CSE_DMR_DEL_BV_005
+				
+			}//end group Delete
+			
+		}//end group Data_Management_and_Repository
+		
+		//@Martin
+		group Location {
+		  		    
+			group g_CSE_LOC_BV_001{  		    
+		    
+			 testcase TC_CSE_LOC_BV_001() runs on CseTester system CseSystem {
+     	    	
+				var integer v_aeAuxIndex 		:= -1;	
+				var RequestPrimitive v_request;
+				var MsgIn v_response;
+				var LocationSource v_locationSource := int1;//Network-based
+     	     	
+				//Test component configuration
+				f_cf01Up();
+     	     	
+				//Preamble
+				v_aeAuxIndex := f_cse_preamble_registerAe();
+     	     	     	     	
+				//Set requestPrimitive
+				v_request	 := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, omit, omit, omit), v_aeAuxIndex);
+     	     	
+				//Test Body
+				mcaPort.send(m_request(v_request));
+				tc_ac.start;
+				alt{
+				  [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value v_response { //BAD REQUEST
+					tc_ac.stop;
+					setverdict(pass, testcasename() & "Resource <locationPolicy> create request is rejected due to invalid request body message!!");     	    	    
+				  }
+				  [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+					tc_ac.stop;
+					setverdict(fail, testcasename() & ": Error while handling an invalid locationPolicy resource create request with response status code:" & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));     	    	    
+				  }
+				   [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+					tc_ac.stop;
+					setverdict(fail, testcasename() & ": Created a locationPolicy resource for an invalid create request with response status code:" & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));     	    	    
+				  } 
+				  [] tc_ac.timeout {
+						setverdict(inconc, testcasename() & ": Timeout due to no response received from requested server!");
+				  }   	    	  
+     	    	      	    	  
+				}
+				// Postamble
+				f_cse_postamble_deleteResources();	
+    			
+				// Tear down
+				f_cf01Down();
+     	    
+			}// end testcase TC_CSE_LOC_BV_001
+		}//end group g_CSE_LOC_BV_001
+			
+			
+		group g_CSE_LOC_BV_002{  	    
+			testcase TC_CSE_LOC_BV_002() runs on CseTester system CseSystem {
+				
+				var integer v_aeAuxIndex 				:= -1;				
+				var LocationSource v_locationSource		:= int1;//Network-based	
+				var XSD.Duration locationUpdatePeriod 	:= PX_LOCATION_UPDATE_PERIOD;  
+				var XSD.Token locationTargetID			:= PX_LOCATION_TARGET_ID;
+				var XSD.AnyURI locationServerAddress	:= PX_LOCATION_SERVER_ADDRESS;
+				var RequestPrimitive v_request;
+				var MsgIn v_response;
+     	     	
+				//Test component configuration
+				f_cf01Up();
+     	     	
+				//Preamble
+				v_aeAuxIndex := f_cse_preamble_registerAe();
+     	     	     	     	
+				//Set requestPrimitive
+				v_request	 := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress), v_aeAuxIndex);
+     	     	    									
+				// Test Body					
+				mcaPort.send(m_request(v_request));
+				tc_ac.start;
+				alt {
+					[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+						tc_ac.stop;
+						setverdict(pass, testcasename() & ": Resource locationPolicy is created successfuly with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!");
+					}
+					[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+						tc_ac.stop;
+						setverdict(fail, testcasename() & ": Error occurrs with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)) & "while handling a valid locationPolicy resource create request!");
+					}
+					[] tc_ac.timeout {
+						setverdict(inconc, testcasename() & ": Timeout due to no response from requested server!");
+					}
+				}	
+    								
+				// Postamble
+				f_cse_postamble_deleteResources();	
+    			
+				// Tear down
+				f_cf01Down();                        
+				
+			 }// end testcase TC_CSE_LOC_BV_002	
+			
+		}//end group g_CSE_LOC_BV_002
+	
+			  
+		  group g_CSE_LOC_BO_001{
+		    
+			testcase TC_CSE_LOC_BO_001() runs on CseTester system CseSystem {//the originator has no privileges to create a locationPolicy resource!!
+		      	
+				var integer v_aeAuxIndex 				:= -1;
+				var integer v_acpAuxIndex 				:= -1;
+				var LocationSource v_locationSource		:= int1;//Network-based
+				var XSD.Duration locationUpdatePeriod 	:= PX_LOCATION_UPDATE_PERIOD;    
+				var XSD.Token locationTargetID			:= PX_LOCATION_TARGET_ID;
+				var XSD.AnyURI locationServerAddress	:= PX_LOCATION_SERVER_ADDRESS;
+				var RequestPrimitive v_request;	
+				var MsgIn v_response;
+				
+				// Test control
+				if(not(PICS_ACP_SUPPORT)) {
+					setverdict(inconc, testcasename() & ": AccessControlPolicy support is required to run this test case");
+					stop;
+				}
+				     	     	
+				//Test component configuration
+				f_cf01Up();
+     	     	
+				//Preamble
+				v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int62);//c_RUDNDi) //No resource creation privilege
+							
+				v_aeAuxIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+						     	     	
+				//Set requestPrimitive
+				v_request				:= f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource,omit, locationUpdatePeriod, locationTargetID, locationServerAddress), v_aeAuxIndex);
+     	        									
+				// Test Body					
+				mcaPort.send(m_request(v_request));
+				tc_ac.start;
+				alt {
+					[] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response {
+						tc_ac.stop;
+						setverdict(pass, testcasename() & ": Access denied to create a resource including locationPolicy!");
+					}
+					[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+						tc_ac.stop;
+						setverdict(fail, testcasename() & ": Error occurrs with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)) & "due to IUT failed to check the access privilege of originator!");
+					}
+					[] tc_ac.timeout {
+						setverdict(inconc, testcasename() & ": Timeout due to no response from requested server!");
+					}
+				}
+    								
+				// Postamble
+				f_cse_postamble_deleteResources();	
+    			
+				// Tear down
+				f_cf01Down();				
+		      
+		      
+			} // end testcase TC_CSE_LOC_BO_001
+		    
+		}//end group g_CSE_LOC_BO_001
+		    
+		group g_CSE_LOC_BO_002{  	
+			testcase TC_CSE_LOC_BO_002() runs on CseTester system CseSystem {
+		      	
+				var integer v_aeAuxIndex 				:= -1;
+				var LocationSource v_locationSource		:= int1;//Netwok-based		        
+				var XSD.Duration locationUpdatePeriod 	:= PX_LOCATION_UPDATE_PERIOD;  
+				var XSD.Token locationTargetID			:= PX_LOCATION_TARGET_ID;
+				var XSD.AnyURI locationServerAddress	:= PX_LOCATION_SERVER_ADDRESS;
+				var RequestPrimitive v_request;
+				var MsgIn v_response;
+								    				
+				//Test component configuration
+				f_cf01Up();
+     	     	
+				//Preamble
+				v_aeAuxIndex 	:= f_cse_preamble_registerAe();
+     	     	
+				//Set requestPrimitive
+				v_request		:= f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress), v_aeAuxIndex);
+     	    							
+				// Test Body					
+				mcaPort.send(m_request(v_request));
+				tc_ac.start;
+				alt {
+					[] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value v_response {
+						tc_ac.stop;
+						setverdict(pass, testcasename() & ": The targeted resource is not found!!");
+					}
+					[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+						tc_ac.stop;
+						setverdict(fail, testcasename() & ": Error occurrs with response status code: "& int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)) & "due to IUT created a locationPolicy resource under a non-existed parent resource!");
+					}
+					[] tc_ac.timeout {
+						setverdict(inconc, testcasename() & ": Timeout due to no response from requested server!");
+					}
+				}	
+    								
+				// Postamble
+				f_cse_postamble_deleteResources();	
+    			
+				// Tear down
+				f_cf01Down();
+				
+			}// end testcase TC_CSE_LOC_BO_002
+		    
+		  }//end group g_CSE_LOC_BO_002
+		
+		  
+		  group g_CSE_LOC_BI_001{
+		    
+			testcase TC_CSE_LOC_BI_001() runs on CseTester system CseSystem {//reject an invalid update request with invalid attribtue locationUpdatePeriod
+		      
+				var integer v_aeAuxIndex 						:= -1;
+				var integer v_locPolicyResourceIndex			:= -1;
+				var LocationSource v_locationSource				:= int1;//Netwok-based	
+				var XSD.Duration locationUpdatePeriod 			:= PX_LOCATION_UPDATE_PERIOD;  	      	
+				var XSD.Duration locationUpdatePeriod_invalid 	:= c_invalid_location_update_period;				 
+				var XSD.Token locationTargetID					:= PX_LOCATION_TARGET_ID;
+				var XSD.AnyURI locationServerAddress			:= PX_LOCATION_SERVER_ADDRESS;
+				var RequestPrimitive v_request;
+				var RequestPrimitive v_locpolicy_request_preamble;
+				var MsgIn v_response;
+								    				
+				//Test component configuration
+				f_cf01Up();
+     	     	
+				//Preamble - register AE
+				v_aeAuxIndex 				:= f_cse_preamble_registerAe();
+				//Preamble - create a valid locationPolicy resource for later update use
+				v_locpolicy_request_preamble:= valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress));
+				v_locPolicyResourceIndex	:= f_cse_createResource(int10, v_locpolicy_request_preamble, v_aeAuxIndex);     	     	
+     	     	
+				//Set requestPrimitive
+				v_request					:= f_getUpdateRequestPrimitive(int10, v_locPolicyResourceIndex, m_updateLocationPolicy(f_getResourceAddress(v_locPolicyResourceIndex), omit, locationUpdatePeriod_invalid));
+     	     	    									
+				// Test Body					
+				mcaPort.send(m_request(v_request));
+				tc_ac.start;
+				alt {
+					[] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value v_response {
+						tc_ac.stop;
+						setverdict(pass, testcasename() & ": Update locationPolicy resource is rejected!!");
+					}
+					[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+						tc_ac.stop;
+						setverdict(fail, testcasename() & ": Error occurrs with response status code: "& int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)) & "due to IUT failed to handle an invalid locationPolicy update request");
+					}
+					[] tc_ac.timeout {
+						setverdict(inconc, testcasename() & ": Timeout due to no response from requested server!");
+					}
+				}	
+    								
+				// Postamble
+				f_cse_postamble_deleteResources();	 
+    			
+				// Tear down
+				f_cf01Down();      
+		      
+			}//end testcase TC_CSE_LOC_BI_001
+		    
+		  }//end group g_CSE_LOC_BI_001
+		  
+		  group g_CSE_LOC_BV_003 {
+		  
+			testcase TC_CSE_LOC_BV_003() runs on CseTester system CseSystem{
+			  //TO RETRIEVE a <container> resource that has created in cse and linked with a <locationPolicy> resource (network-based case)
+		     
+			  var integer v_aeAuxIndex				    :=	-1;
+			  var integer v_locPolicyResourceIndex	    := 	-1;
+			  var integer v_locContainerResourceIndex	:= 	-1;
+			  var XSD.Duration locationUpdatePeriod 	:= PX_LOCATION_UPDATE_PERIOD;  
+			  var XSD.Token locationTargetID			:= PX_LOCATION_TARGET_ID;
+			  var XSD.AnyURI locationServerAddress	    := PX_LOCATION_SERVER_ADDRESS;
+			  var RequestPrimitive v_loc_request_preamble;
+			  var RequestPrimitive v_container_request_preamble;
+			  var MsgIn v_response;
+			  var LocationSource v_locationSource := int1;//Network-based      
+		      
+			  //Test component configuration
+			  f_cf01Up();
+		 	  
+			  //Preamble - register AE
+			  v_aeAuxIndex				:= f_cse_preamble_registerAe();
+			  //Preamble - create a valid locationPolicy resource for later container resource creation
+			  v_loc_request_preamble		:= valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress));
+			  v_container_request_preamble	:= valueof(m_createContainer(f_getResourceAddress(v_aeAuxIndex), omit));//no location-container name provided?
+			  v_locPolicyResourceIndex	:= f_cse_createResource(int10, v_loc_request_preamble, v_aeAuxIndex);//created locationpolicy index
+			  v_locContainerResourceIndex	:= f_cse_createResource(int3, v_container_request_preamble, v_locPolicyResourceIndex);//created container index
+			  			  	
+			  //Test Body - retrieve the created container resource
+			  mcaPort.send(m_request(valueof(m_retrieveResource(f_getResourceAddress(v_locContainerResourceIndex), f_getOriginator(v_locContainerResourceIndex))))); 
+			  tc_ac.start;
+			  alt{
+				[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response{
+				  tc_ac.stop;
+				  if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Container_optional.locationID)){		            
+						setverdict(fail, testcasename() & "No locationID is included in the response!");
+				  }else{
+						setverdict(pass, testcasename() & "Container resource associated with locationPolicy resource is successfully retrieved with locationID included in the response!");		            
+				  }		          
+		          
+				}
+				[] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response{
+						tc_ac.stop;
+						setverdict(fail, testcasename() & "Requested container resource is not found!");
+				}
+				[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+						tc_ac.stop;
+						setverdict(fail, testcasename() & ": Error while retrieving resource!");
+				}
+				[] tc_ac.timeout {
+						setverdict(inconc, testcasename() & ": No answer while retrieving resource!");
+				}
+		        
+			  }
+			  // Postamble
+				f_cse_postamble_deleteResources();	 
+    			
+				// Tear down
+				f_cf01Down(); 		      
+		      
+			}//end testcase TC_CSE_LOC_BV_003 		    
+		    
+		  }//end group g_CSE_LOC_BV_003
+		  		 
+		  group g_CSE_LOC_BV_004 {
+		    
+			testcase TC_CSE_LOC_BV_004() runs on CseTester system CseSystem{
+			  //TO create a <locationPolicy> resource with locationSource set to Device-based
+		     
+			   var integer v_aeAuxIndex 					:= -1;	
+				var XSD.Duration locationUpdatePeriod 	:= PX_LOCATION_UPDATE_PERIOD;  
+				var RequestPrimitive v_request;
+				var MsgIn v_response;
+				var LocationSource v_locationSource		:= int2;//Device-based
+				//Test component configuration
+				f_cf01Up();
+     	     	
+     	     	
+				if(PX_IUT_IS_ASN_CSE){
+     	     	  
+					//Preamble
+					v_aeAuxIndex := f_cse_preamble_registerAe();
+					//Set requestPrimitive
+					v_request	  := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, omit, omit), v_aeAuxIndex);
+				   									
+					// Test Body					
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": Resource locationPolicy is created successfuly with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error occurrs with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)) & "while handling a valid locationPolicy resource create request!");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": Timeout due to no response from requested server!");
+						}
+					}	
+      		      
+				  // Postamble
+					f_cse_postamble_deleteResources();	 
+    				
+				} 
+				// Tear down
+				f_cf01Down(); 		      
+		      
+			}//end testcase TC_CSE_LOC_BV_004
+		    
+		  }//end group g_CSE_LOC_BV_004
+		  		
+		 group g_CSE_LOC_BV_005 {
+		    
+			testcase TC_CSE_LOC_BV_005() runs on CseTester system CseSystem{
+			  //TO create a <locationPolicy> resource with locationSource set to Share-based
+		     
+			   var integer v_aeAuxIndex 				:= -1;	 
+			   var LocationSource v_locationSource		:= int3;//Share-based
+				var RequestPrimitive v_request;
+				var MsgIn v_response;
+     	     	
+				//Test component configuration
+				f_cf01Up();
+     	     	
+     	     	
+				if(PX_IUT_IS_MN_CSE){
+     	     	      	     	    
+					//Preamble
+					v_aeAuxIndex := f_cse_preamble_registerAe();
+					//Set requestPrimitive
+					v_request	  := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, omit, omit, omit), v_aeAuxIndex);
+				  									
+					// Test Body					
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": Resource locationPolicy is created successfuly with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error occurrs with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)) & "while handling a valid locationPolicy resource create request!");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": Timeout due to no response from requested server!");
+						}
+					}	
+    		      
+				  // Postamble
+					f_cse_postamble_deleteResources();	 
+    				
+				}  
+				// Tear down
+				f_cf01Down(); 		      
+		      
+			}//end testcase TC_CSE_LOC_BV_005
+		    
+		  }//end group g_CSE_LOC_BV_005
+		 		 		
+		 group g_CSE_LOC_BV_006 {
+		    
+			testcase TC_CSE_LOC_BV_006_01() runs on CseTester system CseSystem{
+			  //TO NOTIFY a location information 
+		     
+			  var integer v_aeAuxIndex					:=	-1;
+			  var integer v_locPolicyResourceIndex		:= 	-1;
+			  var integer v_locContainerResourceIndex	:=	-1;
+			  var integer v_subscriptionResourceIndex	:= 	-1;
+			  var LocationSource v_locationSource	:= int1;//Netwok-based
+			  var XSD.Duration locationUpdatePeriod 	:= PX_LOCATION_UPDATE_PERIOD;  
+			  var XSD.Token locationTargetID			:= PX_LOCATION_TARGET_ID;
+			  var XSD.AnyURI locationServerAddress	    := PX_LOCATION_SERVER_ADDRESS;
+			  var RequestPrimitive v_locpolicy_request_preamble;
+			  var RequestPrimitive v_container_request_preamble;
+			  var RequestPrimitive v_subscription_request_preamble;
+			  var MsgIn v_response;
+		      		      
+			  //Test component configuration
+			  f_cf01Up();
+		 	  
+			  //Preamble - register AE
+				v_aeAuxIndex						:= f_cse_preamble_registerAe();
+			  //Preamble - create a valid locationPolicy resource 
+				v_locpolicy_request_preamble		:= valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress));
+				v_container_request_preamble		:= valueof(m_createContainer(f_getResourceAddress(v_aeAuxIndex), omit));//no location-container name provided?
+		 	  	
+				v_locPolicyResourceIndex			:= f_cse_createResource(int10, v_locpolicy_request_preamble, v_aeAuxIndex);//created locationpolicy index
+				v_locContainerResourceIndex		:= f_cse_createResource(int3, v_container_request_preamble, v_locPolicyResourceIndex);//created container index
+				v_subscription_request_preamble	:= valueof(m_createSubscription(f_getResourceAddress(v_locContainerResourceIndex), c_defaultResourceName, -));
+				v_subscriptionResourceIndex		:= f_cse_createResource(int23, v_subscription_request_preamble, v_locContainerResourceIndex);
+				
+			  //Test Body - retrieve the <latest> resource of the created container resource linked with the locationPolicy resource
+			  mcaPort.send(m_request(valueof(m_retrieveResource(f_getResourceAddress(v_locContainerResourceIndex) & "/" & "latest", f_getOriginator(v_locContainerResourceIndex)))));
+			  tc_ac.start;
+			  alt{
+				[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response{
+				  tc_ac.stop;
+				  if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Notification.notificationEvent)){		            
+						setverdict(fail, testcasename() & "No NotificationEvent is included in the response!");
+				  }else{
+						setverdict(pass, testcasename() & "Location information is successfully sent!");		            
+				  }		          
+		          
+				}
+				[] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response{
+						tc_ac.stop;
+						setverdict(fail, testcasename() & "Requested container resource is not found!");
+				}
+				[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+						tc_ac.stop;
+						setverdict(fail, testcasename() & ": Error while retrieving resource!");
+				}
+				[] tc_ac.timeout {
+						setverdict(inconc, testcasename() & ": No answer while retrieving resource!");
+				}		        
+			  }
+		      
+			  // Postamble
+			  f_cse_postamble_deleteResources();	 
+    			
+			  // Tear down
+			  f_cf01Down(); 		      
+		      
+			}//end testcase TC_CSE_LOC_BV_006_01
+		    
+			testcase TC_CSE_LOC_BV_006_02() runs on CseTester system CseSystem{
+			  //TO NOTIFY a location information 
+		     
+			  var integer v_aeAuxIndex					:=	-1;
+			  var integer v_locPolicyResourceIndex		:= 	-1;
+			  var integer v_locContainerResourceIndex	:=	-1;
+			  var integer v_subscriptionResourceIndex	:= 	-1;
+			  var LocationSource v_locationSource	    := int2;//Device-based
+			  var XSD.Duration locationUpdatePeriod 	:= PX_LOCATION_UPDATE_PERIOD; 
+			  var RequestPrimitive v_locpolicy_request_preamble;
+			  var RequestPrimitive v_container_request_preamble;
+			  var RequestPrimitive v_subscription_request_preamble;
+			  var MsgIn v_response;
+		      		      
+			  //Test component configuration
+			  f_cf01Up();
+		 	  
+			  //Preamble - register AE
+				v_aeAuxIndex						:= f_cse_preamble_registerAe();
+			  //Preamble - create a valid locationPolicy resource
+		 	  	 
+				v_locpolicy_request_preamble		:= valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, omit, omit));
+				v_container_request_preamble		:= valueof(m_createContainer(f_getResourceAddress(v_aeAuxIndex), omit));//no location-container name provided?
+		 	  	
+				v_locPolicyResourceIndex			:= f_cse_createResource(int10, v_locpolicy_request_preamble, v_aeAuxIndex);//created locationpolicy index
+				v_locContainerResourceIndex		:= f_cse_createResource(int3, v_container_request_preamble, v_locPolicyResourceIndex);//created container index
+				v_subscription_request_preamble	:= valueof(m_createSubscription(f_getResourceAddress(v_locContainerResourceIndex), c_defaultResourceName, -));
+				v_subscriptionResourceIndex		:= f_cse_createResource(int23, v_subscription_request_preamble, v_locContainerResourceIndex);
+				
+			  //Test Body - retrieve the <latest> resource of the created container resource linked with the locationPolicy resource
+			  mcaPort.send(m_request(valueof(m_retrieveResource(f_getResourceAddress(v_locContainerResourceIndex) & "/" & "latest", f_getOriginator(v_locContainerResourceIndex)))));
+			  tc_ac.start;
+			  alt{
+				[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response{
+				  tc_ac.stop;
+				  if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Notification.notificationEvent)){		            
+						setverdict(fail, testcasename() & "No NotificationEvent is included in the response!");
+				  }else{
+						setverdict(pass, testcasename() & "Location information is successfully sent!");		            
+				  }		          
+		          
+				}
+				[] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response{
+						tc_ac.stop;
+						setverdict(fail, testcasename() & "Requested container resource is not found!");
+				}
+				[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+						tc_ac.stop;
+						setverdict(fail, testcasename() & ": Error while retrieving resource!");
+				}
+				[] tc_ac.timeout {
+						setverdict(inconc, testcasename() & ": No answer while retrieving resource!");
+				}		        
+			  }
+		      
+			  // Postamble
+			  f_cse_postamble_deleteResources();	 
+    			
+			  // Tear down
+			  f_cf01Down(); 		      
+		      
+			}//end testcase TC_CSE_LOC_BV_006_02 		    
+		    
+			testcase TC_CSE_LOC_BV_006_03() runs on CseTester system CseSystem{
+			  //TO NOTIFY a location information 
+		     
+			  var integer v_aeAuxIndex					:=	-1;
+			  var integer v_locPolicyResourceIndex		:= 	-1;
+			  var integer v_locContainerResourceIndex	:=	-1;
+			  var integer v_subscriptionResourceIndex	:= 	-1;
+			  var LocationSource v_locationSource	:= int3;//Sharing-based
+			  var RequestPrimitive v_locpolicy_request_preamble;
+			  var RequestPrimitive v_container_request_preamble;
+			  var RequestPrimitive v_subscription_request_preamble;
+			  var MsgIn v_response;
+		      		      
+			  //Test component configuration
+			  f_cf01Up();
+		 	  
+			  //Preamble - register AE
+				v_aeAuxIndex						:= f_cse_preamble_registerAe();
+			  //Preamble - create a valid locationPolicy resource
+		 	  	 
+				v_locpolicy_request_preamble		:= valueof(m_createLocationPolicy(v_locationSource, omit, omit, omit, omit));
+				v_container_request_preamble		:= valueof(m_createContainer(f_getResourceAddress(v_aeAuxIndex), omit));//no location-container name provided?
+		 	  	
+				v_locPolicyResourceIndex			:= f_cse_createResource(int10, v_locpolicy_request_preamble, v_aeAuxIndex);//created locationpolicy index
+				v_locContainerResourceIndex		:= f_cse_createResource(int3, v_container_request_preamble, v_locPolicyResourceIndex);//created container index
+				v_subscription_request_preamble	:= valueof(m_createSubscription(f_getResourceAddress(v_locContainerResourceIndex), c_defaultResourceName, -));
+				v_subscriptionResourceIndex		:= f_cse_createResource(int23, v_subscription_request_preamble, v_locContainerResourceIndex);
+				
+			  //Test Body - retrieve the <latest> resource of the created container resource linked with the locationPolicy resource
+			  mcaPort.send(m_request(valueof(m_retrieveResource(f_getResourceAddress(v_locContainerResourceIndex) & "/" & "latest", f_getOriginator(v_locContainerResourceIndex)))));
+			  tc_ac.start;
+			  alt{
+				[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response{
+				  tc_ac.stop;
+				  if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Notification.notificationEvent)){		            
+						setverdict(fail, testcasename() & "No NotificationEvent is included in the response!");
+				  }else{
+						setverdict(pass, testcasename() & "Location information is successfully sent!");		            
+				  }		          
+		          
+				}
+				[] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response{
+						tc_ac.stop;
+						setverdict(fail, testcasename() & "Requested container resource is not found!");
+				}
+				[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+						tc_ac.stop;
+						setverdict(fail, testcasename() & ": Error while retrieving resource!");
+				}
+				[] tc_ac.timeout {
+						setverdict(inconc, testcasename() & ": No answer while retrieving resource!");
+				}		        
+			  }
+		      
+			  // Postamble
+			  f_cse_postamble_deleteResources();	 
+    			
+			  // Tear down
+			  f_cf01Down(); 		      
+		      
+			}//end testcase TC_CSE_LOC_BV_006_03 
+		  }//end group g_CSE_LOC_BV_006
+		  
+		  /*group g_CSE_LOC_BV_007 {
+			  testcase TC_CSE_LOC_BV_007() runs on CseTester system CseSystem{		    
+				//TODO
+			  }//end testcase TC_CSE_LOC_BV_007
+		  }//end group g_CSE_LOC_BV_007
+		  
+		  group g_CSE_LOC_BV_008 {
+			  testcase TC_CSE_LOC_BV_008() runs on CseTester system CseSystem{		    
+				//TODO
+			  }//end testcase TC_CSE_LOC_BV_008
+		  }//end group g_CSE_LOC_BV_008
+		  */
+
+		  group g_CSE_LOC_BV_009 {
+			  testcase TC_CSE_LOC_BV_009() runs on CseTester system CseSystem{		    
+				//To CREATE a <subscription> resource as a child resource of the created <container> 
+    		    
+				  var integer v_aeAuxIndex					:=	-1;
+				  var integer v_locPolicyResourceIndex		:= 	-1;
+				  var integer v_locContainerResourceIndex	:=	-1;
+				  var LocationSource v_locationSource		:= int1;//Netwok-based
+				  var XSD.Duration locationUpdatePeriod 	:= PX_LOCATION_UPDATE_PERIOD;  
+				  var XSD.Token locationTargetID			:= PX_LOCATION_TARGET_ID;
+				  var XSD.AnyURI locationServerAddress	    := PX_LOCATION_SERVER_ADDRESS;
+				  var RequestPrimitive v_locpolicy_request_preamble;
+				  var RequestPrimitive v_container_request_preamble;
+				  var RequestPrimitive v_subscription_request_preamble;
+				  var MsgIn v_response;
+    		      		      
+				  //Test component configuration
+				  f_cf01Up();
+    		 	  
+				  //Preamble - register AE
+					v_aeAuxIndex						:= f_cse_preamble_registerAe();
+				  //Preamble - create a valid locationPolicy resource 
+					v_locpolicy_request_preamble		:= valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress));
+					v_container_request_preamble		:= valueof(m_createContainer(f_getResourceAddress(v_aeAuxIndex), omit));//no location-container name provided?
+    		 	  	
+					v_locPolicyResourceIndex			:= f_cse_createResource(int10, v_locpolicy_request_preamble, v_aeAuxIndex);//created locationpolicy index
+					v_locContainerResourceIndex		:= f_cse_createResource(int3, v_container_request_preamble, v_locPolicyResourceIndex);//created container index
+					v_subscription_request_preamble	:= valueof(m_createSubscription(f_getResourceAddress(v_locContainerResourceIndex), c_defaultResourceName, -));
+    				    				
+				  //Test Body
+				  mcaPort.send(m_request(valueof(f_getCreateRequestPrimitive(int23, v_subscription_request_preamble, v_locContainerResourceIndex)))); 
+				  tc_ac.start;
+				  alt{
+					[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response{
+					  tc_ac.stop;    		         
+					  setverdict(pass, testcasename() & "Subscription resource is successfully!");
+					}
+					[] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response{
+							tc_ac.stop;
+							setverdict(fail, testcasename() & "Requested container resource is not found!");
+					}    		        
+					[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while creating subscription resource!");
+					}		        
+				  }
+    		      
+				  // Postamble
+				  f_cse_postamble_deleteResources();	 
+        			
+				  // Tear down
+				  f_cf01Down(); 		
+    		    
+			  }//end testcase TC_CSE_LOC_BV_009
+		  }//end group g_CSE_LOC_BV_009
+		
+		  group g_CSE_LOC_BV_010 {
+		    
+			testcase TC_CSE_LOC_BV_010() runs on CseTester system CseSystem{
+			  //TO RETRIEVE a <locationPolicy> resource that has created in cse
+		     
+			  var integer v_aeAuxIndex				:=	-1;
+			  var integer v_locPolicyResourceIndex	:= 	-1;
+			  var RequestPrimitive v_locpolicy_request_preamble;
+			  var MsgIn v_response;
+			  var LocationSource v_locationSource	:= int1;//Netwok-based
+			  var XSD.Duration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD;  
+			  var XSD.Token locationTargetID		:= PX_LOCATION_TARGET_ID;
+			  var XSD.AnyURI locationServerAddress	:= PX_LOCATION_SERVER_ADDRESS;
+		      
+		      
+			  //Test component configuration
+			  f_cf01Up();
+		 	  
+			  //Preamble - register AE
+			  v_aeAuxIndex				:= f_cse_preamble_registerAe();
+			  //Preamble - create a valid locationPolicy resource for later container resource creation
+			  v_locpolicy_request_preamble		:= valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress));
+			  v_locPolicyResourceIndex	:= f_cse_createResource(int10, v_locpolicy_request_preamble, v_aeAuxIndex);//created locationpolicy index
+				
+			  //Test Body - retrieve the created locationpolicy resource
+			  mcaPort.send(m_request(valueof(m_retrieveResource(f_getResourceAddress(v_locPolicyResourceIndex), f_getOriginator(v_locPolicyResourceIndex))))); 
+			  tc_ac.start;
+			  alt{
+				[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response{
+				  tc_ac.stop;
+				  if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].LocationPolicy_optional.locationContainerID)){		            
+						setverdict(fail, testcasename() & "No locationContainerID is included in the response!");
+				  }else{
+						setverdict(pass, testcasename() & "LocationPolicy resource is successfully retrieved with locationContainerID included in the response!");		            
+				  }		          
+		          
+				}
+				[] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response{
+						tc_ac.stop;
+						setverdict(fail, testcasename() & "Requested locationPolicy is not found!");
+				}
+				[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+						tc_ac.stop;
+						setverdict(fail, testcasename() & ": Error while retrieving resource!");
+				}
+				[] tc_ac.timeout {
+						setverdict(inconc, testcasename() & ": No answer while retrieving resource!");
+				}
+		        
+			  }
+		      
+			  // Postamble
+			  f_cse_postamble_deleteResources();	 
+    			
+			  // Tear down
+			  f_cf01Down(); 		      
+		      
+			}//end testcase TC_CSE_LOC_BV_010 		    
+		    
+		  }//end group g_CSE_LOC_BV_010
+		  
+		  
+		}//end group Location
+		
+		group Group_Managment {
+        
+                    
+			// Test objective:
+			// Check that the IUT rejects the creation of the group resource when member ID exceed max number
+			// of members.
+			group g_CSE_GMG_BV_001 {
+                
+				testcase TC_CSE_GMG_BV_001() runs on CseTester system CseSystem {
+                    
+					// Local variables
+					var MsgIn v_response;
+					var RequestPrimitive v_request;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+                                                                
+                    
+					var template RequestPrimitive v_createRequest := m_createGroupBase;
+					var ResponsePrimitive v_responsePrimitive;
+
+					//v_createRequest.primitiveContent.any_1[0].Group_optional.currentNrOfMembers := 6;
+					const XSD.AnyURI c_memberResourceAddress1 := "MEMBER_RESOURCE_ADDRESS_1";
+					const XSD.AnyURI c_memberResourceAddress2 := "MEMBER_RESOURCE_ADDRESS_2";
+					const XSD.AnyURI c_memberResourceAddress3 := "MEMBER_RESOURCE_ADDRESS_3";
+					const XSD.AnyURI c_memberResourceAddress4 := "MEMBER_RESOURCE_ADDRESS_4";
+					const XSD.AnyURI c_memberResourceAddress5 := "MEMBER_RESOURCE_ADDRESS_5";
+					const XSD.AnyURI c_memberResourceAddress6 := "MEMBER_RESOURCE_ADDRESS_6";
+					
+					v_createRequest.primitiveContent.any_1[0].Group_optional.memberIDs := {c_memberResourceAddress1, c_memberResourceAddress2, c_memberResourceAddress3, c_memberResourceAddress4, c_memberResourceAddress5, c_memberResourceAddress6};			
+					v_createRequest.primitiveContent.any_1[0].Group_optional.maxNrOfMembers := 5;
+
+                                        
+					//  Test control
+                    
+					// Test component configuration
+					f_cf01Up();
+                    
+					// Test adapter configuration
+                                        
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+                                
+					// Test Body
+					v_request := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
+                
+                                                                         
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int6010))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": Creation failed because member ID exceed max number of member");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while retrieving resource");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
+						}
+					}
+                                    
+					// Postamble
+					f_cse_postamble_deleteResources();
+                    
+					// Tear down
+					f_cf01Down();
+                    
+				}
+            
+			} // end group g_CSE_GMG_BV_001
+        
+                
+            
+                
+			// Test objective:
+			// Check that the IUT rejects the creation of the group resource when the memberType cannot
+			// be retrieved due to lack of privilege.
+			group g_CSE_GMG_BV_002 {
+                
+				testcase TC_CSE_GMG_BV_002() runs on CseTester system CseSystem
+				{
+					// Local constants
+					const ResourceType c_ResourceTypeGroup := int9;  // <group> ?
+					const ResourceType c_ResourceTypeAcp := int1;		// <ACP>
+					const XSD.String c_acpName := "ACP_NAME";
+					const ListOfURIs c_acor := {"NA"};
+					const AccessControlOperations c_allowedOperations := int63;
+                	
+					// Local variables
+					var MsgIn v_response;
+					var RequestPrimitive v_request;
+					var integer v_aeIndex := -1;
+					var integer v_acpIndex := -1;
+                												
+                
+					var template RequestPrimitive v_createRequest := m_createGroupBase;
+					var template RequestPrimitive v_createAcp := m_createAcp(c_acpName, c_acpName, c_acor, c_allowedOperations);
+                
+                	
+					// Test control
+                	
+					// Test component configuration
+					f_cf01Up();
+                	
+					// Test adapter configuration
+                						
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
+					v_request := f_getCreateRequestPrimitive(c_ResourceTypeGroup, v_createRequest, v_aeIndex);	// creating group
+                	
+					v_acpIndex := f_cse_createResource(c_ResourceTypeAcp, v_createAcp, v_aeIndex);
+					v_request.primitiveContent.any_1[0].Group_optional.accessControlPolicyIDs := {f_getResourceAddress(v_acpIndex)};
+                		   
+					// Test Body
+                	
+                
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int5105))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": creation failed due to lack of privilege");                            
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while retrieving resource");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
+						}
+					}
+                					
+					// Postamble
+					f_cse_postamble_deleteResources();
+                	
+					// Tear down
+					f_cf01Down();        
+				}
+                
+			} // end group g_CSE_GMG_BV_002
+            
+            
+            
+			// Test objective:
+			// Check that the IUT rejects the update of the group resource when the
+			// memberType cannot be retrieved due to lack of privilege.
+			group g_CSE_GMG_BV_003 {
+                
+				testcase TC_CSE_GMG_BV_003() runs on CseTester system CseSystem
+				{
+					// Local constants
+					const ResourceType c_ResourceTypeGroup := int9;  // <group> ?
+					const ResourceType c_ResourceTypeAcp := int1;		// <ACP>
+					const XSD.String c_acpName := "ACP_NAME";
+					const ListOfURIs c_acor := {"NA"};
+					const AccessControlOperations c_allowedOperations := int63;
+                                	
+					// Local variables
+					var MsgIn v_response;
+					var RequestPrimitive v_request;
+					var integer v_aeIndex := -1;
+					var integer v_acpIndex := -1;
+					var integer v_groupResourceIndex := -1;
+                                												
+                                
+					var template RequestPrimitive v_createRequest := m_createGroupBase;
+					var template RequestPrimitive v_updateRequest := m_updateGroupBase;
+					var template RequestPrimitive v_createAcp := m_createAcp(c_acpName, c_acpName, c_acor, c_allowedOperations);
+                                
+                                	
+					// Test control
+                                	
+					// Test component configuration
+					f_cf01Up();
+                                	
+					// Test adapter configuration
+                                						
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
+					v_groupResourceIndex := f_cse_createResource(c_ResourceTypeGroup, v_createRequest, v_aeIndex); // create group resource
+                                	
+					v_acpIndex := f_cse_createResource(c_ResourceTypeAcp, v_createAcp, v_groupResourceIndex);
+                	
+                                		   
+					// Test Body
+					v_request := f_getUpdateRequestPrimitive(int9, v_groupResourceIndex, v_updateRequest);
+					v_request.primitiveContent.any_1[0].Group_optional.accessControlPolicyIDs := {f_getResourceAddress(v_acpIndex)};
+                                	
+                                
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int5105))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": creation failed due to lack of privilege");                            
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while retrieving resource");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
+						}
+					}
+                                					
+					// Postamble
+					f_cse_postamble_deleteResources();
+                                	
+					// Tear down
+					f_cf01Down();        
+				}
+            
+			} // end group g_CSE_GMG_BV_003
+            
+			// Test objective:
+			// Check that the IUT rejects the update of the group
+			// resource when member ID exceed max number of members.
+			group g_CSE_GMG_BV_004 {
+                
+				testcase TC_CSE_GMG_BV_004() runs on CseTester system CseSystem
+				{
+
+					var MsgIn v_response;
+					var RequestPrimitive v_request;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+                    
+					var template RequestPrimitive v_createRequest := m_createGroupBase;
+					var template RequestPrimitive v_updateRequest := m_updateGroupBase;
+                            
+					//v_updateRequest.primitiveContent.any_1[0].Group_optional.currentNrOfMembers := 6;
+					const XSD.AnyURI c_memberResourceAddress1 := "MEMBER_RESOURCE_ADDRESS_1";
+					const XSD.AnyURI c_memberResourceAddress2 := "MEMBER_RESOURCE_ADDRESS_2";
+					const XSD.AnyURI c_memberResourceAddress3 := "MEMBER_RESOURCE_ADDRESS_3";
+					const XSD.AnyURI c_memberResourceAddress4 := "MEMBER_RESOURCE_ADDRESS_4";
+					const XSD.AnyURI c_memberResourceAddress5 := "MEMBER_RESOURCE_ADDRESS_5";
+					const XSD.AnyURI c_memberResourceAddress6 := "MEMBER_RESOURCE_ADDRESS_6";
+					
+					v_updateRequest.primitiveContent.any_1[0].Group_optional.memberIDs := {c_memberResourceAddress1, c_memberResourceAddress2, c_memberResourceAddress3, c_memberResourceAddress4, c_memberResourceAddress5, c_memberResourceAddress6};
+					v_updateRequest.primitiveContent.any_1[0].Group_optional.maxNrOfMembers := 5;
+                
+                                    
+					// Test control
+                    
+					// Test component configuration
+					f_cf01Up();
+                    
+					// Test adapter configuration
+                                        
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
+					v_resourceIndex := f_cse_createResource(int9, v_createRequest, v_aeIndex);
+                    
+					// Test Body
+					v_request := f_getUpdateRequestPrimitive(int9, v_resourceIndex, v_updateRequest);
+                                     
+                                     
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": Update failed because member ID exceed max number of member");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while retrieving resource");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
+						}
+					}
+                                    
+					// Postamble
+					f_cse_postamble_deleteResources();
+                    
+					// Tear down
+					f_cf01Down();
+                                    
+				}
+                
+			} // end group g_CSE_GMG_BV_004
+            
+			// Test objective:
+			// Check that the IUT accepts the creation of the  RESOURCE_TYPE resource by using
+			// fanOutPoint in group resource.
+			group g_CSE_GMG_BV_005 {
+            
+				testcase TC_CSE_GMG_BV_005() runs on CseTester system CseSystem
+				{
+                    
+					// TODO: use right values for c_fanoutPointAddress and c_RessourceType1
+					var XSD.AnyURI c_fanoutPointAddress := "FANOUTPOINT_ADDRESS";
+					var ResourceType c_RessourceType1 := int1;
+                
+					// Local variables
+					var MsgIn v_response;
+					var RequestPrimitive v_request;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+                                               
+                    
+					var RequestPrimitive v_createRequest := valueof(m_createGroupBase);
+                
+                        
+					//v_createRequest.primitiveContent.any_1[0].Group_optional.fanOutPoint := c_fanoutPointAddress; TODO <---------------------------------------
+					v_createRequest.primitiveContent.any_1[0].Group_optional.resourceType := c_RessourceType1;
+                            
+                    
+					// Test control
+                    
+					// Test component configuration
+					f_cf01Up();
+                    
+					// Test adapter configuration
+                                        
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
+					//v_resourceIndex := f_cse_createResource(int9, v_createRequest, v_aeIndex);	// not used anymore -> Issue #4
+       
+					v_request := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
+                    
+					// Test Body
+
+					mcaPort.send(m_request(v_createRequest));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": creation successfull by using fanOutPoint in group resource");
+                            
+							if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list)){
+								setverdict(fail, testcasename(), ": Error, aggregatedResponse attribute not provided");
+							}                            
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while retrieving resource");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
+						}
+					}
+                                    
+					// Postamble
+					f_cse_postamble_deleteResources();
+                    
+					// Tear down
+					f_cf01Down();                    
+                
+				}
+                
+			} // end group g_CSE_GMG_BV_005
+            
+			// Test objective:
+			// Check that the IUT returns successfully the resource of the group members by using
+			// fanOutPoint in group resource.
+			group g_CSE_GMG_BV_006 {
+            
+				testcase TC_CSE_GMG_BV_006() runs on CseTester system CseSystem
+				{
+                
+                    
+                
+					// TODO: use right values for c_fanoutPointAddress and c_RessourceType1
+					var XSD.AnyURI c_fanoutPointAddress := "FANOUTPOINT_ADDRESS";
+					var ResourceType c_RessourceType1 := int1;
+                
+					// Local variables
+					var XSD.ID v_resourceId := "NonExisting";
+					var RequestPrimitive v_request := valueof(m_createGroupBase);
+					var MsgIn v_response;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+                    
+                                
+                    
+					//v_request.primitiveContent.any_1[0].Group_optional.fanOutPoint := c_fanoutPointAddress; TODO <---------------------------------------
+                                                    
+                    
+					// Test control
+                    
+					// Test component configuration
+					f_cf01Up();
+                    
+					// Test adapter configuration
+                                        
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
+					v_resourceIndex := f_cse_createResource(int9, v_request, v_aeIndex);
+                    
+					// Test Body
+					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex) & "/" & v_resourceId, f_getOriginator(v_resourceIndex)));
+					mcaPort.send(m_request(valueof(v_request)));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": retrieve attributes successfull by using fanOutPoint in group resource");
+                        
+							if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list)){
+								setverdict(fail, testcasename(), ": Error, aggregatedResponse attribute not provided");
+							}
+													}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while retrieving resource");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
+						}
+					}
+                                    
+					// Postamble
+					f_cse_postamble_deleteResources();
+                    
+					// Tear down
+					f_cf01Down();
+                                    
+				}
+            
+			} // end group g_CSE_GMG_BV_006
+            
+			// Test objective:
+			// Check that the IUT accepts the update of the  RESOURCE_TYPE resource by using
+			// fanOutPoint in group resource.
+			group g_CSE_GMG_BV_007 {
+            
+				testcase TC_CSE_GMG_BV_007() runs on CseTester system CseSystem
+				{
+                                                            
+					const ResourceType c_RessourceType1 := int9;  // <group> ?
+    
+					// Local variables
+					var MsgIn v_response;
+					var RequestPrimitive v_request;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+                                                                
+					var template RequestPrimitive v_createRequest := m_createGroupBase;
+					var template RequestPrimitive v_updateRequest := m_updateGroupBase;
+                    
+					const XSD.AnyURI c_memberRessourceAddress1 := "MEMBER_RESSOURCE_ADDRESS_1";
+					const XSD.AnyURI c_memberRessourceAddress2 := "MEMBER_RESSOURCE_ADDRESS_2";
+					const XSD.AnyURI c_memberRessourceAddress3 := "MEMBER_RESSOURCE_ADDRESS_3";
+					const XSD.AnyURI c_memberRessourceAddress4 := "MEMBER_RESSOURCE_ADDRESS_4";
+					const XSD.AnyURI c_memberRessourceAddress5 := "MEMBER_RESSOURCE_ADDRESS_5";
+					const XSD.AnyURI c_memberRessourceAddress6 := "MEMBER_RESSOURCE_ADDRESS_6";        
+					                    
+					// Test control
+                    
+					// Test component configuration
+					f_cf01Up();
+                    
+					// Test adapter configuration
+                                        
+					// Preamble
+                    
+					//var XSD.AnyURI c_memberRessourceAddress6 := "MEMBER_RESSOURCE_ADDRESS_6";				
+					v_createRequest.primitiveContent.any_1[0].Group_optional.memberIDs := {c_memberRessourceAddress1, c_memberRessourceAddress2, c_memberRessourceAddress3, c_memberRessourceAddress4, c_memberRessourceAddress5, c_memberRessourceAddress6};
+                    
+					v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
+					v_resourceIndex := f_cse_createResource(int9, v_createRequest, v_aeIndex);
+                    
+					// Test Body
+					v_request := f_getUpdateRequestPrimitive(int9, v_resourceIndex, v_updateRequest);
+                                     
+                                     
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": update successfull by using fanOutPoint in group resource");
+                            
+							if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list)){
+								setverdict(fail, testcasename(), ": Error, aggregatedResponse attribute not provided");
+							}                            
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while retrieving resource");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
+						}
+					}
+                                    
+					// Postamble
+					f_cse_postamble_deleteResources();
+                    
+					// Tear down
+					f_cf01Down();
+                                    
+				}
+            
+			} // end group g_CSE_GMG_BV_007
+            
+			// Test objective:
+			// Check that the IUT could delete the  RESOURCE_TYPE resource by using
+			// fanOutPoint in group resource.
+			group g_CSE_GMG_BV_008 {
+                
+				testcase TC_CSE_GMG_BV_008() runs on CseTester system CseSystem
+				{
+					// TODO: use right values for c_fanoutPointAddress and c_deleteAddress
+					var XSD.AnyURI c_fanoutPointAddress := "FANOUTPOINT_ADDRESS";
+					var XSD.ID c_deleteAddress := "DELETE";
+                
+					//Local variables
+					var RequestPrimitive v_request;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+					var MsgIn v_response;
+                    
+                    
+					var template RequestPrimitive v_createRequest := m_createGroupBase;
+					var template RequestPrimitive v_deleteRequest := m_deleteRequest(c_deleteAddress);
+                            
+
+					//v_deleteRequest.primitiveContent.any_1[0].Group_optional.fanOutPoint := c_fanoutPointAddress; TODO <---------------------------------------
+                                    
+                    
+					// Test control
+                    
+					// Test component configuration
+					f_cf01Up();
+                    
+					// Test adapter configuration
+                                        
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
+					v_resourceIndex := f_cse_createResource(int9, v_createRequest, v_aeIndex);
+                    
+					// Test Body
+					v_request := f_getUpdateRequestPrimitive(int9, v_resourceIndex, v_deleteRequest);
+                                     
+                                     
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": delete successfull by using fanOutPoint in group resource");
+
+							if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list)){
+								setverdict(fail, testcasename(), ": Error, aggregatedResponse attribute not provided");
+							}
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while retrieving resource");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
+						}
+					}
+                                    
+					// Postamble
+					f_cse_postamble_deleteResources();
+                    
+					// Tear down
+					f_cf01Down();                    
+                                    
+				}
+            
+			} // end group g_CSE_GMG_BV_008
+            
+			// Test objective:
+			// Check that the IUT detects the presence of duplicate member IDs during the creation of the
+			// group resource and removes the duplicate member IDs prior to creation of the group resource.
+			group g_CSE_GMG_BV_009 {
+                
+				testcase TC_CSE_GMG_BV_009() runs on CseTester system CseSystem
+				{
+                    
+					// TODO: use right values for c_memberRessourceAddress
+					var XSD.AnyURI c_memberRessourceAddress := "MEMBER_RESSOURCE_ADDRESS";
+
+					// Local variables
+					var MsgIn v_response;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+					var template RequestPrimitive v_createRequest := m_createGroupBase;
+                    
+					// Test control
+                    
+					// Test component configuration
+					f_cf01Up();
+                    
+					// Test adapter configuration
+                                        
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
+            
+					v_createRequest := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
+            
+					v_createRequest.primitiveContent.any_1[0].Group_optional := m_contentCreateGroup (1, {c_memberRessourceAddress, c_memberRessourceAddress}, omit);
+                                                            
+					mcaPort.send(m_request(valueof(v_createRequest)));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": Resource created successfuly");
+                                    
+							if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs)){
+								setverdict(fail, testcasename(), ": Error, memberID attribute not provided");
+							} else {
+								if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs[0] != c_memberRessourceAddress){
+									setverdict(fail, testcasename(), ": Error, memberIDs attribute not correct");
+								}
+							}
+                            
+                        
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while creating resource");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while creating resource");
+						}
+					}
+                                    
+					// Postamble
+					f_cse_postamble_deleteResources();
+                    
+					// Tear down
+					f_cf01Down();
+                    
+				}
+            
+			} // end group g_CSE_GMG_BV_009
+            
+			// Test objective:
+			// Check that the IUT validates the resource type during the creation of the
+			// group resource when memberType attribute is not ‘mixed’.
+			group g_CSE_GMG_BV_010 {
+            
+				testcase TC_CSE_GMG_BV_010() runs on CseTester system CseSystem
+				{
+//					Local variables
+					var MsgIn v_response;
+					var RequestPrimitive v_request;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+                                               
+
+					// TODO: use right values for c_RessourceType1
+					var ResourceType c_RessourceType1 := int1;
+                    
+					var ResponsePrimitive.primitiveContent v_responsePrimitive;
+                    
+					var template RequestPrimitive v_createRequest := m_createGroupBase;
+                
+                    
+                    
+					// Test control
+                    
+					// Test component configuration
+					f_cf01Up();
+                    
+					// Test adapter configuration
+                                        
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
+                
+            
+					v_request := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
+                
+					v_request.primitiveContent.any_1[0].Group_optional.resourceType := c_RessourceType1;
+                                                            
+            
+                
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": Resource created successfuly");
+                        
+							if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated)){
+								setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not provided");
+							} else {
+								if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated == false){
+									setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not correct");
+								}
+							}
+                                            
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while creating resource");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while creating resource" );
+						}
+					}
+                                    
+					// Postamble
+					f_cse_postamble_deleteResources();
+                    
+					// Tear down
+					f_cf01Down();
+                                        
+				}
+			} // end group g_CSE_GMG_BV_010
+            
+            
+			// Test objective:
+			// Check that the IUT handles unsuccessful validation of the resource type during the creation of the
+			// group resource when memberType attribute is not ‘mixed’ and the consistencyStrategy attribute is SET_MIXED.
+			group g_CSE_GMG_BV_011 {
+            
+				testcase TC_CSE_GMG_BV_011() runs on CseTester system CseSystem
+				{
+
+					// TODO: use right values for c_RessourceType1 and c_RessourceType2
+					var MemberType c_RessourceType1 := int1;
+					var MemberType c_RessourceType2 := int2;
+
+					// Local variables
+					var ResponsePrimitive.primitiveContent v_responsePrimitive;
+					var MsgIn v_response;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+					var RequestPrimitive v_request;
+                    
+					var template RequestPrimitive v_createRequest := m_createGroupBase;
+                                                    
+					// Test control
+                    
+					// Test component configuration
+					f_cf01Up();
+                    
+					// Test adapter configuration
+                                        
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
+                
+                            
+                
+					v_request := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
+                
+					v_request.primitiveContent.any_1[0].Group_optional.memberType := c_RessourceType2;
+					v_request.primitiveContent.any_1[0].Group_optional.consistencyStrategy := int3; // MIXED
+                                                            
+                        
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": Resource created successfuly");
+                        
+                        
+							// check for memberTypeValidated
+							if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated)){
+								setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not provided");
+							} else {
+								if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated != false){
+									setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not correct");
+								}
+							}
+							// check for memberType (MIXED)
+							if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberType)){
+								setverdict(fail, testcasename(), ": Error, memberType attribute not provided");
+							} else {
+								if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberType != int3){
+									setverdict(fail, testcasename(), ": Error, memberType attribute not correct");
+								}
+							}
+                        
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while creating resource");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while creating resource");
+						}
+					}
+                                    
+					// Postamble
+					f_cse_postamble_deleteResources();
+                    
+					// Tear down
+					f_cf01Down();                   
+                    
+				}
+			} // end group g_CSE_GMG_BV_011
+            
+			// Test objective:
+			// Check that the IUT handles unsuccessful validation of the resource type during the creation of the
+			// group resource when memberType attribute is not ‘mixed’ and the consistencyStrategy attribute is
+			// ABANDON_MEMBER,.
+			group g_CSE_GMG_BV_012 {
+            
+				testcase TC_CSE_GMG_BV_012() runs on CseTester system CseSystem
+				{
+
+					// TODO: use right values for c_RessourceType1 and c_RessourceType2 and c_memberRessourceAddress1 and c_memberRessourceAddress2
+					var MemberType c_RessourceType1 := int1;
+					var MemberType c_RessourceType2 := int2;
+					var XSD.AnyURI c_memberRessourceAddress1 := "MEMBER_RESSOURCE_ADDRESS_1";
+					var XSD.AnyURI c_memberRessourceAddress2 := "MEMBER_RESSOURCE_ADDRESS_2";
+                
+//					Local variables
+					var MsgIn v_response;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+					var template RequestPrimitive v_createRequest := m_createGroupBase;
+					//var ResponsePrimitive.primitiveContent v_responsePrimitive; // not used anymore -> issue #5
+                                    
+					// Test control
+                    
+					// Test component configuration
+					f_cf01Up();
+                    
+					// Test adapter configuration
+                                        
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
+                
+					v_createRequest := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
+					v_createRequest.primitiveContent.any_1[0].Group_optional.memberType := c_RessourceType1;
+					v_createRequest.primitiveContent.any_1[0].Group_optional.consistencyStrategy := int1; // ABANDON_MEMBER
+                                                            
+					mcaPort.send(m_request(valueof(v_createRequest)));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": Resource created successfuly");
+                        
+//							check for memberTypeValidated
+							if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated)){
+								setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not provided");
+							} else {
+								if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated == false){
+									setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not correct");
+								}
+							}
+							// check for membersId
+							if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs)){
+								setverdict(fail, testcasename(), ": Error, memberIDs attribute not provided");
+							} else {
+								if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs[0] != c_memberRessourceAddress1){
+									setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not correct");
+								}
+							}
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while creating resource");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while creating resource");
+						}
+					}
+                                    
+					// Postamble
+					f_cse_postamble_deleteResources();
+                    
+					// Tear down
+					f_cf01Down();                    
+                    
+				}
+            
+			} // end group g_CSE_GMG_BV_012
+            
+			// Test objective:
+			// Check that the IUT handles unsuccessful validation of the resource type during the creation of the
+			// group resource when memberType attribute is not ‘mixed’ and the consistencyStrategy attribute is
+			// ABANDON_GROUP.
+			group g_CSE_GMG_BV_013 {
+                
+				testcase TC_CSE_GMG_BV_013() runs on CseTester system CseSystem
+				{
+
+
+					// TODO: use right values for c_RessourceType1 and c_RessourceType2 and c_memberRessourceAddress1 and c_memberRessourceAddress2
+					var MemberType c_RessourceType1 := int1;
+					var MemberType c_RessourceType2 := int2;
+					var XSD.AnyURI c_memberRessourceAddress1 := "MEMBER_RESSOURCE_ADDRESS_1";
+					var XSD.AnyURI c_memberRessourceAddress2 := "MEMBER_RESSOURCE_ADDRESS_2";
+                
+//					Local variables
+					var MsgIn v_response;
+					var RequestPrimitive v_request;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+                    
+					var template RequestPrimitive v_createRequest := m_createGroupBase;
+                                            
+                    
+					// Test control
+                    
+					// Test component configuration
+					f_cf01Up();
+                    
+					// Test adapter configuration
+                                        
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
+                                
+					v_createRequest := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
+					v_createRequest.primitiveContent.any_1[0].Group_optional := m_contentCreateGroup (1, {c_memberRessourceAddress1, c_memberRessourceAddress2}, omit);
+					v_createRequest.primitiveContent.any_1[0].Group_optional.memberType := c_RessourceType1;
+					v_createRequest.primitiveContent.any_1[0].Group_optional.consistencyStrategy := int2; // ABANDON_GROUP
+                
+					mcaPort.send(m_request(valueof(v_createRequest)));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int4110))) -> value v_response {//TODO Double check ResponseStatusCode
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": unsuccessful validation of the resource type during the creation of the group");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while retrieving resource");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
+						}
+					}
+                    
+					// Postamble
+					f_cse_postamble_deleteResources();
+                    
+					// Tear down
+					f_cf01Down();
+					
+				}
+            
+			} // end group g_CSE_GMG_BV_013
+
+			// Test objective:
+			// Check that the IUT detects the presence of duplicate member IDs during the creation of the
+			// group resource and removes the duplicate member IDs prior to updating of the group resource.
+			group g_CSE_GMG_BV_014 {
+				testcase TC_CSE_GMG_BV_014() runs on CseTester system CseSystem
+				{
+					//Local constants
+					const ResourceType c_ResourceTypeGroup := int9;  // "group": TS-0004, Table 6.3.4.2.1-1
+					const ResourceType c_ResourceType1 := int4;      // "contentInstance": TS-0004, Table 6.3.4.2.1-1
+					const XSD.String c_primitiveContent := "any content instance value"; // embedded value of a contentInstance
+//					const XSD.AnyURI c_targetResourceAddress := "TARGET_RESOURCE_ADDRESS"; // resource type can be <CSEBase>, <AE>, <remoteCSE>
+					const XSD.AnyURI c_memberResourceAddress1 := "MEMBER_RESSOURCE_ADDRESS_1"; // any resource type
+					const XSD.AnyURI c_memberResourceAddress2 := "MEMBER_RESSOURCE_ADDRESS_2"; // any resource type
+    
+					// Local variables
+					var MsgIn v_response;
+					var RequestPrimitive v_request;
+					var integer v_aeIndex := -1;       // initialization with dummy value
+					var integer v_groupIndex := -1;    // initialization with dummy value
+                        
+					var template RequestPrimitive v_createRequest := m_createGroupBase;
+					var template RequestPrimitive v_updateRequest := m_updateGroupBase;
+					var template RequestPrimitive v_createMember;
+                     
+					// Test control
+                    
+					// Test component configuration
+					f_cf01Up();
+                
+					// Test adapter configuration
+                    
+					// Preamble
+					
+					//    and the IUT having registered the AE
+					v_aeIndex := f_cse_preamble_registerAe(); // create auxiliar AE
+
+					//    and the IUT having a resource at TARGET_RESOURCE_ADDRESS of type <group>
+					//            containing memberIDs attribute 
+					//            set to MEMBER_RESOURCE_ADDRESS_1
+					//    and the AE having privileges to perform UPDATE operation on the TARGET_RESOURCE_ADDRESS                    
+					v_createRequest := f_getCreateRequestPrimitive(c_ResourceTypeGroup, v_createRequest, v_aeIndex); // build request primitive
+					v_createRequest.primitiveContent.any_1[0].Group_optional := m_contentCreateGroup(1, {c_memberResourceAddress1}, omit);
+					v_groupIndex := f_cse_createResource(c_ResourceTypeGroup, v_createRequest, v_aeIndex); // create resource
+                    
+					//    and the IUT having a resource at MEMBER_RESOURCE_ADDRESS_1
+					//        having resourceType attribute RESOURCE_TYPE_1
+					//    and the IUT having a resource at MEMBER_RESOURCE_ADDRESS_2
+					//        having resourceType attribute RESOURCE_TYPE_1
+					v_createMember := m_createContentInstance(f_getResourceAddress(v_aeIndex), c_primitiveContent & "_1"); // build request primitive
+					f_cse_createResource(c_ResourceType1, v_createMember, v_aeIndex); // request new member
+					v_createMember := m_createContentInstance(f_getResourceAddress(v_aeIndex), c_primitiveContent & "_2"); // build request primitive
+					f_cse_createResource(c_ResourceType1, v_createMember, v_aeIndex); // request new member
+                    
+
+					//Test Body
+					v_request := f_getUpdateRequestPrimitive(c_ResourceTypeGroup, v_groupIndex, v_updateRequest);
+//					v_request.to_ := c_targetResourceAddress;
+					v_request.primitiveContent.any_1[0].Group_optional := valueof(m_contentCreateGroup(2, {c_memberResourceAddress2, c_memberResourceAddress2}, omit));
+                    
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						 [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response {
+							 tc_ac.stop;
+							 setverdict(pass, testcasename() & ": update successful"); 
+
+                                                  
+							// check for membersId
+							if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs)){
+								setverdict(fail, testcasename(), ": Error, memberIDs attribute not provided");
+							} else {
+                                
+								if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs) != 1) {
+								   setverdict(fail, testcasename() & ": Error, wrong number of memberIDs attribute");      
+								}                               
+								if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs[0] != c_memberResourceAddress2){
+									setverdict(fail, testcasename(), ": Error, memberIDs attribute not correct");
+								}
+							}
+                            
+						 }
+						 [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+							 tc_ac.stop;
+							 setverdict(fail, testcasename() & ": Error while retrieving resource");
+						 }
+						 [] tc_ac.timeout {
+							 setverdict(inconc, testcasename() & ": No answer while retrieving resource");
+						 }
+					 }
+                    
+					//Postamble
+					f_cse_postamble_deleteResources();
+    
+					// Tear down
+					f_cf01Down();
+				}
+			} // end group g_CSE_GMG_BV_014
+
+			/**
+			 * @desc Check that the IUT validates the resource type during an UPDATE of the  <group> resource when memberType attribute is not ‘mixed’.
+			 */
+			group g_CSE_GMG_BV_015 {
+				testcase TC_CSE_GMG_BV_015() runs on CseTester system CseSystem
+				{
+					//Local constants
+					const ResourceType c_ResourceTypeGroup := int9;  
+					const ResourceType c_ResourceType1 := int4;     
+					const MemberType   c_memberType1   := int4;     // should be set same type as c_ResourceType1
+					const XSD.String c_primitiveContent := "any content instance value"; // embedded value of a contentInstance
+//					  const XSD.AnyURI c_targetResourceAddress := "TARGET_RESOURCE_ADDRESS";
+					const XSD.AnyURI c_memberResourceAddress1 := "MEMBER_RESSOURCE_ADDRESS_1";
+					const XSD.AnyURI c_memberResourceAddress2 := "MEMBER_RESSOURCE_ADDRESS_2";
+    
+					// Local variables
+					var MsgIn v_response;
+					var RequestPrimitive v_request;
+					var integer v_aeIndex := -1;
+					var integer v_groupIndex := -1;
+            
+					var template RequestPrimitive v_createRequest := m_createGroupBase;
+					var template RequestPrimitive v_updateRequest := m_updateGroupBase;
+					var template RequestPrimitive v_createMember;
+         
+					// Test control
+        
+					// Test component configuration
+					f_cf01Up();
+    
+					// Test adapter configuration
+        
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
+        
+					//    and the IUT having a resource at TARGET_RESOURCE_ADDRESS of type <group>
+					//            containing 
+					//            memberIDs attribute set to MEMBER_RESOURCE_ADDRESS_1
+					//            memberType attribute set to RESOURCE_TYPE_1
+					//    and the AE having privileges to perform UPDATE operation on the TARGET_RESOURCE_ADDRESS
+					v_createRequest := f_getCreateRequestPrimitive(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
+					v_createRequest.primitiveContent.any_1[0].Group_optional := m_contentCreateGroup(1, {c_memberResourceAddress1}, omit);
+					v_createRequest.primitiveContent.any_1[0].Group_optional.memberType := c_memberType1;
+					v_groupIndex := f_cse_createResource(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
+
+
+					//      and the IUT having a resource at MEMBER_RESOURCE_ADDRESS_1
+					//            having resourceType attribute RESOURCE_TYPE_1
+					//      and the IUT having a resource at MEMBER_RESOURCE_ADDRESS_2
+					//            having resourceType attribute RESOURCE_TYPE_1
+					v_createMember := m_createContentInstance(f_getResourceAddress(v_aeIndex), c_primitiveContent & "_1");
+					f_cse_createResource(c_ResourceType1, v_createMember, v_aeIndex);
+					v_createMember := m_createContentInstance(f_getResourceAddress(v_aeIndex), c_primitiveContent & "_2");
+					f_cse_createResource(c_ResourceType1, v_createMember, v_aeIndex);
+        
+    
+					//Test Body
+					v_request := f_getUpdateRequestPrimitive(c_ResourceTypeGroup, v_groupIndex, v_updateRequest);
+//					  v_request.to_ := c_targetResourceAddress;
+					v_request.primitiveContent.any_1[0].Group_optional := valueof(m_contentCreateGroup(1, {c_memberResourceAddress2}, omit));
+        
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": update successful"); 
+                             
+							 if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated)) {
+								setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not provided");    
+							 } else {
+								if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated == false) {
+									setverdict(fail, testcasename(), ": Error, memberTypeValidated wrong value");  
+								}
+							 }
+						}
+						 [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+							 tc_ac.stop;
+							 setverdict(fail, testcasename() & ": Error while retrieving resource");
+						 }
+						 [] tc_ac.timeout {
+							 setverdict(inconc, testcasename() & ": No answer while retrieving resource");
+						 }
+					 }
+        
+					//Postamble
+					f_cse_postamble_deleteResources();
+    
+					// Tear down
+					f_cf01Down();
+				}
+			} // end group g_CSE_GMG_BV_015 
+            
+			group g_CSE_GMG_BV_016 {
+				// Check that the IUT handles unsuccessful validation of the resource type during an UPDATE of the <group> resource when memberType attribute is not ‘mixed’ and the consistencyStrategy attribute is SET_MIXED.
+				testcase TC_CSE_GMG_BV_016() runs on CseTester system CseSystem
+				{
+					//Local constants
+					const ResourceType c_ResourceTypeGroup := int9;  
+					const ResourceType c_ResourceType1 := int4; 
+					const ResourceType c_ResourceType2 := int5; 
+					const MemberType   c_memberType1   := int4;     // should be set same type as c_ResourceType1
+					const MemberType   c_memberType2   := int5;     // should be set same type as c_ResourceType2
+					const MemberType   c_memberType_MIXED := int0;  // "mixed": TS-0004, Table 6.3.4.2.11-1
+					const XSD.String c_primitiveContent := "any embedded primitive_content";
+					const ConsistencyStrategy c_consistentcyStrategy := int3;   // "SET_MIXED": TS-0004, Table 6.3.4.2.12-1 
+//					  const XSD.AnyURI c_targetResourceAddress := "TARGET_RESOURCE_ADDRESS";
+					const XSD.AnyURI c_memberResourceAddress1 := "MEMBER_RESSOURCE_ADDRESS_1";
+					const XSD.AnyURI c_memberResourceAddress2 := "MEMBER_RESSOURCE_ADDRESS_2";
+    
+					// Local variables
+					var MsgIn v_response;
+					var RequestPrimitive v_request;
+					var integer v_aeIndex := -1;
+					var integer v_groupIndex := -1;
+            
+					var template RequestPrimitive v_createRequest := m_createGroupBase;
+					var template RequestPrimitive v_updateRequest := m_updateGroupBase;
+					var template RequestPrimitive v_createMember;
+         
+					// Test control
+        
+					// Test component configuration
+					f_cf01Up();
+    
+					// Test adapter configuration
+        
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
+
+					//    and the IUT having a resource at TARGET_RESOURCE_ADDRESS of type <group>
+					//            containing 
+					//            memberIDs attribute set to MEMBER_RESOURCE_ADDRESS_1
+					//            memberType attribute set to RESOURCE_TYPE_1
+					//            memberTypeValidated attribute set to TRUE
+					//            consistencyStrategy attribute set to SET_MIXED
+					//    and the AE having privileges to perform UPDATE operation on the TARGET_RESOURCE_ADDRESS        
+					v_createRequest := f_getCreateRequestPrimitive(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
+					v_createRequest.primitiveContent.any_1[0].Group_optional := m_contentCreateGroup(1, {c_memberResourceAddress1}, omit);
+					v_createRequest.primitiveContent.any_1[0].Group_optional.memberType := c_memberType1;
+					v_createRequest.primitiveContent.any_1[0].Group_optional.memberTypeValidated := true;
+					v_createRequest.primitiveContent.any_1[0].Group_optional.consistencyStrategy := c_consistentcyStrategy;
+					v_groupIndex := f_cse_createResource(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
+
+					//      and the IUT having a resource at MEMBER_RESOURCE_ADDRESS_1
+					//            having resourceType attribute RESOURCE_TYPE_1
+					//      and the IUT having a resource at MEMBER_RESOURCE_ADDRESS_2
+					//            having resourceType attribute RESOURCE_TYPE_2
+					v_createMember := m_createContentInstance(f_getResourceAddress(v_aeIndex), c_primitiveContent & "_1");
+					f_cse_createResource(c_ResourceType1, v_createMember, v_aeIndex);
+					v_createMember := m_createContentInstance(f_getResourceAddress(v_aeIndex), c_primitiveContent & "_2");
+					f_cse_createResource(c_ResourceType2, v_createMember, v_aeIndex);
+        
+    
+					//Test Body
+            
+					//    the IUT receives an valid UPDATE request from AE containing 
+					//            To set to TARGET_RESOURCE_ADDRESS and
+					//            From set to AE-ID and 
+					//            Content set to <group> resource containing
+					//                memberIDs attribute set to 
+					//                    MEMBER_RESOURCE_ADDRESS_1,
+					//                            MEMBER_RESOURCE_ADDRESS_2
+					v_request := f_getUpdateRequestPrimitive(c_ResourceTypeGroup, v_groupIndex, v_updateRequest);
+//					  v_request.to_ := c_targetResourceAddress;
+					v_request.primitiveContent.any_1[0].Group_optional := valueof(m_contentCreateGroup(2, {c_memberResourceAddress1, c_memberResourceAddress2}, omit));
+        
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": update successful");                              
+                             
+							//memberTypeValidated attribute set to FALSE
+							 if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated)) {
+								setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not provided");    
+							 } else {
+								if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated != false) {
+									setverdict(fail, testcasename(), ": Error, memberTypeValidated must be FALSE");
+								}}
+                                
+							//memberType attribute set to MIXED
+							 if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberType)) {
+								setverdict(fail, testcasename(), ": Error, memberType attribute not provided");    
+							 } else {
+								if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberType != c_memberType_MIXED) {
+									setverdict(fail, testcasename(), ": Error, memberType was not set to MIXED");
+								}}
+                                
+							 }
+						 [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+							 tc_ac.stop;
+							 setverdict(fail, testcasename() & ": Error while retrieving resource");
+						 }
+						 [] tc_ac.timeout {
+							 setverdict(inconc, testcasename() & ": No answer while retrieving resource");
+						 }
+					 }
+        
+					//Postamble
+					f_cse_postamble_deleteResources();
+    
+					// Tear down
+					f_cf01Down();
+				}
+			} // end group g_CSE_GMG_BV_016 
+        
+			group g_CSE_GMG_BV_017 {
+				// Test objective: Check that the IUT handles unsuccessful validation of the resource type during an UPDATE of the <group> resource when memberType attribute is not ‘mixed’ and the consistencyStrategy attribute is ABANDON_MEMBER.
+				testcase TC_CSE_GMG_BV_017() runs on CseTester system CseSystem
+				{
+					//Local constants
+					const ResourceType c_ResourceTypeGroup := int9;  
+					const ResourceType c_ResourceType1 := int4; 
+					const ResourceType c_ResourceType2 := int5; 
+					const MemberType   c_memberType1   := int4;     // should be set same type as c_ResourceType1
+					const MemberType   c_memberType2   := int5;     // should be set same type as c_ResourceType2
+					const XSD.String c_primitiveContent := "primitive_content";
+					const ConsistencyStrategy c_consistentcyStrategy := int1;   // ABANDOND_MEMBER: TS-0004, Table 6.3.4.2.12-1
+//					  const XSD.AnyURI c_targetResourceAddress := "TARGET_RESOURCE_ADDRESS";
+					const XSD.AnyURI c_memberResourceAddress1 := "MEMBER_RESSOURCE_ADDRESS_1";
+					const XSD.AnyURI c_memberResourceAddress2 := "MEMBER_RESSOURCE_ADDRESS_2";
+    
+					// Local variables
+					var MsgIn v_response;
+					var RequestPrimitive v_request;
+					var integer v_aeIndex := -1;
+					var integer v_groupIndex := -1;
+            
+					var template RequestPrimitive v_createRequest := m_createGroupBase;
+					var template RequestPrimitive v_updateRequest := m_updateGroupBase;
+					var template RequestPrimitive v_createMember;
+         
+					// Test control
+        
+					// Test component configuration
+					f_cf01Up();
+    
+					// Test adapter configuration
+        
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
+        
+					//    and the IUT having a resource at TARGET_RESOURCE_ADDRESS of type <group>
+					//            containing 
+					//            memberIDs attribute set to MEMBER_RESOURCE_ADDRESS_1
+					//            memberType attribute set to RESOURCE_TYPE_1
+					//            memberTypeValidated attribute set to TRUE
+					//            consistencyStrategy attribute set to ABANDON_MEMBER
+					//    and the AE having privileges to perform UPDATE operation on the TARGET_RESOURCE_ADDRESS
+					v_createRequest := f_getCreateRequestPrimitive(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
+					v_createRequest.primitiveContent.any_1[0].Group_optional := m_contentCreateGroup(1, {c_memberResourceAddress1}, omit);
+					v_createRequest.primitiveContent.any_1[0].Group_optional.memberType := c_memberType1;
+					v_createRequest.primitiveContent.any_1[0].Group_optional.memberTypeValidated := true;
+					v_createRequest.primitiveContent.any_1[0].Group_optional.consistencyStrategy := c_consistentcyStrategy;
+					v_groupIndex := f_cse_createResource(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
+
+
+					//      and the IUT having a resource at MEMBER_RESOURCE_ADDRESS_1
+					//            having resourceType attribute RESOURCE_TYPE_1
+					//      and the IUT having a resource at MEMBER_RESOURCE_ADDRESS_2
+					//            having resourceType attribute RESOURCE_TYPE_2
+					v_createMember := m_createContentInstance(f_getResourceAddress(v_aeIndex), c_primitiveContent & "_1");
+					f_cse_createResource(c_ResourceType1, v_createMember, v_aeIndex);
+					v_createMember := m_createContentInstance(f_getResourceAddress(v_aeIndex), c_primitiveContent & "_2");
+					f_cse_createResource(c_ResourceType2, v_createMember, v_aeIndex);
+        
+    
+					//Test Body
+					v_request := f_getUpdateRequestPrimitive(c_ResourceTypeGroup, v_groupIndex, v_updateRequest);
+//					  v_request.to_ := c_targetResourceAddress;
+					v_request.primitiveContent.any_1[0].Group_optional := valueof(m_contentCreateGroup(2, {c_memberResourceAddress1, c_memberResourceAddress2}, omit));
+        
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": update successful"); 
+                                                          
+							//memberTypeValidated attribute set to TRUE
+							 if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated)) {
+								setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not provided");    
+							 } else {
+								if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated != true) {
+									setverdict(fail, testcasename(), ": Error, memberTypeValidated must be TRUE");
+								}}
+
+							//memberIDs attribute set to 
+							//                    MEMBER_RESOURCE_ADDRESS_1
+							if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs)){
+								setverdict(fail, testcasename(), ": Error, memberIDs attribute not provided");
+							} else {                               
+								if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs) != 1) {
+								   setverdict(fail, testcasename() & ": Error, wrong number of memberIDs attribute");      
+								}                               
+								if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs[0] != c_memberResourceAddress1){
+									setverdict(fail, testcasename(), ": Error, memberIDs attribute not correct");
+								}
+							}                                   
+                             
+						}
+						 [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+							 tc_ac.stop;
+							 setverdict(fail, testcasename() & ": Error while retrieving resource");
+						 }
+						 [] tc_ac.timeout {
+							 setverdict(inconc, testcasename() & ": No answer while retrieving resource");
+						 }
+					 }
+        
+					//Postamble
+					f_cse_postamble_deleteResources();
+    
+					// Tear down
+					f_cf01Down();
+				}
+			} // end group g_CSE_GMG_BV_017
+        
+			group g_CSE_GMG_BV_018 {
+				// Test objective: Check that the IUT handles unsuccessful validation of the resource type during the creation of the  <group> resource when memberType attribute is not ‘mixed’ and the consistencyStrategy attribute is ABANDON_GROUP.
+				testcase TC_CSE_GMG_BV_018() runs on CseTester system CseSystem
+				{
+					//Local constants
+					const ResourceType c_ResourceTypeGroup := int9;  
+					const ResourceType c_ResourceType1 := int4; 
+					const ResourceType c_ResourceType2 := int5; 
+					const MemberType   c_memberType1   := int4;     // should be set same type as c_ResourceType1
+					const MemberType   c_memberType2   := int5;     // should be set same type as c_ResourceType2
+					const XSD.String c_primitiveContent := "primitive_contet";
+					const ConsistencyStrategy c_consistentcyStrategy := int2;   // ABANDOND_GROUP
+//					  const XSD.AnyURI c_targetResourceAddress := "TARGET_RESOURCE_ADDRESS";
+					const XSD.AnyURI c_memberResourceAddress1 := "MEMBER_RESSOURCE_ADDRESS_1";
+					const XSD.AnyURI c_memberResourceAddress2 := "MEMBER_RESSOURCE_ADDRESS_2";
+    
+					// Local variables
+					var MsgIn v_response;
+					var RequestPrimitive v_request;
+					var integer v_aeIndex := -1;
+					var integer v_groupIndex := -1;
+            
+					var template RequestPrimitive v_createRequest := m_createGroupBase;
+					var template RequestPrimitive v_updateRequest := m_updateGroupBase;
+					var template RequestPrimitive v_createMember;
+         
+					// Test control
+        
+					// Test component configuration
+					f_cf01Up();
+    
+					// Test adapter configuration
+        
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
+        
+					//    and the IUT having a resource at TARGET_RESOURCE_ADDRESS of type <group>
+					//            containing 
+					//            memberIDs attribute set to MEMBER_RESOURCE_ADDRESS_1
+					//            memberType attribute set to RESOURCE_TYPE_1
+					//            memberTypeValidated attribute set to TRUE
+					//            consistencyStrategy attribute set to # (ABANDON_GROUP)
+					//    and the AE having privileges to perform UPDATE operation on the   
+					//            TARGET_RESOURCE_ADDRESS
+					v_createRequest := f_getCreateRequestPrimitive(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
+					v_createRequest.primitiveContent.any_1[0].Group_optional := m_contentCreateGroup(1, {c_memberResourceAddress1}, omit);
+					v_createRequest.primitiveContent.any_1[0].Group_optional.memberType := c_memberType1;
+					v_createRequest.primitiveContent.any_1[0].Group_optional.memberTypeValidated := true;
+					v_createRequest.primitiveContent.any_1[0].Group_optional.consistencyStrategy := c_consistentcyStrategy;
+					v_groupIndex := f_cse_createResource(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
+        
+					//      and the IUT having a resource at MEMBER_RESOURCE_ADDRESS_1
+					//            having resourceType attribute RESOURCE_TYPE_1
+					//      and the IUT having a resource at MEMBER_RESOURCE_ADDRESS_2
+					//            having resourceType attribute RESOURCE_TYPE_2
+					v_createMember := m_createContentInstance(f_getResourceAddress(v_aeIndex), c_primitiveContent & "_1");
+					f_cse_createResource(c_ResourceType1, v_createMember, v_aeIndex);
+					v_createMember := m_createContentInstance(f_getResourceAddress(v_aeIndex), c_primitiveContent & "_2");
+					f_cse_createResource(c_ResourceType2, v_createMember, v_aeIndex);
+        
+    
+					//Test Body
+					v_request := f_getUpdateRequestPrimitive(c_ResourceTypeGroup, v_groupIndex, v_updateRequest);
+//					  v_request.to_ := c_targetResourceAddress;
+					v_request.primitiveContent.any_1[0].Group_optional := valueof(m_contentCreateGroup(2, {c_memberResourceAddress1, c_memberResourceAddress2}, omit));
+        
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": deleted successful");                               
+						}
+						 [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+							 tc_ac.stop;
+							 setverdict(fail, testcasename() & ": Error while retrieving resource");
+						 }
+						 [] tc_ac.timeout {
+							 setverdict(inconc, testcasename() & ": No answer while retrieving resource");
+						 }
+					 }
+        
+					//Postamble
+					f_cse_postamble_deleteResources();
+    
+					// Tear down
+					f_cf01Down();
+				}
+			} // end group g_CSE_GMG_BV_018
+       
+			group g_CSE_GMG_BV_019 {
+				// Test objective: Check that the IUT detects when the number of memberIDs exceeds the limitation of maxNrOfMembers.
+				testcase TC_CSE_GMG_BV_019() runs on CseTester system CseSystem
+				{
+					//Local constants
+					const ResourceType c_ResourceTypeGroup := int9;  
+					const ResourceType c_ResourceType1 := int4; 
+					const MemberType   c_memberType1   := int4;     // should be set same type as c_ResourceType1
+					const XSD.String c_primitiveContent := "primitive_contet";
+//					  const XSD.AnyURI c_targetResourceAddress := "TARGET_RESOURCE_ADDRESS";
+					const XSD.AnyURI c_memberResourceAddress1 := "MEMBER_RESSOURCE_ADDRESS_1";
+					const XSD.AnyURI c_memberResourceAddress2 := "MEMBER_RESSOURCE_ADDRESS_2";
+					const XSD.AnyURI c_memberResourceAddress3 := "MEMBER_RESSOURCE_ADDRESS_3";
+    
+					// Local variables
+					var MsgIn v_response;
+					var RequestPrimitive v_request;
+					var integer v_aeIndex := -1;
+					var integer v_groupIndex := -1;
+            
+					var template RequestPrimitive v_createRequest := m_createGroupBase;
+					var template RequestPrimitive v_updateRequest := m_updateGroupBase;
+					var template RequestPrimitive v_createMember;
+         
+					// Test control
+        
+					// Test component configuration
+					f_cf01Up();
+    
+					// Test adapter configuration
+        
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
+        
+					//    and the IUT having a resource at TARGET_RESOURCE_ADDRESS of type <group>
+					//            containing 
+					//            memberIDs attribute set to MEMBER_RESOURCE_ADDRESS_1, 
+					//                                                        MEMBER_RESOURCE_ADDRESS_2
+					//            maxNrOfMembers attribute set to 2
+					//    and the AE having privileges to perform UPDATE operation on the TARGET_RESOURCE_ADDRESS
+					v_createRequest := f_getCreateRequestPrimitive(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
+					v_createRequest.primitiveContent.any_1[0].Group_optional := m_contentCreateGroup(2, {c_memberResourceAddress1, c_memberResourceAddress2}, omit);
+					v_createRequest.primitiveContent.any_1[0].Group_optional.maxNrOfMembers := 2;
+					v_groupIndex := f_cse_createResource(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
+        
+					//      and the IUT having a resource at MEMBER_RESOURCE_ADDRESS_1
+					//            having resourceType attribute RESOURCE_TYPE_1
+					//      and the IUT having a resource at MEMBER_RESOURCE_ADDRESS_2
+					//            having resourceType attribute RESOURCE_TYPE_1
+					//      and the IUT having a resource at MEMBER_RESOURCE_ADDRESS_3
+					//            having resourceType attribute RESOURCE_TYPE_1
+					v_createMember := m_createContentInstance(f_getResourceAddress(v_aeIndex), c_primitiveContent & "_1");
+					f_cse_createResource(c_ResourceType1, v_createMember, v_aeIndex);
+					v_createMember := m_createContentInstance(f_getResourceAddress(v_aeIndex), c_primitiveContent & "_2");
+					f_cse_createResource(c_ResourceType1, v_createMember, v_aeIndex);
+					v_createMember := m_createContentInstance(f_getResourceAddress(v_aeIndex), c_primitiveContent & "_3");
+					f_cse_createResource(c_ResourceType1, v_createMember, v_aeIndex);
+        
+    
+					//Test Body
+					v_request := f_getUpdateRequestPrimitive(c_ResourceTypeGroup, v_groupIndex, v_updateRequest);
+//					  v_request.to_ := c_targetResourceAddress;
+					v_request.primitiveContent.any_1[0].Group_optional := valueof(m_contentCreateGroup(3, {c_memberResourceAddress1, c_memberResourceAddress2, c_memberResourceAddress3}, omit));
+        
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": operation is not allowed");                             
+						}
+						 [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+							 tc_ac.stop;
+							 setverdict(fail, testcasename() & ": Error while retrieving resource");
+						 }
+						 [] tc_ac.timeout {
+							 setverdict(inconc, testcasename() & ": No answer while retrieving resource");
+						 }
+					 }
+        
+					//Postamble
+					f_cse_postamble_deleteResources();
+    
+					// Tear down
+					f_cf01Down();
+				}
+			} // end group g_CSE_GMG_BV_019
+
+			group g_CSE_GMG_BV_020 {
+				// Test objective: Check that the IUT detects when the value provided for maxNrOfMembers attribute is less than the value of the currentNrOfMembers attribute.
+				testcase TC_CSE_GMG_BV_020() runs on CseTester system CseSystem
+				{
+					//Local constants
+					const ResourceType c_ResourceTypeGroup := int9;  
+					const ResourceType c_ResourceType1 := int4; 
+					const MemberType   c_memberType1   := int4;     // should be set same type as c_ResourceType1
+					const XSD.String c_primitiveContent := "primitive_contet";
+//					  const XSD.AnyURI c_targetResourceAddress := "TARGET_RESOURCE_ADDRESS";
+					const XSD.AnyURI c_memberResourceAddress1 := "MEMBER_RESSOURCE_ADDRESS_1";
+					const XSD.AnyURI c_memberResourceAddress2 := "MEMBER_RESSOURCE_ADDRESS_2";
+					const XSD.AnyURI c_memberResourceAddress3 := "MEMBER_RESSOURCE_ADDRESS_3";
+    
+					// Local variables
+					var MsgIn v_response;
+					var RequestPrimitive v_request;
+					var integer v_aeIndex := -1;
+					var integer v_groupIndex := -1;
+            
+					var template RequestPrimitive v_createRequest := m_createGroupBase;
+					var template RequestPrimitive v_updateRequest := m_updateGroupBase;
+					var template RequestPrimitive v_createMember;
+         
+					// Test control
+        
+					// Test component configuration
+					f_cf01Up();
+    
+					// Test adapter configuration
+        
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
+        
+					//    and the IUT having a resource at TARGET_RESOURCE_ADDRESS of type <group>
+					//            containing 
+					//            memberIDs attribute set to MEMBER_RESOURCE_ADDRESS_1, 
+					//                                                        MEMBER_RESOURCE_ADDRESS_2
+					//            maxNrOfMembers attribute set to 2
+					//    and the AE having privileges to perform UPDATE operation on the TARGET_RESOURCE_ADDRESS
+					v_createRequest := f_getCreateRequestPrimitive(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
+					v_createRequest.primitiveContent.any_1[0].Group_optional := m_contentCreateGroup(3, {c_memberResourceAddress1, c_memberResourceAddress2, c_memberResourceAddress3}, omit);
+					v_createRequest.primitiveContent.any_1[0].Group_optional.maxNrOfMembers := 3;
+					v_groupIndex := f_cse_createResource(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
+        
+
+					//      and the IUT having a resource at MEMBER_RESOURCE_ADDRESS_1
+					//            having resourceType attribute RESOURCE_TYPE_1
+					//      and the IUT having a resource at MEMBER_RESOURCE_ADDRESS_2
+					//            having resourceType attribute RESOURCE_TYPE_1
+					//      and the IUT having a resource at MEMBER_RESOURCE_ADDRESS_3
+					//            having resourceType attribute RESOURCE_TYPE_1
+					v_createMember := m_createContentInstance(f_getResourceAddress(v_aeIndex), c_primitiveContent & "_1");
+					f_cse_createResource(c_ResourceType1, v_createMember, v_aeIndex);
+					v_createMember := m_createContentInstance(f_getResourceAddress(v_aeIndex), c_primitiveContent & "_2");
+					f_cse_createResource(c_ResourceType1, v_createMember, v_aeIndex);
+					v_createMember := m_createContentInstance(f_getResourceAddress(v_aeIndex), c_primitiveContent & "_3");
+					f_cse_createResource(c_ResourceType1, v_createMember, v_aeIndex);
+        
+    
+					//Test Body
+					v_request := f_getUpdateRequestPrimitive(c_ResourceTypeGroup, v_groupIndex, v_updateRequest);
+//					  v_request.to_ := c_targetResourceAddress;
+					v_request.primitiveContent.any_1[0].Group_optional.maxNrOfMembers := 2;
+        
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": operation is not allowed");                             
+						}
+						 [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+							 tc_ac.stop;
+							 setverdict(fail, testcasename() & ": Error while retrieving resource");
+						 }
+						 [] tc_ac.timeout {
+							 setverdict(inconc, testcasename() & ": No answer while retrieving resource");
+						 }
+					 }
+        
+					//Postamble
+					f_cse_postamble_deleteResources();
+    
+					// Tear down
+					f_cf01Down();
+				}
+			} // end group g_CSE_GMG_BV_020
+
+			group g_CSE_GMG_BV_021 {
+				// Test objective: Check that the IUT handles validation of the resource type during an UPDATE of the <group> resource when memberIDs contains a sub-group on a temporarily unreachable Hosting CSE.
+				testcase TC_CSE_GMG_BV_021() runs on CseTester system CseSystem
+				{
+					//Local constants
+					const ResourceType c_ResourceTypeGroup := int9;  
+					const ResourceType c_ResourceType1 := int4; 
+					const MemberType   c_memberType1   := int4;     // should be set same type as c_ResourceType1
+					const XSD.String c_primitiveContent := "primitive_contet";
+					const ConsistencyStrategy c_consistentcyStrategy := int1;   // ABANDOND_MEMBER
+//					  const XSD.AnyURI c_targetResourceAddress := "TARGET_RESOURCE_ADDRESS";
+					const XSD.AnyURI c_memberResourceAddress1 := "MEMBER_RESSOURCE_ADDRESS_1";
+					const XSD.AnyURI c_memberResourceAddress2 := "MEMBER_RESSOURCE_ADDRESS_2";
+    
+					// Local variables
+					var MsgIn v_response;
+					var RequestPrimitive v_request;
+					var integer v_aeIndex := -1;
+					var integer v_groupIndex := -1;
+            
+					var template RequestPrimitive v_createRequest := m_createGroupBase;
+					var template RequestPrimitive v_updateRequest := m_updateGroupBase;
+					var template RequestPrimitive v_createMember;
+         
+					// Test control
+        
+					// Test component configuration
+					f_cf01Up();
+    
+					// Test adapter configuration
+        
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
+//					TODO: -> register IUT to the remoteCSE
+        
+					v_createRequest := f_getCreateRequestPrimitive(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
+					v_createRequest.primitiveContent.any_1[0].Group_optional := m_contentCreateGroup(1, {c_memberResourceAddress1}, omit);
+					v_createRequest.primitiveContent.any_1[0].Group_optional.memberType := c_memberType1;
+					v_createRequest.primitiveContent.any_1[0].Group_optional.memberTypeValidated := true;
+					v_createRequest.primitiveContent.any_1[0].Group_optional.consistencyStrategy := c_consistentcyStrategy;
+					v_groupIndex := f_cse_createResource(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
+        
+					// TODO: -> do the resources actually need to be created?
+					// TODO: choose the right template for member resource
+					v_createMember := m_createContentInstance(f_getResourceAddress(v_aeIndex), c_primitiveContent & "_1");
+					f_cse_createResource(c_ResourceType1, v_createMember, v_aeIndex);
+                    
+					// TODO: create resource of type <group> at c_memberResourceAddress2 on remoteCSE
+					// TODO: set onlineStatus to false on remoteCSE
+        
+    
+					//Test Body
+					v_request := f_getUpdateRequestPrimitive(c_ResourceTypeGroup, v_groupIndex, v_updateRequest);
+//					  v_request.to_ := c_targetResourceAddress;
+					v_createRequest.primitiveContent.any_1[0].Group_optional := m_contentCreateGroup(2, {c_memberResourceAddress1, c_memberResourceAddress2}, omit);
+        
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response {
+							tc_ac.stop;
+                            
+							if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated)) {
+								setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not provided");    
+							 } else {
+								if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated == false) {
+									if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs) != 2) {
+										setverdict(fail, testcasename() & ": Error, wrong number of memberIDs attribute"); 
+									} else {
+										if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs[0] == c_memberResourceAddress1 and v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs[1] == c_memberResourceAddress2) {
+											setverdict(pass, testcasename() & ": update successful");       
+										} else {
+											setverdict(fail, testcasename(), ": Error, wrong memberIDs");   
+										}
+									}
+								} else {
+									setverdict(fail, testcasename(), ": Error, memberTypeValidated must be set to FALSE");  
+								}   
+							}                            
+						}
+						 [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+							 tc_ac.stop;
+							 setverdict(fail, testcasename() & ": Error while retrieving resource");
+						 }
+						 [] tc_ac.timeout {
+							 setverdict(inconc, testcasename() & ": No answer while retrieving resource");
+						 }
+					 }
+        
+					//Postamble
+					f_cse_postamble_deleteResources();
+    
+					// Tear down
+					f_cf01Down();
+				}
+			} // end group g_CSE_GMG_BV_021
+
+			group g_CSE_GMG_BV_022 {
+				// Test objective: Check that the IUT handles validation of the resource type during an UPDATE of the <group> resource when memberIDs contains a sub-group on a  a previously unreachable Hosting CSE that has become reachable
+				testcase TC_CSE_GMG_BV_022() runs on CseTester system CseSystem
+				{
+					//Local constants
+					const ResourceType c_ResourceTypeGroup := int9;  
+					const ResourceType c_ResourceType1 := int4; 
+					const MemberType   c_memberType1   := int4;     // should be set same type as c_ResourceType1
+					const XSD.String c_primitiveContent := "primitive_contet";
+					const ConsistencyStrategy c_consistentcyStrategy := int1;   // ABANDOND_MEMBER
+//					  const XSD.AnyURI c_targetResourceAddress := "TARGET_RESOURCE_ADDRESS";
+					const XSD.AnyURI c_memberResourceAddress1 := "MEMBER_RESSOURCE_ADDRESS_1";
+					const XSD.AnyURI c_memberResourceAddress2 := "MEMBER_RESSOURCE_ADDRESS_2";
+    
+					// Local variables
+					var MsgIn v_response;
+					var RequestPrimitive v_request;
+					var integer v_aeIndex := -1;
+					var integer v_remoteCSEIndex := -1;
+					var integer v_groupIndex := -1;
+            
+					var template RequestPrimitive v_createRequest := m_createGroupBase;
+					var template RequestPrimitive v_updateRequest := m_updateGroupBase;
+					var template RequestPrimitive v_createMember;
+         
+					// Test control
+        
+					// Test component configuration
+					f_cf01Up();
+    
+					// Test adapter configuration
+        
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
+//					TODO: -> register IUT to the remoteCSE
+					//v_remoteCSEIndex := ...
+        
+					v_createRequest := f_getCreateRequestPrimitive(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
+					v_createRequest.primitiveContent.any_1[0].Group_optional := m_contentCreateGroup(2, {c_memberResourceAddress1, c_memberResourceAddress2}, omit);
+					v_createRequest.primitiveContent.any_1[0].Group_optional.memberType := c_memberType1;
+					v_createRequest.primitiveContent.any_1[0].Group_optional.memberTypeValidated := false;
+					v_createRequest.primitiveContent.any_1[0].Group_optional.consistencyStrategy := c_consistentcyStrategy;
+					v_groupIndex := f_cse_createResource(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
+        
+					// TODO: -> the AE having a subscription to c_targetResourceAddress 
+        
+					// TODO: -> do the resources actually need to be created?
+					// TODO: choose the right template for member resource
+					v_createMember := m_createContentInstance(f_getResourceAddress(v_aeIndex), c_primitiveContent & "_1");
+					f_cse_createResource(c_ResourceType1, v_createMember, v_aeIndex);
+                    
+					// TODO: create resource of type <group> at c_memberResourceAddress2 on remoteCSE
+					// TODO: set onlineStatus to false on remoteCSE
+        
+    
+					//Test Body
+					v_request := f_getUpdateRequestPrimitive(c_ResourceTypeGroup, v_groupIndex, v_updateRequest);
+					//v_request.from_ := CSE-ID
+					v_request.to_ := f_getResourceAddress(v_remoteCSEIndex);
+					//Content set to <remoteCSE> resource containing onlineStatus := false;
+        
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response {
+							tc_ac.stop;
+                            
+                                
+						}
+						 [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+							 tc_ac.stop;
+							 setverdict(fail, testcasename() & ": Error while retrieving resource");
+						 }
+						 [] tc_ac.timeout {
+							 setverdict(inconc, testcasename() & ": No answer while retrieving resource");
+						 }
+					 }
+        
+					//Postamble
+					f_cse_postamble_deleteResources();
+    
+					// Tear down
+					f_cf01Down();
+				}
+			} // end group g_CSE_GMG_BV_022
+            
+		} // end group Group_Managment
+		
+		group Subscription_And_Notification {
+	
+			group g_CSE_SUB_BV_001{
+				testcase TC_CSE_SUB_BV_001_01() runs on CseTester system CseSystem {
+					// Local variables
+					var MsgIn v_response;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+					var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
+					var RequestPrimitive v_request;
+					var CseTester v_notifyHandler;
+					var integer v_ae2Index := -1;
+									
+					// Test control
+
+					// Test component configuration
+					f_cf01Up();
+
+					// Test adapter configuration
+
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred;
+					
+					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
+					
+					v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription resource is created			
+
+					v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_resourceIndex);
+			
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int5203))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": <Subscription> Resource not subscribable");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while subscribing a ressource");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Subsciption successful whereas <Subscription> resource is not subscribable");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while creating resource");
+						}
+					}	
+
+					//Postamble
+					f_cse_postamble_deleteResources();
+
+					//Tear down
+					f_cf01Down();
+
+				} // end TC_CSE_SUB_BV_001_01
+				
+				testcase TC_CSE_SUB_BV_001_02() runs on CseTester system CseSystem {
+					// Local variables
+					var MsgIn v_response;
+					var integer v_aeIndex := -1;
+					var integer v_containerResourceIndex := -1;
+					var integer v_contentInstanceResourceIndex := -1;
+					var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
+					var RequestPrimitive v_request;
+					
+					v_createRequest.primitiveContent.any_1[0].Subscription_optional.resourceName := omit;
+					// Test control
+
+					// Test component configuration
+					f_cf01Up();
+
+					// Test adapter configuration
+
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+
+					v_containerResourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);//Container 				
+
+					v_contentInstanceResourceIndex := f_cse_createResource(int4, m_createContentInstance(f_getResourceAddress(v_aeIndex), "Random Value"), v_containerResourceIndex);//ContentInstance
+
+					v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_contentInstanceResourceIndex);
+
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int5203))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": <Subscription> Resource not subscribable");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while subscribing a ressource");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Subsciption successful whereas <Subscription> resource is not subscribable");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while creating resource");
+						}
+					}
+
+					//Postamble
+					f_cse_postamble_deleteResources();
+
+					//Tear down
+					f_cf01Down();
+
+				} // end TC_CSE_SUB_BV_001_02
+				
+			}//end group g_CSE_SUB_BV_001
+	
+			group g_CSE_SUB_BV_002 {
+				
+				testcase TC_CSE_SUB_BV_002() runs on CseTester system CseSystem {
+					// Local variables
+					var MsgIn v_response;
+					var integer v_aeIndex := -1;
+					var integer v_acpAuxIndex := -1;
+					var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
+					var RequestPrimitive v_request;
+						
+					// Test control
+					if(not(PICS_ACP_SUPPORT)) {
+						setverdict(inconc, testcasename() & ": AccessControlPolicy support is required to run this test case");
+						stop;
+					}
+
+					// Test component configuration
+					f_cf01Up();
+
+					// Test adapter configuration
+
+					// Preamble
+					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int61);//c_CUDNDi)
+						
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);//c_CRDNDi);
+				
+					v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription 
+
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int5105))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": No privilege for subscribing to the resource");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while subscribing a ressource");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Subsciption successful whereas it doesn't have privilege");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while creating resource");
+						}
+					}
+			
+					//Postamble
+					f_cse_postamble_deleteResources();
+
+					//Tear down
+					f_cf01Down();
+
+				} // end TC_CSE_SUB_BV_002
+				
+			}//end group g_CSE_SUB_BV_002
+			
+			group g_CSE_SUB_BV_003 {
+				
+				testcase TC_CSE_SUB_BV_003() runs on CseTester system CseSystem {
+					// Local variables
+					var MsgIn v_response;
+					var integer v_aeIndex := -1;
+					var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
+					var RequestPrimitive v_request;
+			
+					// Test control
+
+					// Test component configuration
+					f_cf01Up();
+
+					// Test adapter configuration
+
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();//c_CUDNDi);		
+					
+					v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription 
+					//v_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {"Not Initialized"};
+					
+					
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int5204))) -> value v_response { //SUBSCRIPTION_VERIFICATION_INITIATION_FAILED
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": OK : Subscription verification initiation failed");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while subscribing a ressource");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Subsciption successful whereas subsciption verification failed");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while creating resource");
+						}
+					}
+
+					//Postamble
+					f_cse_postamble_deleteResources();
+
+					//Tear down
+					f_cf01Down();
+
+				} // end TC_CSE_SUB_BV_003
+	
+			}//end group g_CSE_SUB_BV_003
+			
+			group g_CSE_SUB_BV_004 {
+				
+				testcase TC_CSE_SUB_BV_004() runs on CseTester system CseSystem {
+					// Local variables
+					var MsgIn v_response;
+					var integer v_aeIndex := -1;
+					var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
+					var RequestPrimitive v_request;
+					var CseTester notifyHandler := CseTester.create("NotifyHandler");
+					var integer v_ae2Index := -1;
+						
+					// Test control
+
+					// Test component configuration
+					f_cf01Up();
+										
+					// Test adapter configuration
+
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe(omit,omit);//c_CUDNDi);
+					v_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE_ID_STEM, "MyAe2", {"http://" & PX_TESTER_ADDRESS & "/"}), -1);
+					
+					v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription 
+					v_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {f_getResourceAddress(v_ae2Index)};
+					
+					notifyHandler.start(f_subscriptionVerificationHandler(f_getResourceAddress(v_aeIndex), int4101));
+		
+					mcaPort.send(m_request(v_request));
+					
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int4101))) -> value v_response { //SUBSCRIPTION_CREATOR_HAS_NO_PRIVILEGE 
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": OK : Subscription creator has no privilege");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while subscribing a ressource");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Subsciption successful whereas subsciption creator has no privilege");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while creating resource");
+						}
+					}
+
+					//Postamble
+					f_cse_postamble_deleteResources();
+
+					//Tear down
+					f_cf01Down();
+
+				} // end TC_CSE_SUB_BV_004
+
+			}//end group g_CSE_SUB_BV_004
+			
+			group g_CSE_SUB_BV_005 {
+				
+				testcase TC_CSE_SUB_BV_005() runs on CseTester system CseSystem {
+					// Local variables
+					var MsgIn v_response;
+					var integer v_aeIndex := -1;
+					var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
+					var RequestPrimitive v_request;
+					var CseTester notifyHandler := CseTester.create("NotifyHandler");
+					var integer v_ae2Index := -1;
+						
+					// Test control
+
+					// Test component configuration
+					f_cf01Up();
+										
+					// Test adapter configuration
+
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe(omit,omit);//c_CUDNDi); // set poa to MTC adress
+					v_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE_ID_STEM, "MyAe2", {"http://" & PX_TESTER_ADDRESS & "/"}), -1);
+					
+					v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription 
+					v_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {f_getResourceAddress(v_ae2Index)};
+					
+					notifyHandler.start(f_subscriptionVerificationHandler(f_getResourceAddress(v_aeIndex), int5205));
+		
+					mcaPort.send(m_request(v_request));
+					
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int5205))) -> value v_response { //SUBSCRIPTION_CREATOR_HAS_NO_PRIVILEGE 
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": OK : Subscription creator has no privilege");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while subscribing a ressource");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Subsciption successful whereas subsciption creator has no privilege");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while creating resource");
+						}
+					}
+
+					//Postamble
+					f_cse_postamble_deleteResources();
+
+					//Tear down
+					f_cf01Down();
+
+				} // end TC_CSE_SUB_BV_005
+
+			}//end group g_CSE_SUB_BV_005
+			
+			group g_CSE_SUB_BV_006 {
+				
+				testcase TC_CSE_SUB_BV_006() runs on CseTester system CseSystem {
+					// Local variables
+					var MsgIn v_response;
+					var Labels v_labels_1:= {"VALUE_1"};
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+					var template RequestPrimitive v_createRequest := m_createSubscriptionBase; 
+					var template PrimitiveContent v_contentResponse;
+					var template RequestPrimitive v_updateRequest := m_updateAeBase;
+					var RequestPrimitive v_request;
+					var CseTester v_notifyHandler;
+					var integer v_ae2Index := -1;
+
+					v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1; 
+					v_contentResponse.any_1[0].AE_optional := mw_contentAeBase; // all attributes expected   
+
+					// Test control
+
+					// Test component configuration
+					f_cf01Up();
+
+					// Test adapter configuration
+
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+					
+					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
+					
+					v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription
+
+					v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request
+					
+					if(v_notifyHandler.running) {
+						v_notifyHandler.stop;
+					};
+					
+					// Test Body
+					v_notifyHandler.start(f_cse_notifyProcedure(v_contentResponse)); // check if the notification is well received and if its content matchs
+					
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": Attribute of resource type int2 (Ae) updated successfully");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while updating resource type int2 (Ae)");
+						}
+						[] mcaPort.receive{
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error, unexpected message received");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while updating resource type int2 (Ae)");
+						}
+					};
+					
+					f_is_component_done(v_notifyHandler);
+
+					//Postamble
+					f_cse_postamble_deleteResources();
+
+					//Tear down
+					f_cf01Down();
+
+				} // end TC_CSE_SUB_BV_006
+
+			}//end group g_CSE_SUB_BV_006
+
+			group g_CSE_SUB_BV_007{
+				
+				testcase TC_CSE_SUB_BV_007() runs on CseTester system CseSystem {
+					
+					// Local variables
+					var MsgIn v_response;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+					var template RequestPrimitive v_createRequest := omit; 
+					var template PrimitiveContent v_contentResponse;
+					var RequestPrimitive v_request;
+					var CseTester v_notifyHandler;
+					var integer v_ae2Index := -1;
+			
+					v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc1; // all attributes expected   
+					// Test control
+
+					// Test component configuration
+					f_cf01Up();
+
+					// Test adapter configuration
+
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+					
+					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
+
+					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int3}, -)); // TODO this field is initialised 2 time with parent adress resource (here and in f_cse_createResource)
+					
+					v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription 				
+					
+					v_request:= f_getCreateRequestPrimitive(int3, m_createContainerBase, v_aeIndex);
+					
+					f_is_component_done(v_notifyHandler);
+
+					// Test Body
+					v_notifyHandler.start(f_cse_notifyProcedure(v_contentResponse)); // check if the notification is well received and if its content matchs
+					
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": Resource type int3 (Container) created successfully");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while creating resource type int3 (Container)");
+						}
+						[] mcaPort.receive{
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error, unexpected message received");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while creating resource type int3 (Container)");
+						}
+					}
+    							
+					//Postamble
+					f_cse_postamble_deleteResources();
+
+					//Tear down
+					f_cf01Down();
+				} // end TC_CSE_SUB_BV_007
+				
+			}//end group g_CSE_SUB_BV_007
+			
+			group g_CSE_SUB_BV_008 {
+				
+				testcase TC_CSE_SUB_BV_008() runs on CseTester system CseSystem {
+					// Local variables
+					var MsgIn v_response;
+					var integer v_aeIndex := -1;
+					var integer v_subscriptionResourceIndex := -1;
+					var template RequestPrimitive v_createRequest := omit; 
+					var template PrimitiveContent v_contentResponse;
+					var RequestPrimitive v_deleteRequest;
+					var CseTester v_notifyHandler;
+					var integer v_ae2Index := -1;
+					
+					v_contentResponse.any_1[0].AE_optional := mw_contentAeBase; // all attributes expected       
+
+					// Test control
+
+					// Test component configuration
+					f_cf01Up();
+
+					// Test adapter configuration
+
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+					
+					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
+								
+					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int2}, -));
+					
+					v_subscriptionResourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex );//Subscription
+
+					v_deleteRequest:= valueof(m_deleteRequest(f_getResourceAddress(v_aeIndex))); // Ae delete request
+					
+					f_is_component_done(v_notifyHandler);
+
+					//Test Body
+					v_notifyHandler.start(f_CSE_SUB_BV_008(v_contentResponse)); // check if the notification is well received and if its content matchs
+					
+					mcaPort.send(m_request(v_deleteRequest));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": resource type int2 (AE) deleted successfully");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while deleting resource type int2 (AE)");
+						}
+						[] mcaPort.receive{
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error, unexpected message received");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while deleting resource type int2 (AE)");
+						}
+					}
+
+					//Postamble
+					f_cse_postamble_deleteResources();
+
+					//Tear down
+					f_cf01Down();
+
+				} // end TC_CSE_SUB_BV_008
+				
+				function f_CSE_SUB_BV_008( template PrimitiveContent p_primitiveContent) runs on CseTester {
+					var MsgIn v_response;
+
+					map(self:mcaPort, system:mcaPort);
+					map(self:acPort, system:acPort);
+					
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_request(mw_notify(mw_contentNotification(?)))) -> value v_response {
+							tc_ac.stop;
+							if(not(match(v_response.primitive.requestPrimitive.primitiveContent.any_1[0].Notification.subscriptionDeletion, true))) {
+								setverdict(fail, testcasename() & ": subscriptionDeletion attribute have to be set to TRUE");
+							}
+							if(f_check_notificationContent(v_response.primitive.requestPrimitive, p_primitiveContent)){
+								setverdict(pass, testcasename() & ": Notification received");
+							}
+							else{
+								setverdict(fail, testcasename() & ": Notification received but the content doesn't match");
+							}
+						}
+						[] mcaPort.receive{
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error, unexpected message received");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No notification received");
+						}
+					}
+					
+					mcaPort.send(m_response(valueof(m_responseNotification(int2001))));
+
+					unmap(self:mcaPort, system:mcaPort);
+					unmap(self:acPort, system:acPort);  
+
+				} //end f_CSE_SUB_BV_008
+	
+			}//end group g_CSE_SUB_BV_008
+	
+			group g_CSE_SUB_BV_009 {
+				
+				testcase TC_CSE_SUB_BV_009() runs on CseTester system CseSystem {
+					// Local variables
+					var MsgIn v_response;
+					var integer v_aeIndex := -1;
+					var integer v_subscriptionResourceIndex := -1;
+					var integer v_containerResourceIndex := -1;
+					var template RequestPrimitive v_createRequest := omit;
+					var RequestPrimitive v_deleteRequest;
+					var template PrimitiveContent v_contentResponse;
+					var CseTester v_notifyHandler;
+					var integer v_ae2Index := -1;
+
+					v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc1; // all attributes expected in notification  
+
+					// Test component configuration
+					f_cf01Up();
+
+					// Test adapter configuration
+
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi;
+					v_containerResourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);//Container
+					
+					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
+
+					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int4}, -));
+					
+					v_subscriptionResourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription (with name attribute omitted) 				
+
+					v_deleteRequest := valueof(m_deleteRequest(f_getResourceAddress(v_containerResourceIndex)));// Container deletion request
+					
+					f_is_component_done(v_notifyHandler);
+
+					//Test Body
+					v_notifyHandler.start(f_cse_notifyProcedure(v_contentResponse)); // check if the notification is well received and if its content matchs
+					
+					mcaPort.send(m_request(v_deleteRequest));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": Container resource deleted successfuly");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while deleting resource type int3 (Container)");
+						}
+						[] mcaPort.receive{
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error, unexpected message received");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while deleting resource type int3 (Container)");
+						}
+					}	
+
+					//Postamble
+					f_cse_postamble_deleteResources();
+
+					//Tear down
+					f_cf01Down();
+
+				} // end TC_CSE_SUB_BV_009
+				
+			}//end group g_CSE_SUB_BV_009
+	
+			group g_CSE_SUB_BV_010 {
+				
+				testcase TC_CSE_SUB_BV_010() runs on CseTester system CseSystem {
+					
+				} // end TC_CSE_SUB_BV_010
+
+			}//end group g_CSE_SUB_BV_010
+			
+			group g_CSE_SUB_BV_011 {
+				
+				testcase TC_CSE_SUB_BV_011() runs on CseTester system CseSystem {
+					// Local variables
+					var MsgIn v_response;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+					var Labels v_labels_1:= {"VALUE_1"};
+					var template PrimitiveContent v_contentResponse;
+					var template RequestPrimitive v_createRequest := omit;
+					var template RequestPrimitive v_updateRequest := m_updateAeBase;
+					var RequestPrimitive v_request;
+					var CseTester v_notifyHandler;
+					var integer v_ae2Index := -1;
+			
+					v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1; 
+					v_contentResponse.any_1[0].AE_optional := mw_contentAe_allOmit; // only modified attribute expected  
+					v_contentResponse.any_1[0].AE_optional.labels := ?;
+			
+					// Test control
+
+					// Test component configuration
+					f_cf01Up();
+
+					// Test adapter configuration
+
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+					
+					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
+					
+					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, omit, omit, omit, omit, omit, int2); //notificationContentType ="modified attributes"
+					
+					v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex); //Subscription
+			
+					v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest);
+			
+					f_is_component_done(v_notifyHandler);
+			
+					// Test Body
+					v_notifyHandler.start(f_cse_notifyProcedure(v_contentResponse)); // check if the notification is well received and if its content matchs
+					
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": Attribute of resource type int2 (Ae) updated successfuly");
+						}
+						
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while updating resource type int2 (Ae)");
+						}
+						[] mcaPort.receive{
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error, unexpected message received");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while updating resource type int2 (Ae)");
+						}
+					}	
+
+					//Postamble
+					f_cse_postamble_deleteResources();
+
+					//Tear down
+					f_cf01Down();
+
+				} // end TC_CSE_SUB_BV_011
+			}//end group g_CSE_SUB_BV_011
+	
+			group g_CSE_SUB_BV_012 {
+				
+				testcase TC_CSE_SUB_BV_012() runs on CseTester system CseSystem {
+					// Local variables
+					var MsgIn v_response;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+					var Labels v_labels_1:= {"VALUE_1"};
+					var template RequestPrimitive v_createRequest := omit;
+					var template PrimitiveContent v_contentResponse;
+					var template RequestPrimitive v_updateRequest := m_updateAeBase;
+					var RequestPrimitive v_request;
+					var CseTester v_notifyHandler;
+					var integer v_ae2Index := -1;
+					
+					v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1; 
+					v_contentResponse.any_1[0].AE_optional := mw_contentAe_allOmit; // only modified attribute expected  
+					v_contentResponse.any_1[0].AE_optional.resourceID := ?;
+
+					// Test control
+
+					// Test component configuration
+					f_cf01Up();
+
+					// Test adapter configuration
+
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+					
+					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
+					
+					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, omit, omit, omit, omit, omit, int3); // notificationContentType ="ResourceID"
+					
+					v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription
+
+					v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest);
+
+					f_is_component_done(v_notifyHandler);
+			
+					// Test Body
+					v_notifyHandler.start(f_cse_notifyProcedure(v_contentResponse)); // check if the notification is well received and if its content matchs
+					
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": Attribute of resource type int2 (Ae) updated successfuly");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while updating resource type int2 (Ae)");
+						}
+						[] mcaPort.receive{
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error, unexpected message received");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while updating resource type int2 (Ae) or None notification received");
+						}
+					}	
+
+					//Postamble
+					f_cse_postamble_deleteResources();
+
+					//Tear down
+					f_cf01Down();
+
+				} // end TC_CSE_SUB_BV_012
+			}//end group g_CSE_SUB_BV_012
+	
+			group g_CSE_SUB_BV_013 {
+				testcase TC_CSE_SUB_BV_013() runs on CseTester system CseSystem {
+					// Local variables
+					var MsgIn v_response;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+					var Labels v_labels_1:= {"VALUE_1"};
+					var template PrimitiveContent v_contentResponse;
+					var template RequestPrimitive v_createRequest := omit;
+					var template RequestPrimitive v_updateRequest := m_updateAeBase;
+					var RequestPrimitive v_request;
+					var template PrimitiveContent v_retrieveContentResponse;
+					var CseTester v_notifyHandler;
+					var integer v_ae2Index := -1;
+
+					v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1; 
+					v_contentResponse.any_1[0].AE_optional := mw_contentAeBase; // all attributes expected  
+					v_retrieveContentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc1;
+
+					// Test control
+
+					// Test component configuration
+					f_cf01Up();
+
+					// Test adapter configuration
+
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+					
+					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
+					
+					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, omit, 3);  //expirationCounter set to 3
+					
+					v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex); // Subscription
+					
+					f_is_component_done(v_notifyHandler);
+					
+					// Test Body
+					v_notifyHandler.start(f_cse_notifyProcedure(v_contentResponse)); // check if the notification is well received and if its content matchs
+
+					v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // AE update request
+					f_cse_updateResource(v_request); // AE update
+					
+					//TODO See if we keep this f_is_component_done, it assure that the retrieve operation is executed after having sent and received the Notification
+					f_is_component_done(v_notifyHandler);
+					
+					mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))));
+	
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_retrieveContentResponse))) -> value v_response {
+							tc_ac.stop;
+							if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Subscription_optional.expirationCounter == 2 ){
+								setverdict(pass, testcasename() & ": expirationCounter has been successfully decreased by one");
+							}
+							else{
+								setverdict(fail, testcasename() & ": Error expirationCounter hasn't been decreased by one");
+							}
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error, resource elements provided not matching expected resource elements");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while retrieving resource");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
+						}
+					}
+
+					//Postamble
+					f_cse_postamble_deleteResources();
+
+					//Tear down
+					f_cf01Down();
+
+				} // end TC_CSE_SUB_BV_013
+				
+			}//end group g_CSE_SUB_BV_013
+				
+			group g_CSE_SUB_BV_014 {
+		
+				testcase TC_CSE_SUB_BV_014() runs on CseTester system CseSystem {
+					// Local variables
+					var MsgIn v_response;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+					var Labels v_labels_1:= {"VALUE_1"};
+					var template PrimitiveContent v_contentResponse;
+					var template RequestPrimitive v_createRequest := omit;
+					var template RequestPrimitive v_updateRequest := m_updateAeBase;
+					var RequestPrimitive v_request;
+					var CseTester v_notifyHandler;
+					var integer v_ae2Index := -1;
+					
+					v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1; 
+					v_contentResponse.any_1[0].AE_optional := mw_contentAeBase; // all attributes expected  
+
+					// Test control
+
+					// Test component configuration
+					f_cf01Up();
+
+					// Test adapter configuration
+
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+					
+					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
+					
+					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, omit, 1);  //expirationCounter set to 1
+					
+					v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);// Subscription
+
+					f_is_component_done(v_notifyHandler);
+	
+					// Test Body
+					
+					v_notifyHandler.start(f_cse_notifyProcedure(v_contentResponse)); // check if the notification is well received and if its content matchs
+
+					v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // AE update request
+					f_cse_updateResource(v_request); // AE update
+					
+					//TODO See if we keep this f_is_component_done, it assure that the retrieve operation is executed after having sent and received the Notification
+					f_is_component_done(v_notifyHandler);
+
+					mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))));
+
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": Subscription Resource have been successfully deleted");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while retrieving Subscription Resource");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error Subscription Resource has not been deleted");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while retrieving Subscription Resource");
+						}
+					}
+
+					//Postamble
+					f_cse_postamble_deleteResources();
+
+					//Tear down
+					f_cf01Down();
+
+				} // end TC_CSE_SUB_BV_014
+				
+			}//end of group g_CSE_SUB_BV_014
+	
+			group g_CSE_SUB_BV_015 {
+				
+				testcase TC_CSE_SUB_BV_015() runs on CseTester system CseSystem {
+					// Local variables
+					var MsgIn v_response;
+					var Labels v_labels_1:= {"VALUE_1"};
+					var AttributeList_1 v_attributeList := {"labels"};
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+					var template RequestPrimitive v_createRequest := omit;
+					var template PrimitiveContent v_contentResponse;
+					var template RequestPrimitive v_updateRequest := m_updateAeBase;
+					var RequestPrimitive v_request;
+					var CseTester v_notifyHandler;
+					var integer v_ae2Index := -1;
+					
+					v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1; 
+					v_contentResponse.any_1[0].AE_optional := mw_contentAeBase; // all attributes expected   
+
+					// Test control
+
+					// Test component configuration
+					f_cf01Up();
+
+					// Test adapter configuration
+
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+					
+					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
+					
+					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int1}, v_attributeList));
+
+					v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription
+
+					v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request
+					
+					f_is_component_done(v_notifyHandler);
+			
+					// Test Body
+					v_notifyHandler.start(f_cse_notifyProcedure(v_contentResponse)); // check if the notification is well received and if its content matchs
+					
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": Attribute of resource type int2 (Ae) updated successfuly");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while updating resource type int2 (Ae)");
+						}
+						[] mcaPort.receive{
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error, unexpected message received");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while updating resource type int2 (Ae) or None notification received");
+						}
+					}	
+
+					//Postamble
+					f_cse_postamble_deleteResources();
+
+					//Tear down
+					f_cf01Down();
+
+				} // end TC_CSE_SUB_BV_015
+	
+			}//end group g_CSE_SUB_BV_015
+	
+			group g_CSE_SUB_BV_016 {
+				
+				testcase TC_CSE_SUB_BV_016() runs on CseTester system CseSystem {
+					// Local variables
+					var MsgIn v_response;
+					var Labels v_labels_1:= {"VALUE_1"};
+					var AttributeList_1 v_attributeList := {"appName"};
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+					var template RequestPrimitive v_createRequest := omit;
+					var template RequestPrimitive v_updateRequest := m_updateAeBase;
+					var RequestPrimitive v_request;
+					var CseTester v_notifyHandler;
+					var integer v_ae2Index := -1;
+
+					v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1;
+
+					// Test control
+
+					// Test component configuration
+					f_cf01Up();
+
+					// Test adapter configuration
+
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+					
+					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
+					
+					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int1}, v_attributeList));
+
+					v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription
+
+					v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request
+
+					f_is_component_done(v_notifyHandler);
+
+					// Test Body
+					v_notifyHandler.start(f_CSE_SUB_BV_016()); // check that no notification is received
+		
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": Attribute of resource type int2 (Ae) updated successfuly");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while updating resource type int2 (Ae)");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while updating resource type int2 (Ae) or None notification received");
+						}
+					}	
+
+					//Postamble
+					f_cse_postamble_deleteResources();
+
+					//Tear down
+					f_cf01Down();
+
+				} // end TC_CSE_SUB_BV_016
+				
+				function f_CSE_SUB_BV_016() runs on CseTester {
+					// Local variables
+					var MsgIn v_response;
+
+					map(self:mcaPort, system:mcaPort);
+					map(self:acPort, system:acPort);
+	
+					tc_ac.start(10.0);
+					alt {
+						[] mcaPort.receive{
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error, Notification isn't expected ");
+						}
+						[] tc_ac.timeout {
+							setverdict(pass, testcasename() & ": No notification received");
+						}
+					}
+
+					unmap(self:mcaPort, system:mcaPort);
+					unmap(self:acPort, system:acPort); 
+
+				} //end f_CSE_SUB_BV_016
+
+			}//end group g_CSE_SUB_BV_016
+	
+			group g_CSE_SUB_BV_017{
+				testcase TC_CSE_SUB_BV_017() runs on CseTester system CseSystem {
+					// Local variables
+					var MsgIn v_response;
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+					var template RequestPrimitive v_createRequest := omit;
+					var RequestPrimitive v_request;
+					var CseTester v_notifyHandler;
+					var integer v_ae2Index := -1;
+					
+					// Test control
+
+					// Test component configuration
+					f_cf01Up();
+
+					// Test adapter configuration
+
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+					
+					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
+					
+					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, omit, omit, omit, omit,f_getResourceAddress(v_ae2Index)); // SubscriberURI ="ResourceID"
+	
+					v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex); // Subsciption
+					
+					v_request := valueof(m_deleteRequest(f_getResourceAddress(v_resourceIndex))); // Subscription resource deletion request
+					
+					f_is_component_done(v_notifyHandler);
+
+					// Test Body
+					v_notifyHandler.start(f_CSE_SUB_BV_017(f_getResourceAddress(v_resourceIndex))); // check that no notification is received
+					
+					mcaPort.send(m_request(v_request));
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": Subscription resource deleted successfuly");
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while deleting resource type int23 (Subscription)");
+						}
+						[] mcaPort.receive{
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error, unexpected message received");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while deleting resource type int23 (Subscription)");
+						}
+					}	
+
+					//Postamble
+					f_cse_postamble_deleteResources();
+
+					//Tear down
+					f_cf01Down();
+
+				} // end TC_CSE_SUB_BV_017
+				
+				function f_CSE_SUB_BV_017(in XSD.AnyURI p_subscriptionReference) runs on CseTester {
+					// Local variables
+					var MsgIn v_response;
+					var template Notification v_notificationRequest := mw_contentNotificationBase;
+        			
+					v_notificationRequest.subscriptionDeletion := true;
+					v_notificationRequest.subscriptionReference := p_subscriptionReference;
+        			
+        
+					map(self:mcaPort, system:mcaPort);
+					map(self:acPort, system:acPort);
+        
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_request(mw_notify(v_notificationRequest))) -> value v_response {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": Notification received");
+						}
+						[] mcaPort.receive{
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error, unexpected message received");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No notification received");
+						}
+					}
+        
+					unmap(self:mcaPort, system:mcaPort);
+					unmap(self:acPort, system:acPort); 
+        
+				} //end f_CSE_SUB_BV_017
+				
+				
+			}//end group g_CSE_SUB_BV_017
+			
+			group g_CSE_SUB_BV_018 {
+				
+				testcase TC_CSE_SUB_BV_018() runs on CseTester system CseSystem {
+					// Local variables
+					const integer numberOfAggregatedNotification := 3;
+					var MsgIn v_response;
+					var Labels v_labels_1:= {"VALUE_1"};
+					var Labels v_labels_2:= {"VALUE_2"};
+					var Labels v_labels_3:= {"VALUE_3"};
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+					var template RequestPrimitive v_createRequest := omit;
+					var template PrimitiveContent v_contentResponse;
+					var template RequestPrimitive v_updateRequest := m_updateAeBase;
+					var RequestPrimitive v_request;
+					var CseTester v_notifyHandler;
+					var integer v_ae2Index := -1;
+					
+					v_contentResponse.any_1[0].AE_optional := mw_contentAeBase; // all attributes expected   
+
+					// Test control
+
+					// Test component configuration
+					f_cf01Up();
+
+					// Test adapter configuration
+
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+					
+					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
+					
+					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)},omit,omit,m_batchNotifyNumber3Duration1(numberOfAggregatedNotification));// TODO fix the duration
+
+					v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription
+					
+					f_is_component_done(v_notifyHandler);
+
+					// Test Body
+					v_notifyHandler.start(f_CSE_SUB_BV_018(v_contentResponse, numberOfAggregatedNotification)); // check that no notification is received
+					
+					v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1;
+					v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 1
+					f_cse_updateResource(v_request);
+					
+					v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_2; 
+					v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 2
+					f_cse_updateResource(v_request);
+					
+					v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_3; 
+					v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 3
+					f_cse_updateResource(v_request);
+
+					//Postamble
+					f_cse_postamble_deleteResources();
+
+					//Tear down
+					f_cf01Down();
+
+				} // end TC_CSE_SUB_BV_018
+				
+				function f_CSE_SUB_BV_018(template PrimitiveContent p_primitiveContent,in integer p_numberOfAggregatedNotification) runs on CseTester {
+					// Local variables
+					var MsgIn v_response;
+    
+					map(self:mcaPort, system:mcaPort);
+					map(self:acPort, system:acPort);
+    
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_request(mw_aggregatedNotifyBase)) -> value v_response {
+							tc_ac.stop;
+							if(p_numberOfAggregatedNotification == lengthof(v_response.primitive.requestPrimitive.primitiveContent.any_1[0].AggregatedNotification.notification_list)){
+								if(f_check_notificationContent(v_response.primitive.requestPrimitive, p_primitiveContent)){
+									setverdict(pass, testcasename() & ": Notification received");
+								}
+								else{
+									setverdict(fail, testcasename() & ": Notification received but the content doesn't match");
+								}
+							}
+							else {
+								setverdict(fail, testcasename() & ": Number of Notification in Aggregatednotification isn't right");
+							}
+						}
+						[] mcaPort.receive{
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error, unexpected message received");
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No notification received");
+						}
+					}
+    	
+					unmap(self:mcaPort, system:mcaPort);
+					unmap(self:acPort, system:acPort); 
+    
+				} //end f_CSE_SUB_BV_018
+	
+			}//end group g_CSE_SUB_BV_018
+			
+			group g_CSE_SUB_BV_019 {
+				
+				testcase TC_CSE_SUB_BV_019() runs on CseTester system CseSystem {
+					// Local variables
+					const integer numberOfAggregatedNotification := 3;
+					var MsgIn v_response;
+					var Labels v_labels_1:= {"VALUE_1"};
+					var Labels v_labels_2:= {"VALUE_2"};
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+					var template RequestPrimitive v_createRequest := omit;
+					var template PrimitiveContent v_contentResponse;
+					var template RequestPrimitive v_updateRequest := m_updateAeBase;
+					var RequestPrimitive v_request;
+					var CseTester v_notifyHandler;
+					var integer v_ae2Index := -1;
+					
+					v_contentResponse.any_1[0].AE_optional := mw_contentAeBase; // all attributes expected   
+
+					// Test control
+
+					// Test component configuration
+					f_cf01Up();
+
+					// Test adapter configuration
+
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+					
+					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
+					
+					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)},omit,omit,m_batchNotifyNumber3Duration1(numberOfAggregatedNotification));// TODO fix the duration
+
+					v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription
+					
+					f_is_component_done(v_notifyHandler);
+
+					// Test Body
+					v_notifyHandler.start(f_CSE_SUB_BV_018(v_contentResponse, 2)); // check that no notification is received
+
+					v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1;
+					v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 1
+					f_cse_updateResource(v_request);
+					
+					v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_2; 
+					v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 2
+					f_cse_updateResource(v_request);
+
+					//Postamble
+					f_cse_postamble_deleteResources();
+
+					//Tear down
+					f_cf01Down();
+    
+				} // end TC_CSE_SUB_BV_019
+    
+			}//end group g_CSE_SUB_BV_019
+    		
+			group g_CSE_SUB_BV_020 {
+				
+				testcase TC_CSE_SUB_BV_020() runs on CseTester system CseSystem {
+					// Local variables
+					const integer numberOfAggregatedNotification := 3;
+					var MsgIn v_response;
+					var Labels v_labels_1:= {"VALUE_1"};
+					var Labels v_labels_2:= {"VALUE_2"};
+					var Labels v_labels_3:= {"VALUE_3"};
+					var integer v_aeIndex := -1;
+					var integer v_resourceIndex := -1;
+					var template RequestPrimitive v_createRequest := omit;
+					var template PrimitiveContent v_contentResponse;
+					var template RequestPrimitive v_updateRequest := m_updateAeBase;
+					var RequestPrimitive v_request;
+					var CseTester v_notifyHandler;
+					var integer v_ae2Index := -1;
+            
+					v_contentResponse.any_1[0].AE_optional := mw_contentAeBase; // all attributes expected   
+            
+					// Test control
+            
+					// Test component configuration
+					f_cf01Up();
+            
+					// Test adapter configuration
+            
+					// Preamble
+					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+					
+					f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
+						
+					v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)},omit,omit,m_batchNotifyNumber3Duration1(numberOfAggregatedNotification), true);// TODO fix the duration
+            		
+					//TODO We Need to check if the IUT send a notification only for the latest update operation
+					// like we match a Notification we have to verify if it is the first (unvalid behavior) or the last (valid behavior)
+					// maybe we need to synchronise our components
+            		
+					v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription
+            					
+					f_is_component_done(v_notifyHandler);
+					
+					// Test Body
+					v_notifyHandler.start(f_cse_notifyProcedure(v_contentResponse)); // check if the notification is well received and if its content matchs
+            					
+					v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1; 
+					v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 1
+					f_cse_updateResource(v_request);
+            					
+					v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_2; 
+					v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 2
+					f_cse_updateResource(v_request);
+            					
+					v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_3; 
+					v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 3
+					f_cse_updateResource(v_request);
+					
+					//Postamble
+					f_cse_postamble_deleteResources();
+            
+					//Tear down
+					f_cf01Down();
+            
+				} // end TC_CSE_SUB_BV_020
+            	
+			}//end group g_CSE_SUB_BV_020
+	
+		}//end group Subscription_And_Notification
+		
+		group Security {
+	
+			group Access_Control_Policy {
+			
+				group g_CSE_SEC_ACP_BV_001 {
+	
+					testcase TC_CSE_SEC_ACP_BV_001() runs on CseTester system CseSystem {
+						// Local variables
+						var MsgIn v_response;
+						var integer v_aeIndex := -1;
+						var integer v_acpIndex := -1;
+						var template PrimitiveContent v_contentResponse;
+						var RequestPrimitive v_createRequest := valueof(m_createAcpBase);
+						var AccessControlRule v_accessControlRule_1 := valueof(m_createAcr({PX_SUPER_USER}, int63));
+						var AccessControlRule v_accessControlRule_2 := valueof(m_createAcr({"wait"}, int55));
+						// Test control
+
+						// Test component configuration
+						f_cf01Up();
+
+						// Test adapter configuration
+
+						// Preamble
+						v_aeIndex := f_cse_preamble_registerAe(-, -); // Only use for setting the ACR_2's accessControlOriginators attribute to AE_ID
+
+						v_createRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges.accessControlRule_list := {v_accessControlRule_1,v_accessControlRule_2};
+						v_createRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges.accessControlRule_list[1].accessControlOriginators := {f_getOriginator(v_aeIndex)};
+
+						v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc1;
+						v_contentResponse.any_1[0].AccessControlPolicy_optional.privileges.accessControlRule_list := {v_accessControlRule_1,v_accessControlRule_2};
+						v_contentResponse.any_1[0].AccessControlPolicy_optional.privileges.accessControlRule_list[1].accessControlOriginators := {f_getOriginator(v_aeIndex)};
+
+						// Test Body
+						v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource
+						
+						mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_acpIndex), f_getOriginator(v_acpIndex))));
+
+						tc_ac.start;
+						alt {
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response {
+								tc_ac.stop;
+								setverdict(pass, testcasename() & ": Response OK for retrieving");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error, resource elements provided not matching expected resource elements");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error while retrieving resource");
+							}
+							[] tc_ac.timeout {
+								setverdict(inconc, testcasename() & ": No answer while retrieving resource");
+							}
+						}
+
+						//Postamble
+						f_cse_postamble_deleteResources();
+
+						//Tear down
+						f_cf01Down();
+
+					}//end TC_CSE_SEC_ACP_BV_001
+						
+				}//end g_CSE_SEC_ACP_BV_001
+				
+				group g_CSE_SEC_ACP_BV_002 {
+	
+					testcase TC_CSE_SEC_ACP_BV_002() runs on CseTester system CseSystem {
+						// Local variables
+						var MsgIn v_response;
+						var integer v_aeIndex := -1;
+						var integer v_acpIndex := -1;
+						var template PrimitiveContent v_contentResponse;
+						var RequestPrimitive v_createRequest := valueof(m_createAcpBase);
+						var AccessControlRule v_accessControlRule_1 := valueof(m_createAcr({PX_SUPER_USER}, int63));
+						var AccessControlRule v_accessControlRule_2 := valueof(m_createAcr({"wait"}, int55));
+						// Test control
+
+						// Test component configuration
+						f_cf01Up();
+
+						// Test adapter configuration
+
+						// Preamble
+						v_aeIndex := f_cse_preamble_registerAe(-, -); // Only use for setting the ACR_2's accessControlOriginators attribute to AE_ID
+
+						v_createRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.selfPrivileges.accessControlRule_list := {v_accessControlRule_1,v_accessControlRule_2};
+						v_createRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.selfPrivileges.accessControlRule_list[1].accessControlOriginators := {f_getOriginator(v_aeIndex)};
+
+						v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc1;
+						v_contentResponse.any_1[0].AccessControlPolicy_optional.selfPrivileges.accessControlRule_list := {v_accessControlRule_1,v_accessControlRule_2};
+						v_contentResponse.any_1[0].AccessControlPolicy_optional.selfPrivileges.accessControlRule_list[1].accessControlOriginators := {f_getOriginator(v_aeIndex)};
+
+						// Test Body
+						v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource
+						
+						mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_acpIndex), f_getOriginator(v_acpIndex))));
+
+						tc_ac.start;
+						alt {
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response {
+								tc_ac.stop;
+								setverdict(pass, testcasename() & ": Response OK for retrieving");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error, resource elements provided not matching expected resource elements");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error while retrieving resource");
+							}
+							[] tc_ac.timeout {
+								setverdict(inconc, testcasename() & ": No answer while retrieving resource");
+							}
+						}
+
+						//Postamble
+						f_cse_postamble_deleteResources();
+
+						//Tear down
+						f_cf01Down();
+
+					}//end TC_CSE_SEC_ACP_BV_002
+		
+				}//end g_CSE_SEC_ACP_BV_002
+				
+				group g_CSE_SEC_ACP_BV_003 {
+					
+					testcase TC_CSE_SEC_ACP_BV_003_01() runs on CseTester system CseSystem { //Create
+						f_CSE_SEC_ACP_BV_003(m_createContainerBase);	
+					}//end TC_CSE_SEC_ACP_BV_003_01
+					
+					testcase TC_CSE_SEC_ACP_BV_003_02() runs on CseTester system CseSystem { //Update
+						var template RequestPrimitive v_updateRequest := m_updateAeBase;
+						var Labels v_labels_1:= {"VALUE_1"};
+						v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1;
+						f_CSE_SEC_ACP_BV_003(v_updateRequest);	
+					}//end TC_CSE_SEC_ACP_BV_003_02
+					
+					testcase TC_CSE_SEC_ACP_BV_003_03() runs on CseTester system CseSystem { //Retrieve
+						f_CSE_SEC_ACP_BV_003(m_retrieveResource("Temporary", "Temporary"));	
+					}//end TC_CSE_SEC_ACP_BV_003_03
+					
+					testcase TC_CSE_SEC_ACP_BV_003_04() runs on CseTester system CseSystem { //Delete
+						f_CSE_SEC_ACP_BV_003(m_deleteRequest("Temporary"));	
+					}//end TC_CSE_SEC_ACP_BV_003_04
+	
+					function f_CSE_SEC_ACP_BV_003(template RequestPrimitive p_requestPrimitive) runs on CseTester{
+						// Local variables
+						var MsgIn v_response;
+						var integer v_aeIndex := -1;
+						var integer v_acpIndex := -1;
+						var RequestPrimitive v_createRequest;
+						var AccessControlRule v_accessControlRule_1;
+						var RequestPrimitive v_updateRequest;
+						var SetOfAcrs v_setOfArcs;
+						
+						// Test control
+
+						// Test component configuration
+						f_cf01Up();
+
+						// Test adapter configuration
+
+						// Preamble
+						v_createRequest := valueof(m_createAcp(f_getResourceAddress(), c_defaultResourceName, {"testDomain"}));
+						v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource
+						
+						v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -);
+						
+						// Test Body
+						p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex);
+						p_requestPrimitive.from_ := "testDomain";
+						
+						mcaPort.send(m_request(valueof(p_requestPrimitive)));
+						tc_ac.start;
+						alt {
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+								tc_ac.stop;
+								setverdict(pass, testcasename() & ": Successful operation on resource type int2 (Ae)");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error while operation on resource type int2 (Ae)");
+							}
+							[] mcaPort.receive{
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error, unexpected message received");
+							}
+							[] tc_ac.timeout {
+								setverdict(inconc, testcasename() & ": No answer while executing operation on resource type int2 (Ae)");
+							}
+						}
+
+						//Postamble
+						v_accessControlRule_1 := valueof(m_createAcr({"*"}, int63));
+						v_setOfArcs.accessControlRule_list := {v_accessControlRule_1};
+						v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, v_setOfArcs));
+						v_updateRequest := f_getUpdateRequestPrimitive(int1, v_acpIndex, v_updateRequest);
+						v_updateRequest.from_ := "testDomain";
+						mcaPort.send(m_request(v_updateRequest));
+						tc_ac.start;
+						alt {
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+								tc_ac.stop;
+								log(testcasename() & ": Attribute of resource type ACP updated successfuly");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+								tc_ac.stop;
+								log(testcasename() & ": Error while updating resource type ACP");
+							}
+							[] tc_ac.timeout {
+								log(testcasename() & ": No answer while updating resource type ACP");
+							}
+						}
+						
+						f_cse_postamble_deleteResources();
+
+						//Tear down
+						f_cf01Down();
+
+					}//end f_CSE_SEC_ACP_BV_003
+		
+				}//end g_CSE_SEC_ACP_BV_003
+				
+				group g_CSE_SEC_ACP_BV_004 {
+					
+					testcase TC_CSE_SEC_ACP_BV_004_01() runs on CseTester system CseSystem { //Create
+						f_CSE_SEC_ACP_BV_004(m_createContainerBase);	
+					}//end TC_CSE_SEC_ACP_BV_004_01
+	
+					testcase TC_CSE_SEC_ACP_BV_004_02() runs on CseTester system CseSystem { //Update
+						var template RequestPrimitive v_updateRequest := m_updateAeBase;
+						var Labels v_labels_1:= {"VALUE_1"};
+						v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1;
+						f_CSE_SEC_ACP_BV_004(v_updateRequest);	
+					}//end TC_CSE_SEC_ACP_BV_004_02
+	
+					testcase TC_CSE_SEC_ACP_BV_004_03() runs on CseTester system CseSystem { //Retrieve
+						f_CSE_SEC_ACP_BV_004(m_retrieveResource("Temporary", "Temporary"));	
+					}//end TC_CSE_SEC_ACP_BV_004_03
+	
+					testcase TC_CSE_SEC_ACP_BV_004_04() runs on CseTester system CseSystem { //Delete
+						f_CSE_SEC_ACP_BV_004(m_deleteRequest("Temporary"));	
+					}//end TC_CSE_SEC_ACP_BV_004_04
+
+					function f_CSE_SEC_ACP_BV_004(template RequestPrimitive p_requestPrimitive) runs on CseTester{
+						// Local variables
+						var MsgIn v_response;
+						var integer v_aeIndex := -1;
+						var integer v_acpIndex := -1;
+						var RequestPrimitive v_createRequest;
+		
+						// Test control
+
+						// Test component configuration
+						f_cf01Up();
+
+						// Test adapter configuration
+
+						// Preamble
+						v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1);
+						v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource
+						
+						v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -);
+		
+						// Test Body
+						p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex);
+						p_requestPrimitive.from_ := "UnknowOriginator";
+		
+						mcaPort.send(m_request(valueof(p_requestPrimitive)));
+						tc_ac.start;
+						alt {
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+								tc_ac.stop;
+								setverdict(pass, testcasename() & ": Successful operation on resource type int2 (Ae)");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error while operation on resource type int2 (Ae)");
+							}
+							[] mcaPort.receive{
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error, unexpected message received");
+							}
+							[] tc_ac.timeout {
+								setverdict(inconc, testcasename() & ": No answer while executing operation on resource type int2 (Ae)");
+							}
+						}
+
+						//Postamble
+						f_cse_postamble_deleteResources();
+
+						//Tear down
+						f_cf01Down();
+
+					}//end f_CSE_SEC_ACP_BV_004
+
+				}//end g_CSE_SEC_ACP_BV_004
+				
+				group g_CSE_SEC_ACP_BV_011 {
+					
+					testcase TC_CSE_SEC_ACP_BV_011_01() runs on CseTester system CseSystem { //Create
+						f_CSE_SEC_ACP_BV_011(m_createContainerBase);	
+					}//end TC_CSE_SEC_ACP_BV_011_01
+
+					testcase TC_CSE_SEC_ACP_BV_011_02() runs on CseTester system CseSystem { //Update
+						var template RequestPrimitive v_updateRequest := m_updateContainerBase;
+						var Labels v_labels_1:= {"VALUE_1"};
+						v_updateRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_1;
+						f_CSE_SEC_ACP_BV_011(v_updateRequest);	
+					}//end TC_CSE_SEC_ACP_BV_011_02
+
+					testcase TC_CSE_SEC_ACP_BV_011_03() runs on CseTester system CseSystem { //Retrieve
+						f_CSE_SEC_ACP_BV_011(m_retrieveResource("Temporary", "Temporary"));	
+					}//end TC_CSE_SEC_ACP_BV_011_03
+
+					testcase TC_CSE_SEC_ACP_BV_011_04() runs on CseTester system CseSystem { //Delete
+						f_CSE_SEC_ACP_BV_011(m_deleteRequest("Temporary"));	
+					}//end TC_CSE_SEC_ACP_BV_011_04
+
+					function f_CSE_SEC_ACP_BV_011(template RequestPrimitive p_requestPrimitive) runs on CseTester {
+						// Local variables
+						var MsgIn v_response;
+						var integer v_aeIndex := -1;
+						var integer v_containerIndex := -1;
+
+						// Test control
+
+						// Test component configuration
+						f_cf01Up();
+
+						// Test adapter configuration
+
+						// Preamble
+						v_aeIndex := f_cse_preamble_registerAe(-, -);
+						v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);
+						
+						// Test Body
+						p_requestPrimitive.to_ := f_getResourceAddress(v_containerIndex);
+						p_requestPrimitive.from_ := f_getOriginator(v_aeIndex);
+
+						mcaPort.send(m_request(valueof(p_requestPrimitive)));
+						tc_ac.start;
+						alt {
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+								tc_ac.stop;
+								setverdict(pass, testcasename() & ": Successful operation on resource type int3 (Container)");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error while operation on resource type int3 (Container)");
+							}
+							[] mcaPort.receive{
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error, unexpected message received");
+							}
+							[] tc_ac.timeout {
+								setverdict(inconc, testcasename() & ": No answer while executing operation on resource type int3 (Container)");
+							}
+						}
+
+						//Postamble
+						f_cse_postamble_deleteResources();
+
+						//Tear down
+						f_cf01Down();
+
+					} //end f_CSE_SEC_ACP_BV_011
+
+				} //end g_CSE_SEC_ACP_BV_011
+				
+				group g_CSE_SEC_ACP_BO_012 {
+					
+					testcase TC_CSE_SEC_ACP_BO_012_01() runs on CseTester system CseSystem { //Create
+						f_CSE_SEC_ACP_BO_012(m_createContainerBase);	
+					}//end TC_CSE_SEC_ACP_BO_012_01
+
+					testcase TC_CSE_SEC_ACP_BO_012_02() runs on CseTester system CseSystem { //Update
+						var template RequestPrimitive v_updateRequest := m_updateContainerBase;
+						var Labels v_labels_1:= {"VALUE_1"};
+						v_updateRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_1;
+						f_CSE_SEC_ACP_BO_012(v_updateRequest);	
+					}//end TC_CSE_SEC_ACP_BO_012_02
+
+					testcase TC_CSE_SEC_ACP_BO_012_03() runs on CseTester system CseSystem { //Retrieve
+						f_CSE_SEC_ACP_BO_012(m_retrieveResource("Temporary", "Temporary"));	
+					}//end TC_CSE_SEC_ACP_BO_012_03
+
+					testcase TC_CSE_SEC_ACP_BO_012_04() runs on CseTester system CseSystem { //Delete
+						f_CSE_SEC_ACP_BO_012(m_deleteRequest("Temporary"));	
+					}//end TC_CSE_SEC_ACP_BO_012_04
+
+					function f_CSE_SEC_ACP_BO_012(template RequestPrimitive p_requestPrimitive) runs on CseTester {
+						// Local variables
+						var MsgIn v_response;
+						var integer v_aeIndex := -1;
+						var integer v_containerIndex := -1;
+						var integer v_acpIndex := -1;
+						var RequestPrimitive v_createRequest := valueof(m_createAcpBase);
+						var RequestPrimitive v_updateRequest;
+						var AccessControlRule v_accessControlRule_1;
+						var SetOfAcrs v_setOfArcs;
+
+						// Test control
+
+						// Test component configuration
+						f_cf01Up();
+
+						// Test adapter configuration
+
+						// Preamble
+						v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource
+						v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -);
+						v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);
+						
+						v_accessControlRule_1 := valueof(m_createAcr({PX_SUPER_USER, f_getOriginator(v_aeIndex)}, int63));
+						v_setOfArcs.accessControlRule_list := {v_accessControlRule_1};
+						v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, v_setOfArcs));
+						v_updateRequest := f_getUpdateRequestPrimitive(int1, v_acpIndex, v_updateRequest);
+						f_cse_updateResource(v_updateRequest);
+						
+						// Test Body
+						p_requestPrimitive.to_ := f_getResourceAddress(v_containerIndex);
+						p_requestPrimitive.from_ := "UnknowOriginator";
+
+						mcaPort.send(m_request(valueof(p_requestPrimitive)));
+						tc_ac.start;
+						alt {
+							[] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response {
+								tc_ac.stop;
+								setverdict(pass, testcasename() & ": Operation denied because of lack of right on Container");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error operation have been accpeted without having privileges");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error while operation on resource type int3 (Container)");
+							}
+							[] mcaPort.receive{
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error, unexpected message received");
+							}
+							[] tc_ac.timeout {
+								setverdict(inconc, testcasename() & ": No answer while executing operation on resource type int3 (Container)");
+							}
+						}
+
+						//Postamble
+						f_cse_postamble_deleteResources();
+
+						//Tear down
+						f_cf01Down();
+
+					} //end f_CSE_SEC_ACP_BO_012
+
+				} //end g_CSE_SEC_ACP_BO_012
+				
+				group g_CSE_SEC_ACP_BO_013{
+					
+					testcase TC_CSE_SEC_ACP_BO_013_01() runs on CseTester system CseSystem { //Create
+						f_CSE_SEC_ACP_BO_013(m_createContainerBase);	
+					}//end TC_CSE_SEC_ACP_BO_013_01
+
+					testcase TC_CSE_SEC_ACP_BO_013_02() runs on CseTester system CseSystem { //Update
+						var template RequestPrimitive v_updateRequest := m_updateAeBase;
+						var Labels v_labels_1:= {"VALUE_1"};
+						v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1;
+						f_CSE_SEC_ACP_BO_013(v_updateRequest);	
+					}//end TC_CSE_SEC_ACP_BO_013_02
+
+					testcase TC_CSE_SEC_ACP_BO_013_03() runs on CseTester system CseSystem { //Retrieve
+						f_CSE_SEC_ACP_BO_013(m_retrieveResource("Temporary", "Temporary"));	
+					}//end TC_CSE_SEC_ACP_BO_013_03
+
+					testcase TC_CSE_SEC_ACP_BO_013_04() runs on CseTester system CseSystem { //Delete
+						f_CSE_SEC_ACP_BO_013(m_deleteRequest("Temporary"));	
+					}//end TC_CSE_SEC_ACP_BO_013_04
+
+					function f_CSE_SEC_ACP_BO_013(template RequestPrimitive p_requestPrimitive) runs on CseTester {
+						// Local variables
+						var MsgIn v_response;
+						var integer v_aeIndex := -1;
+						var integer v_acpIndex := -1;
+						var RequestPrimitive v_createRequest := valueof(m_createAcpBase);
+						var RequestPrimitive v_updateRequest;
+						var AccessControlRule v_accessControlRule_1;
+						var SetOfAcrs v_setOfArcs;
+
+						// Test control
+
+						// Test component configuration
+						f_cf01Up();
+
+						// Test adapter configuration
+
+						// Preamble
+						v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource
+						v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -);
+		
+						v_accessControlRule_1 := valueof(m_createAcr({ f_getOriginator(v_aeIndex), PX_SUPER_USER}, int63));
+						v_setOfArcs.accessControlRule_list := {v_accessControlRule_1};
+						v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, v_setOfArcs));
+						v_updateRequest := f_getUpdateRequestPrimitive(int1, v_acpIndex, v_updateRequest);
+						f_cse_updateResource(v_updateRequest);
+		
+						// Test Body
+						p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex);
+						p_requestPrimitive.from_ := "UnknowOriginator";
+
+						mcaPort.send(m_request(valueof(p_requestPrimitive)));
+						tc_ac.start;
+						alt {
+							[] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response {
+								tc_ac.stop;
+								setverdict(pass, testcasename() & ": Operation denied because of lack of right on Container");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error operation have been accpeted without having privileges");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error while operation on resource type int3 (Container)");
+							}
+							[] mcaPort.receive{
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error, unexpected message received");
+							}
+							[] tc_ac.timeout {
+								setverdict(inconc, testcasename() & ": No answer while executing operation on resource type int3 (Container)");
+							}
+						}
+
+						//Postamble
+						f_cse_postamble_deleteResources();
+
+						//Tear down
+						f_cf01Down();
+
+					} //end f_CSE_SEC_ACP_BO_013
+
+				} //end g_CSE_SEC_ACP_BO_013
+				
+				group g_CSE_SEC_ACP_BV_014{
+					
+					testcase TC_CSE_SEC_ACP_BV_014_01() runs on CseTester system CseSystem { //Create
+						f_CSE_SEC_ACP_BV_014(m_createContainerBase);	
+					}//end TC_CSE_SEC_ACP_BV_014_01
+
+					testcase TC_CSE_SEC_ACP_BV_014_02() runs on CseTester system CseSystem { //Update
+						var template RequestPrimitive v_updateRequest := m_updateAeBase;
+						var Labels v_labels_1:= {"VALUE_1"};
+						v_updateRequest.primitiveContent.any_1[0].AE_optional.labels := v_labels_1;
+						f_CSE_SEC_ACP_BV_014(v_updateRequest);	
+					}//end TC_CSE_SEC_ACP_BV_014_02
+
+					testcase TC_CSE_SEC_ACP_BV_014_03() runs on CseTester system CseSystem { //Retrieve
+						f_CSE_SEC_ACP_BV_014(m_retrieveResource("Temporary", "Temporary"));	
+					}//end TC_CSE_SEC_ACP_BV_014_03
+
+					testcase TC_CSE_SEC_ACP_BV_014_04() runs on CseTester system CseSystem { //Delete
+						f_CSE_SEC_ACP_BV_014(m_deleteRequest("Temporary"));	
+					}//end TC_CSE_SEC_ACP_BV_014_04
+
+					function f_CSE_SEC_ACP_BV_014(template RequestPrimitive p_requestPrimitive) runs on CseTester {
+						// Local variables
+						var MsgIn v_response;
+						var integer v_aeIndex := -1;
+						var integer v_acpIndex1 := -1;
+						var integer v_acpIndex2 := -1;
+						var RequestPrimitive v_createRequest := valueof(m_createAcp(f_getResourceAddress(-1), omit));
+						var RequestPrimitive v_updateRequest;
+						var AccessControlRule v_accessControlRule_1;
+						var SetOfAcrs v_setOfArcs;
+
+						// Test control
+
+						// Test component configuration
+						f_cf01Up();
+
+						// Test adapter configuration
+
+						// Preamble
+						v_acpIndex1 := f_cse_createResource(int1, v_createRequest); // CSE child resource
+						v_acpIndex2 := f_cse_createResource(int1, v_createRequest); // CSE child resource
+						
+						v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex1].resource), f_getResourceId(vc_resourcesList[v_acpIndex2].resource)}, -);
+		
+						v_accessControlRule_1 := valueof(m_createAcr({f_getOriginator(v_aeIndex)}, int3)); // c_CR 
+						v_setOfArcs.accessControlRule_list := {v_accessControlRule_1};
+						v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, -));
+						v_updateRequest := f_getUpdateRequestPrimitive(int1, v_acpIndex1, v_updateRequest);
+						f_cse_updateResource(v_updateRequest);
+						
+						v_accessControlRule_1 := valueof(m_createAcr({f_getOriginator(v_aeIndex)}, int60)); // c_UDNDi  
+						v_setOfArcs.accessControlRule_list := {v_accessControlRule_1};
+						v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, -));
+						v_updateRequest := f_getUpdateRequestPrimitive(int1, v_acpIndex2, v_updateRequest);
+						f_cse_updateResource(v_updateRequest);
+
+						// Test Body
+						p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex);
+						p_requestPrimitive.from_ := f_getOriginator(v_aeIndex);
+
+						mcaPort.send(m_request(valueof(p_requestPrimitive)));
+						tc_ac.start;
+						alt {
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+								tc_ac.stop;
+								setverdict(pass, testcasename() & ": Successful operation on resource type int2 (Ae)");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error while operation on resource type int2 (Ae)");
+							}
+							[] mcaPort.receive{
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error, unexpected message received");
+							}
+							[] tc_ac.timeout {
+								setverdict(inconc, testcasename() & ": No answer while executing operation on resource type int2 (Ae)");
+							}
+						}
+
+						//Postamble
+						f_cse_postamble_deleteResources();
+
+						//Tear down
+						f_cf01Down();
+
+					} //end f_CSE_SEC_ACP_BV_014
+					
+				} //end g_CSE_SEC_ACP_BV_014
+					
+				group g_CSE_SEC_ACP_BV_015{
+				
+					testcase TC_CSE_SEC_ACP_BV_015() runs on CseTester system CseSystem {
+						// Local variables
+						var MsgIn v_response;
+						var integer v_aeIndex := -1;
+						var integer v_acpIndex1 := -1;
+						var integer v_acpIndex2 := -1;
+						var RequestPrimitive v_createRequest := valueof(m_createAcp(f_getResourceAddress(-1), omit));
+						var RequestPrimitive v_updateRequest := valueof(m_updateAeBase);
+						var AccessControlRule v_accessControlRule_1;
+						var AccessControlRule v_accessControlRule_2;
+						var SetOfAcrs v_setOfArcs_1;
+						var SetOfAcrs v_setOfArcs_2;
+
+						// Test control
+
+						// Test component configuration
+						f_cf01Up();
+
+						// Test adapter configuration
+
+						// Preamble
+						v_acpIndex1 := f_cse_createResource(int1, v_createRequest); // CSE child resource
+						
+						v_acpIndex2 := f_cse_createResource(int1, v_createRequest); // CSE child resource
+						
+						v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex1].resource)}, -);
+
+						v_accessControlRule_1 := valueof(m_createAcr({f_getOriginator(v_aeIndex)}, int59)); // c_CRUDNDi
+						v_accessControlRule_2 := valueof(m_createAcr({PX_SUPER_USER, f_getOriginator(v_aeIndex)}, int63)); // c_CRDNDi 
+						v_setOfArcs_1.accessControlRule_list := {v_accessControlRule_1};
+						v_setOfArcs_2.accessControlRule_list := {v_accessControlRule_2};
+						v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs_1, v_setOfArcs_2));
+						v_updateRequest := f_getUpdateRequestPrimitive(int1, v_acpIndex1, v_updateRequest);
+						f_cse_updateResource(v_updateRequest);
+						
+						// Test Body
+						v_updateRequest.primitiveContent.any_1[0].AE_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpIndex2].resource)};
+						v_updateRequest := f_getUpdateRequestPrimitive(int1, v_aeIndex, v_updateRequest);
+						
+						mcaPort.send(m_request(v_updateRequest));
+						tc_ac.start;
+						alt {
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+								tc_ac.stop;
+								setverdict(pass, testcasename() & ": Successful Update operation on resource type int2 (Ae)");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error while Update operation on resource type int2 (Ae)");
+							}
+							[] mcaPort.receive{
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error, unexpected message received");
+							}
+							[] tc_ac.timeout {
+								setverdict(inconc, testcasename() & ": No answer while executing update operation on resource type int2 (Ae)");
+							}
+						}
+
+						//Postamble
+						f_cse_postamble_deleteResources();
+
+						//Tear down
+						f_cf01Down();
+						
+					}//end TC_CSE_SEC_ACP_BV_015
+
+				} //end g_CSE_SEC_ACP_BV_015			
+				
+				group g_CSE_SEC_ACP_BV_016{
+
+					testcase TC_CSE_SEC_ACP_BV_016() runs on CseTester system CseSystem {
+						// Local variables
+						var MsgIn v_response;
+						var integer v_aeIndex := -1;
+						var integer v_acpIndex1 := -1;
+						var integer v_acpIndex2 := -1;
+						var RequestPrimitive v_createRequest := valueof(m_createAcp(f_getResourceAddress(-1), omit));
+						var RequestPrimitive v_updateRequest := valueof(m_updateAeBase);
+						var AccessControlRule v_accessControlRule_1;
+						var AccessControlRule v_accessControlRule_2;
+						var SetOfAcrs v_setOfArcs_1;
+						var SetOfAcrs v_setOfArcs_2;
+
+						// Test control
+
+						// Test component configuration
+						f_cf01Up();
+
+						// Test adapter configuration
+
+						// Preamble
+						v_acpIndex1 := f_cse_createResource(int1, v_createRequest); // CSE child resource
+						
+						v_acpIndex2 := f_cse_createResource(int1, v_createRequest); // CSE child resource
+						
+						v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex1].resource)}, -);
+
+						v_accessControlRule_1 := valueof(m_createAcr({f_getOriginator(v_aeIndex)}, int63)); // c_CRDNDi
+						v_accessControlRule_2 := valueof(m_createAcr({PX_SUPER_USER, f_getOriginator(v_aeIndex)}, int59)); // c_CRUDNDi 
+						v_setOfArcs_1.accessControlRule_list := {v_accessControlRule_1};
+						v_setOfArcs_2.accessControlRule_list := {v_accessControlRule_2};
+						v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs_1, v_setOfArcs_2));
+						v_updateRequest := f_getUpdateRequestPrimitive(int1, v_acpIndex1, v_updateRequest);
+						f_cse_updateResource(v_updateRequest);
+						
+						// Test Body
+						v_updateRequest.primitiveContent.any_1[0].AE_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpIndex2].resource)};
+						v_updateRequest := f_getUpdateRequestPrimitive(int1, v_aeIndex, v_updateRequest);
+
+						mcaPort.send(m_request(v_updateRequest));
+						tc_ac.start;
+						alt {
+							[] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response {
+								tc_ac.stop;
+								setverdict(pass, testcasename() & ": Operation denied because of lack of right on Container");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error operation have been accpeted without having privileges");
+							}
+							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error while operation on resource type int3 (Container)");
+							}
+							[] mcaPort.receive{
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error, unexpected message received");
+							}
+							[] tc_ac.timeout {
+								setverdict(inconc, testcasename() & ": No answer while executing operation on resource type int3 (Container)");
+							}
+						}
+
+						//Postamble
+						f_cse_postamble_deleteResources();
+
+						//Tear down
+						f_cf01Down();
+						
+					}//end TC_CSE_SEC_ACP_BV_016
+					
+				} //end g_CSE_SEC_ACP_BV_016					
+
+			}//end group AccessControlPolicy
+			
+		}//end group Security
+	
 	}//end group CSE