DefaultTreeForTreeLayout extends
		AbstractTreeForTreeLayout<TreeNode> { public boolean hasNode(TreeNode node) { return node == getRoot() || parents.containsKey(node); } DefaultTreeForTreeLayout(TreeNode root); @Override TreeNode getParent(TreeNode node); @Override List<TreeNode> getChildrenList(TreeNode node); boolean hasNode(TreeNode node); void addChild(TreeNode parentNode, TreeNode node); void addChildren(TreeNode parentNode, TreeNode... nodes);  }
@Test public void testHasNode() throws Exception { assertTrue(tree.hasNode(root)); assertTrue(tree.hasNode(n1)); assertTrue(tree.hasNode(n2)); assertFalse(tree.hasNode("wrong node")); }