AbstractTreeForTreeLayout implements
		TreeForTreeLayout<TreeNode> { @Override public Iterable<TreeNode> getChildren(TreeNode node) { return getChildrenList(node); } AbstractTreeForTreeLayout(TreeNode root); abstract TreeNode getParent(TreeNode node); abstract List<TreeNode> getChildrenList(TreeNode node); @Override TreeNode getRoot(); @Override boolean isLeaf(TreeNode node); @Override boolean isChildOfParent(TreeNode node, TreeNode parentNode); @Override Iterable<TreeNode> getChildren(TreeNode node); @Override Iterable<TreeNode> getChildrenReverse(TreeNode node); @Override TreeNode getFirstChild(TreeNode parentNode); @Override TreeNode getLastChild(TreeNode parentNode);  }
@Test public void testGetChildren() throws Exception { Iterable<StringTreeNode> children = tree.getChildren(root); Iterator<StringTreeNode> iter = children.iterator(); assertEquals(n1, iter.next()); assertEquals(n2, iter.next()); assertFalse(iter.hasNext()); }
@Test public void testGetChildren_leaf() throws Exception { try { Iterable<StringTreeNode> iter = tree.getChildren(n1); assertFalse(iter.iterator().hasNext()); } catch (Exception ex) { } }