ONOS-7007 fix parent test using wrong path

Change-Id: I666d038e3d2e33686941a99cd04a61496726f5da
diff --git a/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/PartitionedAsyncDocumentTree.java b/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/PartitionedAsyncDocumentTree.java
index 2d17282..71758a0 100644
--- a/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/PartitionedAsyncDocumentTree.java
+++ b/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/PartitionedAsyncDocumentTree.java
@@ -107,11 +107,16 @@
 
     @Override
     public CompletableFuture<Boolean> create(DocumentPath path, V value) {
+        if (path.parent() == null) {
+            // create value on root
+            return partition(path).createRecursive(path, value);
+        }
         // TODO: This operation is not atomic
-        return partition(path.parent()).get(path).thenCompose(parentValue -> {
+        return partition(path.parent()).get(path.parent()).thenCompose(parentValue -> {
             if (parentValue == null) {
                 return Tools.exceptionalFuture(new NoSuchDocumentPathException(String.valueOf(path.parent())));
             } else {
+                // not atomic: parent did exist at some point, so moving forward
                 return partition(path).createRecursive(path, value);
             }
         });