void () { InfiniteTreeModel model = new InfiniteTreeModel(); myTree = createTree(model); TreePath rootPath = new TreePath(model.getRoot()); myTree.setSelectionPath(rootPath); myTree.collapsePath(rootPath); TreeExpandCollapse.expandAll(myTree); checkExpanded(rootPath); TreeExpandCollapse.expandAll(myTree); }