diff --git a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyControllerSpec.groovy b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyControllerSpec.groovy
index 45e8f11..f537980 100644
--- a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyControllerSpec.groovy
+++ b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyControllerSpec.groovy
@@ -28,7 +28,9 @@
 import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post
 import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put
 
+import com.fasterxml.jackson.databind.ObjectMapper
 import com.google.gson.Gson
+import org.onap.cps.TestUtils
 import org.onap.cps.ncmp.api.NetworkCmProxyDataService
 import org.onap.cps.spi.model.DataNodeBuilder
 import org.spockframework.spring.SpringBean
@@ -49,13 +51,19 @@
     @SpringBean
     NetworkCmProxyDataService mockNetworkCmProxyDataService = Mock()
 
+    @SpringBean
+    ObjectMapper objectMapper = new ObjectMapper()
+
     @Value('${rest.api.ncmp-base-path}')
     def basePath
 
-    def dataNodeBaseEndpoint
+    def deprecatedDataNodeBaseEndPoint
+
+    def ncmpDmiEndpoint
 
     def setup() {
-        dataNodeBaseEndpoint = "$basePath/v1"
+        deprecatedDataNodeBaseEndPoint = "$basePath/v1"
+        ncmpDmiEndpoint = "$basePath/ncmp-dmi/v1"
     }
 
     def cmHandle = 'some handle'
@@ -67,7 +75,7 @@
             def cpsPath = 'some cps-path'
             mockNetworkCmProxyDataService.queryDataNodes(cmHandle, cpsPath, expectedCpsDataServiceOption) >> [dataNode]
         and: 'the query endpoint'
-            def dataNodeEndpoint = "$dataNodeBaseEndpoint/cm-handles/$cmHandle/nodes/query"
+            def dataNodeEndpoint = "$deprecatedDataNodeBaseEndPoint/cm-handles/$cmHandle/nodes/query"
         when: 'query data nodes API is invoked'
             def response = mvc.perform(get(dataNodeEndpoint)
                     .param('cps-path', cpsPath)
@@ -89,7 +97,7 @@
             def jsonData = 'json data'
         when: 'post request is performed'
             def response = mvc.perform(
-                    post("$dataNodeBaseEndpoint/cm-handles/$cmHandle/nodes")
+                    post("$deprecatedDataNodeBaseEndPoint/cm-handles/$cmHandle/nodes")
                             .contentType(MediaType.APPLICATION_JSON)
                             .content(jsonData)
                             .param('xpath', reqXpath)
@@ -111,7 +119,7 @@
             def parentNodeXpath = 'parent node xpath'
         when: 'post request is performed'
             def response = mvc.perform(
-                    post("$dataNodeBaseEndpoint/cm-handles/$cmHandle/list-node")
+                    post("$deprecatedDataNodeBaseEndPoint/cm-handles/$cmHandle/list-node")
                             .contentType(MediaType.APPLICATION_JSON)
                             .content(jsonData)
                             .param('xpath', parentNodeXpath)
@@ -126,7 +134,7 @@
         given: 'json data'
             def jsonData = 'json data'
         and: 'the query endpoint'
-            def endpoint = "$dataNodeBaseEndpoint/cm-handles/$cmHandle/nodes"
+            def endpoint = "$deprecatedDataNodeBaseEndPoint/cm-handles/$cmHandle/nodes"
         when: 'patch request is performed'
             def response = mvc.perform(
                     patch(endpoint)
@@ -144,7 +152,7 @@
         given: 'json data'
             def jsonData = 'json data'
         and: 'the query endpoint'
-            def endpoint = "$dataNodeBaseEndpoint/cm-handles/$cmHandle/nodes"
+            def endpoint = "$deprecatedDataNodeBaseEndPoint/cm-handles/$cmHandle/nodes"
         when: 'put request is performed'
             def response = mvc.perform(
                     put(endpoint)
@@ -164,7 +172,7 @@
             def dataNode = new DataNodeBuilder().withXpath(xpath).withLeaves(["leaf": "value"]).build()
             mockNetworkCmProxyDataService.getDataNode(cmHandle, xpath, OMIT_DESCENDANTS) >> dataNode
         and: 'the query endpoint'
-            def endpoint = "$dataNodeBaseEndpoint/cm-handles/$cmHandle/node"
+            def endpoint = "$deprecatedDataNodeBaseEndPoint/cm-handles/$cmHandle/node"
         when: 'get request is performed through REST API'
             def response = mvc.perform(get(endpoint).param('xpath', xpath)).andReturn().response
         then: 'a success response is returned'
@@ -172,5 +180,21 @@
         and: 'response contains expected leaf and value'
             response.contentAsString.contains('"leaf":"value"')
     }
+
+    def 'Register CM Handle Event' () {
+        given: 'jsonData'
+            def jsonData = TestUtils.getResourceFileContent('dmi-registration.json')
+        when: 'post request is performed'
+            def response = mvc.perform(
+                post("$ncmpDmiEndpoint/ch")
+                .contentType(MediaType.APPLICATION_JSON)
+                .content(jsonData)
+            ).andReturn().response
+        then: 'the cm handles are registered with the service'
+            1 * mockNetworkCmProxyDataService.updateDmiPluginRegistration(_)
+        and: 'response status is created'
+            response.status == HttpStatus.CREATED.value()
+    }
+
 }
 
diff --git a/cps-ncmp-rest/src/test/java/org/onap/cps/TestUtils.java b/cps-ncmp-rest/src/test/java/org/onap/cps/TestUtils.java
new file mode 100644
index 0000000..4a6f5e5
--- /dev/null
+++ b/cps-ncmp-rest/src/test/java/org/onap/cps/TestUtils.java
@@ -0,0 +1,54 @@
+/*
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2021 Nordix Foundation
+ *  ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *  SPDX-License-Identifier: Apache-2.0
+ *  ============LICENSE_END=========================================================
+ */
+
+package org.onap.cps;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+
+/**
+ * Common convenience methods for testing.
+ */
+public class TestUtils {
+
+    /**
+     * Convert a file in the test resource folder to file.
+     *
+     * @param filename to name of the file in test/resources
+     * @return the file
+     * @throws IOException when there is an IO issue
+     */
+    public static File readFile(final String filename) {
+        return new File(ClassLoader.getSystemClassLoader().getResource(filename).getFile());
+    }
+
+    /**
+     * Convert a file in the test resource folder to a string.
+     *
+     * @param filename to name of the file in test/resources
+     * @return the content of the file as a String
+     * @throws IOException when there is an IO issue
+     */
+    public static String getResourceFileContent(final String filename) throws IOException {
+        final File file = readFile(filename);
+        return new String(Files.readAllBytes(file.toPath()));
+    }
+}
diff --git a/cps-ncmp-rest/src/test/resources/dmi-registration.json b/cps-ncmp-rest/src/test/resources/dmi-registration.json
new file mode 100644
index 0000000..24bc9f9
--- /dev/null
+++ b/cps-ncmp-rest/src/test/resources/dmi-registration.json
@@ -0,0 +1,11 @@
+{
+  "dmiPlugin": "onap-dmi-plugin",
+  "createdCmHandles": [
+    {
+      "cmHandle": "example-name",
+      "cmHandleProperties": {
+          "subSystemId" : "system-001"
+        }
+    }
+  ]
+}
\ No newline at end of file
