child3
child31
child312=something else
*/
TreeNodeMetadataDefinition[] startTree = createTreePath("", "root", "child1");
TreeNodeMetadataDefinition startChild1 = startTree[1];
startChild1.addChild(new StringMetadataDefinition("child11", "something"));
TreeNodeMetadataDefinition startRoot = startTree[0];
startRoot.addChild(new StringMetadataDefinition("child2", "something"));
addValue(startRoot, "something", "", "child3", "child31", "child311");
addValue(startRoot, "something", "", "child3", "child31", "child312");
TreeNodeMetadataDefinition addRoot = createPath("something", "", "root", "child1", "child12");
addValue(addRoot, "something else", "", "child2");
addValue(addRoot, "something else", "", "child3", "child31", "child312");
addValue(addRoot, "something", "", "child3", "child31", "child313");
Collection<MetadataDefinition> returnedValues = startRoot.addChildren(addRoot.getChildren());
//Verify the tree
Metadata leaf = TreeStructureUtil.getPath(startRoot, "child1", "child11");
assertNotNull(leaf);
assertEquals("something", leaf.getValue());