### Question:
DataTypeListView implements DataTypeList.View { @Override public void removeItem(final DataType dataType) { cleanSubTypes(dataType.getUUID()); final Optional<Element> dataTypeRow = Optional.ofNullable(getDataTypeRow(dataType)); dataTypeRow.ifPresent(this::removeDataTypeRow); showOrHideNoCustomItemsMessage(); } @Inject  DataTypeListView(final HTMLDivElement listItems,
                            final HTMLButtonElement addButton,
                            final HTMLButtonElement addButtonPlaceholder,
                            final HTMLDivElement dataTypeButton,
                            final HTMLDivElement placeholder,
                            final HTMLDivElement searchBarContainer,
                            final HTMLAnchorElement expandAll,
                            final HTMLAnchorElement collapseAll,
                            final HTMLDivElement noDataTypesFound,
                            final HTMLDivElement readOnlyMessage,
                            final HTMLButtonElement readOnlyMessageCloseButton,
                            final ScrollHelper scrollHelper,
                            final HTMLButtonElement importDataObjectButton,
                            final ImportDataObjectModal importDataObjectModal,
                            final Event<FlashMessage> flashMessageEvent,
                            final TranslationService translationService,
                            final @DMNEditor ReadOnlyProvider readOnlyProvider); @Override void init(final DataTypeList presenter); @Override void showOrHideNoCustomItemsMessage(); @Override void addSubItems(final DataType dataType,
                            final List<DataTypeListItem> listItems); @EventHandler("expand-all") void expandAll(final ClickEvent e); @EventHandler("collapse-all") void collapseAll(final ClickEvent e); @EventHandler({"add-button", "add-button-placeholder"}) void onAddButtonClick(final ClickEvent e); @SuppressWarnings("unused") @EventHandler("import-data-object-button") void onImportDataObjectClick(final ClickEvent e); @EventHandler("read-only-message-close-button") void onReadOnlyMessageCloseButtonClick(final ClickEvent e); @Override void removeItem(final DataType dataType); @Override void cleanSubTypes(final DataType dataType); @Override void insertBelow(final DataTypeListItem listItem,
                            final DataType reference); @Override void insertAbove(final DataTypeListItem listItem,
                            final DataType reference); @Override void showNoDataTypesFound(); @Override void showReadOnlyMessage(final boolean show); @Override HTMLDivElement getListItems(); @Override void showImportDataObjectButton(); @Override void hideImportDataObjectButton();  }### Answer:
@Test public void testRemoveItem() { final String uuid = "uuid"; final DataType dataType = mock(DataType.class); final Node parentNode = mock(Node.class); final Element dataTypeElement = makeElement(uuid); when(dataType.getUUID()).thenReturn(uuid); doReturn(dataTypeElement).when(view).getDataTypeRow(dataType); doNothing().when(view).cleanSubTypes(anyString()); dataTypeElement.parentNode = parentNode; view.removeItem(dataType); verify(presenter).removeItem(uuid); verify(view).cleanSubTypes(uuid); verify(parentNode).removeChild(dataTypeElement); verify(view).showOrHideNoCustomItemsMessage(); }