@Test public void testRemoveAll() { TreeNode node = buildTestTree(); // Test remove when there are no children, should not alter tree. getNode(node, "C").removeAll(); Assert.assertEquals("Incorrect tree after remove of all children", "ABCDEFGH", treeToString(node)); // removeAll with children does not remove the `parent` node. getNode(node, "B").removeAll(); Assert.assertEquals("Incorrect tree after remove of all children", "ABCDG", treeToString(node)); }