n.setString("label", "new node");
assertEquals(r.getLastChild(), n);
}
public void testRemoveChild() {
Tree tree = GraphLib.getBalancedTree(2,1);
int size = tree.getNodeCount();
Node r = tree.getRoot();
Node c = r.getFirstChild();
Edge e = c.getParentEdge();
assertEquals(true, tree.removeChild(c));
assertEquals(tree.getNodeCount(), size-1);
assertEquals(false, c.isValid());
assertEquals(false, e.isValid());
assertEquals(true, r.getFirstChild() != c);
}