diff --git a/OneM2M_Functions.ttcn b/OneM2M_Functions.ttcn
index ba0f282469c3072c57cae4c045d1fda6c9b5a901..823820ee5ffc40f8a43a16450b5c52eb01660ce8 100644
--- a/OneM2M_Functions.ttcn
+++ b/OneM2M_Functions.ttcn
@@ -29,18 +29,34 @@ module OneM2M_Functions {
     	*/
     	function f_cf01Up() runs on M2M {
     			
-    		// Variables
+			// Variables
     			
-    		// Map
-    		map(self:mcaPort, system:mcaPort);
-    		map(self:acPort, system:acPort);
-    		activate(a_default());
+			// Map
+			map(self:mcaPort, system:mcaPort);
+			map(self:acPort, system:acPort);
+			activate(a_default());
     			
-    		// Connect
+			// Connect
     						
-    		//Initialze the IUT
+			//Initialze the IUT
     						
-    	} // end f_cf01Up
+		} // end f_cf01Up
+		
+		function f_cf02Up() runs on M2M {
+    			
+			// Variables
+    			
+			// Map
+			map(self:mcaPort, system:mcaPort);
+			map(self:mccPort, system:mccPort);
+			map(self:acPort, system:acPort);
+			activate(a_default());
+    			
+			// Connect
+    						
+			//Initialze the IUT
+    						
+		} // end f_cf02Up
     	
 	}//end group configFunctions
 	
@@ -71,7 +87,7 @@ module OneM2M_Functions {
 				//TODO Test, to be removed
 				v_request.to_ := f_addPrefix(f_getResourceAddress());
 				
-    			mcaPort.send(m_request(v_request));
+				mcaPort.send(m_request(v_request));
 				//mcaPort.send(m_request(m_createAeAux(p_name, {PX_URI_CSE & PX_CSE_NAME & "/" & c_acpAuxName})));
 			} else {
 				mcaPort.send(m_request(m_createAeAux()));
@@ -113,6 +129,19 @@ module OneM2M_Functions {
 			return v_aeAuxIndex;
 		
 		}
+		
+		//Added by @Naum
+		function f_preamble_prepareCSE(in template ListOfM2MID p_allowedAEs, in template (value) AccessControlOperations p_allowedOperations := int63) runs on M2M return integer{//c_CRUDNDi
+		
+			var M2MResponsePrimitive v_response;
+			var integer v_serviceSubscribedAppRuleIndex := -1;
+			var RequestPrimitive v_request;
+
+			v_serviceSubscribedAppRuleIndex := f_createResource(int19, m_createServiceSubscribedAppRule({"None"}, {PX_APP_ID}, valueof(p_allowedAEs)));
+			
+			return v_serviceSubscribedAppRuleIndex;
+		
+		}
 	
 	}//end group preambleFunctions
 	
@@ -171,7 +200,15 @@ module OneM2M_Functions {
 		 */
 		function f_postamble_default() runs on M2M {
 	
-			unmap(self:mcaPort, system:mcaPort); 
+			unmap(self:mcaPort, system:mcaPort);
+			unmap(self:acPort, system:acPort);
+			//stop;
+		}	
+		
+		function f_postamble_CF02() runs on M2M {
+	
+			unmap(self:mcaPort, system:mcaPort);
+			unmap(self:mccPort, system:mccPort);
 			unmap(self:acPort, system:acPort);
 			//stop;
 		}		
@@ -210,11 +247,11 @@ module OneM2M_Functions {
 		 */
 		function f_getCreateRequestPrimitive(in ResourceType p_resourceType, template RequestPrimitive p_request, integer p_parentIndex) runs on M2M return RequestPrimitive {
 		
-            p_request.from_ := f_getOriginator(p_parentIndex);
+			p_request.from_ := f_getOriginator(p_parentIndex);
             
-            p_request.to_ := f_addPrefix(f_getResourceAddress(p_parentIndex));
+			p_request.to_ := f_addPrefix(f_getResourceAddress(p_parentIndex));
             
-            //p_request.name := p_name;
+			//p_request.name := p_name;
 		
 			if (p_resourceType == int1) {//AccessControlPolicy
 			
@@ -602,12 +639,12 @@ module OneM2M_Functions {
 			
 			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 := omit
-    			}
-    		};
+				{
+					accessControlOriginators := PX_ACOR, //{"admin:admin"}
+					accessControlOperations := valueof(p_allowedOperations),
+					accessControlContexts_list := omit
+				}
+			};
 						
 			mcaPort.send(m_request(v_request));
 			tc_ac.start;
diff --git a/OneM2M_Templates.ttcn b/OneM2M_Templates.ttcn
index 1db2722c96a4e2c594885aeb18dc2569858afacb..14b15a3698023ab2f364848f80205cdfc0eb9ccf 100644
--- a/OneM2M_Templates.ttcn
+++ b/OneM2M_Templates.ttcn
@@ -47,7 +47,15 @@ module OneM2M_Templates {
 		protocolBinding := PX_PROTOCOL_BINDING,
 		serialization := PX_SERIALIZATION, 
 		nullFields := p_nullFields
-		
+	};
+	//Added by @Naum
+	template M2MRequestPrimitive mw_request(in template RequestPrimitive p_requestPrimitive, in template (omit) AttributeList_1 p_nullFields := omit ) := {
+		requestPrimitive_ := p_requestPrimitive,
+		host := omit,
+		xmlNamespace := omit,
+		protocolBinding := omit,
+		serialization := omit, 
+		nullFields := omit
 	};
 	
 	group RequestPrimitives { 
@@ -339,6 +347,57 @@ module OneM2M_Templates {
 			/**
 			 * @desc Base CREATE request primitive for AE resource (AUX)
 			 */
+			//Added by @Naum
+			template RequestPrimitive mw_createAEannc(template (omit) AcpType p_accessControlPolicyIDs := omit,template (omit) XSD.ID p_from := omit, XSD.ID p_appId) := {
+				operation := int1,
+				to_ := ?,
+				from_ := p_from,//PX_AE_ID_STEM,//TODO We should use omit, "s", or "c"
+				requestIdentifier := ?,
+				resourceType := int10002,
+				primitiveContent := {
+					any_1 := {{AEAnnc_optional := mw_contentCreateAEannc(c_aeAuxName, p_accessControlPolicyIDs, p_appId)}}	
+				},
+				role := *,
+				originatingTimestamp := *,
+				requestExpirationTimestamp := *,
+				resultExpirationTimestamp := *,
+				operationExecutionTime := *,
+				responseType := *,
+				resultPersistence := *,
+				resultContent := *,
+				eventCategory := *,
+				deliveryAggregation := *,
+				groupRequestIdentifier := *,
+				filterCriteria := *,
+				discoveryResultType := *
+			};
+
+			//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",
+				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(c_aeAuxName, p_accessControlPolicyIDs, 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	
+
+			};
+        	
         	template (value) RequestPrimitive m_createAeAux(template (omit) AcpType p_accessControlPolicyIDs := omit ) := {
         		operation := int1,
         		to_ := "Not Initialized",
@@ -446,6 +505,32 @@ module OneM2M_Templates {
 
         	};
         	
+			//Added by @Naum
+			template (value) RequestPrimitive m_createCSEBase (in ServiceSubscribedAppRule p_serviceSubscribedAppRule) := {
+				operation := int1,
+				to_ := "NotInitialized",
+				from_ := PX_AE_ID_STEM,
+				requestIdentifier := "m_createCSE" & f_rnd(1, 1000000),
+				resourceType := int1,
+				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
@@ -687,6 +772,32 @@ module OneM2M_Templates {
 
         	};
         	
+			//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",
+				from_ := PX_AE_ID_STEM,
+				requestIdentifier := "m_createCSE" & f_rnd(1, 1000000),
+				resourceType := int1,
+				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
@@ -795,12 +906,8 @@ module OneM2M_Templates {
 	
 	group ContentCreate {
 		
-    	/**
-    	 * @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) := {
+
+			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
@@ -810,10 +917,38 @@ module OneM2M_Templates {
     		labels := omit,//O
     		accessControlPolicyIDs := p_accessControlPolicyIDs,//O
     		expirationTime := omit,//O
+			link := omit,//O
+			appName := omit,//O
+			app_ID := p_appId,//M
+			aE_ID := omit,//NP
+			pointOfAccess := omit, //{"http://127.0.0.1:1400/monitor"},//O //{"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 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) := {
+
+			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
     		announceTo := omit,//O
     		announcedAttribute := omit,//O
     		appName := omit,//O
-    		app_ID := PX_APP_ID,//M
+			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
@@ -861,6 +996,29 @@ module OneM2M_Templates {
 			choice := omit //NP
 		};
     	
+		//added by @Naum
+		template (value) CSEBase_optional m_contentCreateCSEBase (in ServiceSubscribedAppRule p_serviceSubscribedAppRule) := {
+			resourceName := omit,
+			resourceType := omit,
+			resourceID := omit,
+			parentID := omit,
+			creationTime := omit,
+			lastModifiedTime := omit,
+			labels := omit,
+			accessControlPolicyIDs := omit,
+			cseType := omit,
+			cSE_ID := omit,
+			supportedResourceType := omit,
+			pointOfAccess := omit,
+			nodeLink := omit,
+    		
+			choice := {
+				choice_list := {{
+				  serviceSubscribedAppRule := p_serviceSubscribedAppRule
+				}}
+			}
+		}
+    	
     	/**
     	 * @desc Base primitiveContent for CREATE operation for Group resource
     	 * @param p_maxNrOfMembers Max number of members
@@ -936,6 +1094,23 @@ module OneM2M_Templates {
 			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
+		}
+    	
+
     	/**
     	 * @desc Base primitiveContent for CREATE operation for Subscription resource
     	 * @param p_notificationURI Notification URI
@@ -1861,6 +2036,19 @@ module OneM2M_Templates {
     		}
     	};
     	
+		template M2MResponsePrimitive mw_responseInverse(ResponseStatusCode p_statusCode) := {
+			responsePrimitive_ := {
+				responseStatusCode := complement(p_statusCode),
+				requestIdentifier := ?,
+				primitiveContent := *,
+				to_ := *,
+				from_ := *,
+				originatingTimestamp := *,
+				resultExpirationTimestamp := *,
+				eventCategory := *
+			}
+		};
+    	
     	template M2MResponsePrimitive mw_responseOK(in template PrimitiveContent p_content := *) := {
     		responsePrimitive_ := {
     			responseStatusCode := (int2000, int2001, int2002, int2004),
diff --git a/OneM2M_TestSystem.ttcn b/OneM2M_TestSystem.ttcn
index 7a021ba98b7358daa8753ca15f3dbb9d4c518bfd..88fd633786ee16c11e69e24a7e3c8cb3b1f22256 100644
--- a/OneM2M_TestSystem.ttcn
+++ b/OneM2M_TestSystem.ttcn
@@ -42,7 +42,7 @@ module OneM2M_TestSystem {
 	/* Components */		
 	type component M2M {
 		port OneM2MPort mcaPort;
-		//port OneM2MPort mccPort;
+		port OneM2MPort mccPort;
 		port AdapterControlPort acPort;
 		//timers
 		timer tc_ac := PX_TAC;
@@ -57,7 +57,7 @@ module OneM2M_TestSystem {
 			
 	type component M2MSystem {
 		port OneM2MPort mcaPort;
-		//port OneM2MPort mccPort;
+		port OneM2MPort mccPort;
 		port AdapterControlPort acPort;
 	}				
 	
@@ -73,8 +73,8 @@ module OneM2M_TestSystem {
 	 */
 	type record M2MRequestPrimitive {
 		RequestPrimitive requestPrimitive_,		
-		charstring host,
-		charstring xmlNamespace, 
+		charstring host optional,
+		charstring xmlNamespace optional, 
 		charstring protocolBinding optional,
 		charstring serialization optional,
 		AttributeList_1 nullFields optional
@@ -84,6 +84,18 @@ module OneM2M_TestSystem {
 		ResponsePrimitive responsePrimitive_		
 	}	
 	
+	type record M2MPrimitive {
+		union {
+			RequestPrimitive requestPrimitive_,
+			ResponsePrimitive responsePrimitive_
+		} primitive, 
+		charstring host optional,
+		charstring xmlNamespace optional, 
+		charstring protocolBinding optional,
+		charstring serialization optional,
+		AttributeList_1 nullFields optional
+	}
+	
 	type record AcRequestPrimitive {
 		charstring event,
 		anytype data
@@ -101,3 +113,7 @@ module OneM2M_TestSystem {
 	}
 
 }// end of module
+with {
+	extension "anytype charstring"
+
+}
diff --git a/OneM2M_Testcases.ttcn b/OneM2M_Testcases.ttcn
index 318e1e3b444e861791d0765f679eded7a7768e69..c1e3ed341ebf0bb369546604eaa2a22082934835 100644
--- a/OneM2M_Testcases.ttcn
+++ b/OneM2M_Testcases.ttcn
@@ -106,6 +106,208 @@ module OneM2M_Testcases {
 	
 	group CSE {
 		
+		group Registration {
+	  	  	
+			testcase TC_CSE_REG_BV_001() runs on M2M system M2MSystem {
+	  	  	
+				var M2MResponsePrimitive v_response;
+				var RequestPrimitive v_request;
+				var integer v_cseBaseIndex := -1;
+				var integer v_resourceIndex := -1;
+				var ResourceType v_resourceType := int2;
+                
+                // Test component configuration
+				f_cf01Up();
+                
+				//Preambule
+				v_cseBaseIndex := f_preamble_prepareCSE({"C-AE-ID-STEM"});//c_CRUDNDi);
+	
+				//Test Body
+				v_request := valueof(m_createAe(PX_APP_ID, omit, omit));	
+				
+				v_request := f_getCreateRequestPrimitive(v_resourceType, omit, v_request, v_cseBaseIndex);
+				
+				mcaPort.send(m_request(v_request));
+				
+				tc_ac.start;
+				alt {
+					[] mcaPort.receive(mw_response(int2001)) {
+						tc_ac.stop;
+						setverdict(pass, testcasename() & ": AE successfuly created.");
+					}
+					[] mcaPort.receive(mw_responseInverse(int2001)) -> value v_response{
+						tc_ac.stop;
+						setverdict(fail, testcasename() & ": Error while creating AE with status code " & int2str(enum2int(v_response.responsePrimitive_.responseStatusCode)));
+					}
+					[] tc_ac.timeout {
+						setverdict(inconc, testcasename() & ": No answer while creating AE");
+					}
+				}	
+								
+				// Postamble
+				f_postamble_deleteResources();
+					
+			}
+	  	  	
+			testcase TC_CSE_REG_BV_002() runs on M2M system M2MSystem {
+	  	  	
+				var M2MResponsePrimitive v_response;
+				var RequestPrimitive v_request;
+				var integer v_cseBaseIndex := -1;
+				var ResourceType v_resourceType := int2;
+                
+                // Test component configuration
+				f_cf01Up();
+	  	  	
+				//Preambule
+				v_cseBaseIndex := f_preamble_prepareCSE({"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, omit, v_request, v_cseBaseIndex);
+
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(int2001)) {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": AE successfuly created.");
+						}
+						[] mcaPort.receive(mw_responseInverse(int2001)) -> value v_response{
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while creating AE with status code " & int2str(enum2int(v_response.responsePrimitive_.responseStatusCode)));
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while creating AE");
+						}
+					}	
+    								
+					// Postamble
+					f_postamble_deleteResources();
+					
+			}
+	  	  	
+			testcase TC_CSE_REG_BV_003() runs on M2M system M2MSystem {
+	  	  	
+				var M2MResponsePrimitive v_response;
+				var RequestPrimitive v_request;
+				var integer v_cseBaseIndex := -1;
+				var ResourceType v_resourceType := int2;
+                
+                // Test component configuration
+				f_cf01Up();
+				
+				//Preambule
+				v_cseBaseIndex := f_preamble_prepareCSE(omit);//c_CRUDNDi);				
+    									
+				// Test Body
+				v_request := valueof(m_createAe(PX_APP_ID, omit, omit));				
+    									
+				v_request := f_getCreateRequestPrimitive(v_resourceType, omit, v_request, v_cseBaseIndex);
+				
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(int4005)) {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": AE creation rejected.");
+						}
+						[] mcaPort.receive(mw_responseInverse(int4005)) -> value v_response{
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while creating AE with status code " & int2str(enum2int(v_response.responsePrimitive_.responseStatusCode)));
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while creating AE");
+						}
+					}	
+    								
+					// Postamble
+					f_postamble_deleteResources();
+					
+			}
+	  	  	
+			testcase TC_CSE_REG_BV_004() runs on M2M system M2MSystem {
+	  	  	
+				var M2MResponsePrimitive v_response;
+				var RequestPrimitive v_request;
+				var integer v_cseBaseIndex := -1;
+				var ResourceType v_resourceType := int2;
+                
+                // Test component configuration
+				f_cf01Up();
+	  	  	
+				//Preambule
+				v_cseBaseIndex := f_preamble_prepareCSE(omit);//c_CRUDNDi);
+	
+				//Test Body	
+				v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));				
+    									
+				v_request := f_getCreateRequestPrimitive(v_resourceType, omit, v_request, v_cseBaseIndex);
+		
+					mcaPort.send(m_request(v_request));
+					tc_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(int4005)) {
+							tc_ac.stop;
+							setverdict(pass, testcasename() & ": AE creation rejected.");
+						}
+						[] mcaPort.receive(mw_responseInverse(int4005)) -> value v_response{
+							tc_ac.stop;
+							setverdict(fail, testcasename() & ": Error while creating AE with status code " & int2str(enum2int(v_response.responsePrimitive_.responseStatusCode)));
+						}
+						[] tc_ac.timeout {
+							setverdict(inconc, testcasename() & ": No answer while creating AE");
+						}
+					}	
+    								
+					// Postamble
+					f_postamble_deleteResources();
+					
+			}
+	  	  	
+			testcase TC_CSE_REG_BV_005() runs on M2M system M2MSystem {
+	  	  	
+				var M2MResponsePrimitive 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_preamble_prepareCSE({"S"});//c_CRUDNDi);
+	
+				//Test Body
+				v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));				
+    									
+				v_request := f_getCreateRequestPrimitive(v_resourceType, omit, v_request, v_cseBaseIndex);
+	  	  		
+					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_postamble_deleteResources();
+					
+			}
+	  	  	
+		}//end Registration
+		
 		group Data_Management_and_Repository {
 
 			group g_CSE_DMR_BV_001 {
diff --git a/OneM2M_Types.ttcn b/OneM2M_Types.ttcn
index f301aaa95c3b1680331fa7d4af36b324c2c43133..ac17dce1147f43a800b5e667d3adc383764907bc 100644
--- a/OneM2M_Types.ttcn
+++ b/OneM2M_Types.ttcn
@@ -4001,6 +4001,56 @@ module OneM2M_Types {
 /* Additional types */
 
 group optionalResourceTypes {
+  
+  	//Added by @Naum
+  	type record AEAnnc_optional
+	{
+		XSD.NCName resourceName optional,
+		ResourceType resourceType optional,
+		XSD.ID resourceID optional,
+		NhURI parentID optional,
+		Timestamp creationTime optional,
+		Timestamp lastModifiedTime optional,
+		Labels labels optional,
+		AcpType accessControlPolicyIDs optional,
+		Timestamp expirationTime optional,
+		XSD.AnyURI link optional,
+		XSD.String appName optional,
+		XSD.String app_ID optional,
+		XSD.ID aE_ID optional,
+		PoaList pointOfAccess optional,
+		XSD.AnyURI ontologyRef optional,
+		XSD.AnyURI nodeLink optional,
+		XSD.Boolean requestReachability optional,
+		Serializations contentSerialization optional,
+		union {
+			record length(1 .. infinity) of ChildResourceRef childResource_list,
+			record length(1 .. infinity) of union {
+				Container container,
+				ContainerAnnc containerAnnc,
+				Group group_,
+				GroupAnnc groupAnnc,
+				AccessControlPolicy accessControlPolicy,
+				AccessControlPolicyAnnc accessControlPolicyAnnc,
+				Subscription subscription,
+				ScheduleAnnc scheduleAnnc
+			} choice_list
+		} choice optional
+	}
+	with {
+	  variant "element";
+	  variant (resourceName) "attribute";
+	  variant (app_ID) "name as 'App-ID'";
+	  variant (aE_ID) "name as 'AE-ID'";
+	  //variant (requestReachability) "text 'true' as '1'";
+	  //variant (requestReachability) "text 'false' as '0'";
+	  variant (choice) "untagged";
+	  variant (choice.childResource_list) "untagged";
+	  variant (choice.childResource_list[-]) "name as 'childResource'";
+	  variant (choice.choice_list) "untagged";
+	  variant (choice.choice_list[-]) "untagged";
+	  variant (choice.choice_list[-].group_) "name as 'group'";
+	};
 
 	type record AE_optional
 	{
@@ -4153,6 +4203,60 @@ group optionalResourceTypes {
 	  variant (choice.choice_list[-]) "untagged";
 	};
 	
+	
+	//added by @Naum
+	type record CSEBase_optional
+	{
+		XSD.NCName resourceName optional,
+		ResourceType resourceType optional,
+		XSD.ID resourceID optional,
+		NhURI parentID optional,
+		Timestamp creationTime optional,
+		Timestamp lastModifiedTime optional,
+		Labels labels optional,
+		AcpType accessControlPolicyIDs optional,
+		CseTypeID cseType optional,
+		XSD.ID cSE_ID optional,
+		record of ResourceType supportedResourceType optional,
+		PoaList pointOfAccess optional,
+		XSD.AnyURI nodeLink optional,
+		union {
+			record length(1 .. infinity) of ChildResourceRef childResource_list,
+			record length(1 .. infinity) of union {
+				RemoteCSE remoteCSE,
+				Node node,
+				AE aE,
+				Container container,
+				Group group_,
+				AccessControlPolicy accessControlPolicy,
+				Subscription subscription,
+				MgmtCmd mgmtCmd,
+				LocationPolicy locationPolicy,
+				StatsConfig statsConfig,
+				StatsCollect statsCollect,
+				Request request,
+				Delivery delivery,
+				Schedule schedule,
+				M2mServiceSubscriptionProfile m2mServiceSubscriptionProfile,
+				ServiceSubscribedAppRule serviceSubscribedAppRule
+			} choice_list
+		} choice optional
+	}
+	with {
+	  variant "element";
+	  variant (resourceName) "attribute";
+	  variant (cSE_ID) "name as 'CSE-ID'";
+	  variant (supportedResourceType) "list";
+	  variant (choice) "untagged";
+	  variant (choice.childResource_list) "untagged";
+	  variant (choice.childResource_list[-]) "name as 'childResource'";
+	  variant (choice.choice_list) "untagged";
+	  variant (choice.choice_list[-]) "untagged";
+	  variant (choice.choice_list[-].aE) "name as capitalized";
+	  variant (choice.choice_list[-].group_) "name as 'group'";
+	};
+	
+	
 	type record Group_optional
 	{
 		XSD.NCName resourceName optional,
@@ -4246,6 +4350,38 @@ group optionalResourceTypes {
 	  variant (choice.choice_list[-]) "untagged";
 	};
 	
+	//Added by @Naum
+	type record ServiceSubscribedAppRule_optional
+	{
+		XSD.NCName resourceName optional,
+		ResourceType resourceType optional,
+		XSD.ID resourceID optional,
+		NhURI parentID optional,
+		Timestamp creationTime optional,
+		Timestamp lastModifiedTime optional,
+		Labels labels optional,
+		AcpType accessControlPolicyIDs optional,
+		Timestamp expirationTime optional,
+		ListOfM2MID applicableCredIDs optional,
+		ListOfM2MID allowedApp_IDs optional,
+		ListOfM2MID allowedAEs optional,
+		union {
+			record length(1 .. infinity) of ChildResourceRef childResource_list,
+			record length(1 .. infinity) of Subscription subscription_list
+		} choice optional
+	}
+	with {
+	  variant "name as uncapitalized";
+	  variant "element";
+	  variant (resourceName) "attribute";
+	  variant (allowedApp_IDs) "name as 'allowedApp-IDs'";
+	  variant (choice) "untagged";
+	  variant (choice.childResource_list) "untagged";
+	  variant (choice.childResource_list[-]) "name as 'childResource'";
+	  variant (choice.subscription_list) "untagged";
+	  variant (choice.subscription_list[-]) "name as 'subscription'";
+	};
+	
 	type record Subscription_optional
 	{
 		XSD.NCName resourceName optional,
@@ -4422,5 +4558,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 charstring, AnyURI, AttributeList, AE, AccessControlPolicy, AccessControlPolicy_optional, ACP_update_invalid, AE_optional, AE_update_invalid,Container_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"
+  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"
 }