### Question:
ForumStructureTreeModel extends ZkTreeModel<ForumStructureItem> { public ForumStructureTreeModel moveBranchIfSectionChanged(PoulpeBranch branch) { ZkTreeNode<ForumStructureItem> branchNode = (ZkTreeNode<ForumStructureItem>) find( new ForumStructureItem(branch)); ZkTreeNode<ForumStructureItem> sectionNode = (ZkTreeNode<ForumStructureItem>) find( new ForumStructureItem(branch.getSection())); if (branchNode == null) { branchNode = new ZkTreeNode<ForumStructureItem>(new ForumStructureItem(branch)); } branchNode.moveTo(sectionNode); setSelectedNode(branchNode); addOpenObject(sectionNode); return this; } 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 moveBranchIfSectionChanged() { TreeNode<ForumStructureItem> branchNode = sut.getChild(1, 0); TreeNode<ForumStructureItem> sectionNode = sut.getChild(0); PoulpeBranch branch = branchNode.getData().getBranchItem(); PoulpeSection section = sectionNode.getData().getSectionItem(); branch.setSection(section); sut.moveBranchIfSectionChanged(branch); assertTrue(sut.getChild(0).getChildren().contains(branchNode)); assertFalse(sut.getChild(1).getChildren().contains(branchNode)); assertEquals(sut.getSelectedData(1), branchNode.getData()); assertTrue(sut.getOpenObjects().contains(sectionNode)); }