final Node root = map.getRoot();
final Node child1 = root.createChild("child 1");
final Node child2 = root.createChild("child 2");
final Node grandchild = child1.createChild("grandchild");
assertEquals("wrong count of children", 2, root.getChildren().size());
grandchild.moveTo(root, 1);
assertEquals("wrong position", child1, root.getChildren().get(0));
assertEquals("wrong position", grandchild, root.getChildren().get(1));
assertEquals("wrong position", child2, root.getChildren().get(2));
}