### Question:
ForumStructureTreeModel extends ZkTreeModel<ForumStructureItem> { public void expandTree() { for(int i = 0; i < getRoot().getChildCount(); i++) { int[] path = new int[]{i}; if( !isPathOpened(path) ) { addOpenPath(path); } } } ForumStructureTreeModel(@Nonnull ZkTreeNode<ForumStructureItem> root); ForumStructureTreeModel putBranch(ForumStructureItem branchToPut, ForumStructureItem destinationSection); ForumStructureTreeModel moveBranchIfSectionChanged(PoulpeBranch branch); void addIfAbsent(PoulpeSection section); PoulpeSection getSelectedSection(); ZkTreeNode<ForumStructureItem> removeBranch(@Nullable PoulpeBranch branch); ZkTreeNode<ForumStructureItem> removeSection(@Nullable PoulpeSection section); List<PoulpeSection> getSections(); void onDropNode(TreeNode<ForumStructureItem> draggedNode,
                             TreeNode<ForumStructureItem> targetNode); boolean noEffectAfterDropNode(TreeNode<ForumStructureItem> draggedNode, 
            TreeNode<ForumStructureItem> targetNode); void expandTree(); void collapseTree();  }### Answer:
@Test public void expandTree() { sut.expandTree(); assertEquals(sut.getRoot().getChildCount(), sut.getOpenCount()); }
@Test public void expandTreeToAlreadyOpenedTree() { for (TreeNode<ForumStructureItem> child : sut.getRoot().getChildren()) { sut.addOpenObject(child); } sut.expandTree(); assertEquals(sut.getRoot().getChildCount(), sut.getOpenCount()); }
@Test public void expandTreeWithNoElements() { removeOpenPaths(); removeAllSections(); sut.expandTree(); assertEquals(0, sut.getOpenCount()); }