Get Data under anchor using single root
[cps.git] / cps-service / src / test / groovy / org / onap / cps / spi / exceptions / CpsExceptionsSpec.groovy
index d2f43c9..8592af9 100755 (executable)
@@ -119,12 +119,18 @@ class CpsExceptionsSpec extends Specification {
                     + "Anchor records associated.")
     }
 
-    def 'Creating a exception that a datanode does not exist.'() {
+    def 'Creating a exception that a datanode with a specified xpath does not exist.'() {
         expect: 'the exception details contains the correct message with dataspace name and xpath.'
             (new DataNodeNotFoundException(dataspaceName, anchorName, xpath)).details
                     == "DataNode with xpath ${xpath} was not found for anchor ${anchorName} and dataspace ${dataspaceName}."
     }
 
+    def 'Creating a exception that a datanode does not exist.'() {
+        expect: 'the exception details contains the correct message with dataspace name and anchor.'
+            (new DataNodeNotFoundException(dataspaceName, anchorName)).details
+                    == "DataNode not found for anchor ${anchorName} and dataspace ${dataspaceName}."
+    }
+
     def 'Creating a exception that a dataspace already exists.'() {
         expect: 'the exception details contains the correct message with dataspace name.'
             (AlreadyDefinedException.forDataspace(dataspaceName, rootCause)).details