Tree { public Node getTopNode() { return this.root; } Tree(String rootData); Node getTopNode();  }
@Test public void testMessage() throws IOException { Tree tree = new Tree("history"); tree.getTopNode().addChild("enable"); tree.getTopNode().addChild("disable"); assertEquals("history", tree.getTopNode().getCommand()); Node enable = tree.getTopNode().getChildren().get(0); assertEquals("history enable", enable.getCommand()); Node disable = tree.getTopNode().getChildren().get(1); assertEquals(disable.getCommand(), "history disable"); }