### Question:
DecisionNavigatorTreeView implements DecisionNavigatorTreePresenter.View { @Override public void setup(final List<DecisionNavigatorItem> items) { this.items.appendChild(makeTree(items)); } @Inject  DecisionNavigatorTreeView(final HTMLDivElement view,
                                     final HTMLDivElement items,
                                     final ManagedInstance<TreeItem> managedInstance,
                                     final Elemental2DomUtil util); @Override void init(final DecisionNavigatorTreePresenter presenter); @Override HTMLElement getElement(); @Override void clean(); @Override void setup(final List<DecisionNavigatorItem> items); @Override void select(final String uuid); @Override void deselect();  }### Answer:
@Test public void testSetup() { final List<DecisionNavigatorItem> items = new ArrayList<>(); final Element element = mock(Element.class); doReturn(element).when(treeView).makeTree(items); treeView.setup(items); verify(this.items).appendChild(element); }
@Test public void testTreeItemSetup() { final DecisionNavigatorItem expectedItem = mock(DecisionNavigatorItem.class); final Element children = mock(Element.class); doNothing().when(treeItem).updateDataUUID(); doNothing().when(treeItem).updateTitle(); doNothing().when(treeItem).updateCSSClass(); doNothing().when(treeItem).updateLabel(); doNothing().when(treeItem).updateSubItems(children); final DecisionNavigatorTreeView.TreeItem actualTreeItem = treeItem.setup(expectedItem, children); final DecisionNavigatorItem actualItem = treeItem.getItem(); verify(treeItem).updateDataUUID(); verify(treeItem).updateTitle(); verify(treeItem).updateCSSClass(); verify(treeItem).updateLabel(); verify(treeItem).updateSubItems(children); assertEquals(treeItem, actualTreeItem); assertEquals(expectedItem, actualItem); }