### Question:
GTreeNode extends CoreGTreeNode implements Comparable<GTreeNode> { public void removeAll() { Swing.runNow(() -> doSetChildrenAndFireEvent(null)); }  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 testRemovingAllClearsParent() { root.removeAll(); assertNull(node0.getParent()); assertNull(node1.getParent()); assertNull(node2.getParent()); }
@Test public void testRemoveAll() { root.removeAll(); assertEquals(0, root.getChildCount()); assertEquals(1, events.size()); TestEvent event = events.get(0); assertEquals(EventType.STRUCTURE_CHANGED, event.type); assertEquals(root, event.node); }