### Question:
GTreeNode extends CoreGTreeNode implements Comparable<GTreeNode> { public List<GTreeNode> getChildren() { return Collections.unmodifiableList(children()); }  String getDisplayText(); abstract String getName(); abstract Icon getIcon(boolean expanded); abstract String getToolTip(); abstract boolean isLeaf(); @Override int compareTo(GTreeNode node); void addNode(GTreeNode node); void addNodes(List<GTreeNode> nodes); void addNode(int index, GTreeNode node); List<GTreeNode> getChildren(); int getChildCount(); GTreeNode getChild(String name); GTreeNode getChild(int index); int getNodeCount(); int getLeafCount(); int getIndexInParent(); int getIndexOfChild(GTreeNode node); TreePath getTreePath(); void removeAll(); void removeNode(GTreeNode node); void setChildren(List<GTreeNode> childList); boolean isAncestor(GTreeNode node); void valueChanged(Object newValue); boolean isEditable(); GTreeNode getRoot(); boolean isRoot(); GTreeNode filter(GTreeFilter filter, TaskMonitor monitor); int loadAll(TaskMonitor monitor); @Override int hashCode(); @Override boolean equals(Object obj); Stream<GTreeNode> stream(boolean depthFirst); Iterator<GTreeNode> iterator(boolean depthFirst); @Override String toString(); void fireNodeStructureChanged(GTreeNode node); void fireNodeChanged(GTreeNode parentNode, GTreeNode node); void expand(); void collapse(); boolean isExpanded();  }### Answer:
@Test public void testGetChildren() { List<GTreeNode> children = root.getChildren(); assertEquals(3, children.size()); assertEquals(node0, children.get(0)); assertEquals(node1, children.get(1)); assertEquals(node2, children.get(2)); }
@Test public void testGetChildrenIsImmutable() { List<GTreeNode> children = root.getChildren(); try { children.add(new TestNode("test")); fail("Should not have been able to modify list return from getChildren()"); } catch (Exception e) { } }