### Question:
BranchEditingDialog { void renewSectionsFromTree(@Nonnull ForumStructureTreeModel forumTree) { this.sectionList.clear(); this.sectionList.addAll(forumTree.getSections()); } BranchEditingDialog(GroupService groupService, ForumStructureVm forumStructureVm,
                               ForumStructureService forumStructureService); @GlobalCommand @NotifyChange({SHOW_DIALOG, EDITED_BRANCH, MODERATING_GROUP, CANDIDATES_TO_MODERATE}) void showBranchDialog(@BindingParam("selectedBranch") PoulpeBranch selectedBranch); @GlobalCommand @NotifyChange({SHOW_DIALOG, EDITED_BRANCH, MODERATING_GROUP, CANDIDATES_TO_MODERATE}) void showCreateBranchDialog(); @Command @NotifyChange(SHOW_DIALOG) void saveBranch(); void closeDialog(); boolean isShowDialog(); void selectSection(PoulpeSection section); ListModelList<PoulpeSection> getSectionList(); PoulpeBranch getEditedBranch(); List<Group> getCandidatesToModerate(); @NotNull(message = "{branch.moderating_group.not_null_constraint}") Group getModeratingGroup(); void setModeratingGroup(Group moderatingGroup);  }### Answer:
@Test(dataProvider = "provideTreeModelWithSectionsAndBranches") public void testRenewSectionsFromTree(ForumStructureTreeModel treeModel) throws Exception { sut.renewSectionsFromTree(treeModel); assertEquals(sut.getSectionList().size(), treeModel.getRoot().getChildCount()); }