+ def 'Data node structure conversion to map with root node identifier.'() {
+ when: 'data node structure is converted to a map with root node identifier'
+ def result = DataMapUtils.toDataMapWithIdentifier(dataNode)
+
+ then: 'root node identifier is not null'
+ result.parent != null
+
+ then: 'root node leaves are populated under its node identifier'
+ def parentNode = result.parent
+ parentNode.parentLeaf == 'parentLeafValue'
+ parentNode.parentLeafList == ['parentLeafListEntry1','parentLeafListEntry2']
+
+ and: 'leaves for child element is populated under its node identifier'
+ parentNode.'child-object'.childLeaf == 'childLeafValue'
+
+ and: 'leaves for grandchild element is populated under its node identifier'
+ parentNode.'child-object'.'grand-child-object'.grandChildLeaf == 'grandChildLeafValue'
+ }