### Question:
Tree { public boolean checkExist(Node tnode, String text) { boolean exist = false; if (tnode.getChildren() == null) { return false; } for (Node node : tnode.getChildren()) { exist |= checkExist(node, text); } return exist; } Tree();  Tree(String text); void createTree(List<Node> nodes); void middlePrint(Node tnode); @Transient List<Node> getLeafList(); String getHtml(Node tnode); boolean checkExist(Node tnode, String text); Node getRoot(); void setRoot(Node root);  }### Answer:
@Test public void testCheckExist() { final Tree tree = new Tree(); final Node node = new Node(); node.addChild(new Node()); assertFalse(tree.checkExist(node, null)); }