### Question:
ImportDataObjectModalView implements ImportDataObjectModal.View { void removeTreeList() { if (itemsContainer.contains(treeList.getElement())) { itemsContainer.removeChild(treeList.getElement()); } } @Inject  ImportDataObjectModalView(final HTMLDivElement header,
                                     final HTMLDivElement body,
                                     final HTMLDivElement footer,
                                     final TreeList treeList,
                                     @Named("span") final HTMLElement noteText,
                                     final HTMLLabelElement noteLabel,
                                     final HTMLDivElement itemsContainer,
                                     final HTMLAnchorElement clearSelection,
                                     final ManagedInstance<TreeListItem> items,
                                     final HTMLButtonElement buttonImport,
                                     final HTMLButtonElement buttonCancel,
                                     final HTMLDivElement warningContainer); @PostConstruct void setup(); @Override String getHeader(); @Override HTMLElement getBody(); @Override HTMLElement getFooter(); @Override void init(final ImportDataObjectModal presenter); @Override void addItems(final List<DataObject> dataObjects); @Override void clear(); @Override void showDataTypeWithSameNameWarning(); @Override void hideDataTypeWithSameNameWarning();  }### Answer:
@Test public void testRemoveTreeList() { when(itemsContainer.contains(treeListElement)).thenReturn(true); view.removeTreeList(); verify(itemsContainer).removeChild(treeListElement); }
@Test public void testRemoveTreeListWhenIsNotPresent() { when(itemsContainer.contains(treeListElement)).thenReturn(false); view.removeTreeList(); verify(itemsContainer, never()).removeChild(treeListElement); }