@Test public void testRemoveItemByDataType() { final DataType dataType = mock(DataType.class); final String uuid = "uuid"; doNothing().when(dataTypeList).removeItem(anyString()); when(dataType.getUUID()).thenReturn(uuid); dataTypeList.removeItem(dataType); verify(dataTypeList).removeItem(uuid); verify(view).removeItem(dataType); }
void removeItem(final DataType dataType) { removeItem(dataType.getUUID()); view.removeItem(dataType); }
DataTypeList { void removeItem(final DataType dataType) { removeItem(dataType.getUUID()); view.removeItem(dataType); } }
DataTypeList { void removeItem(final DataType dataType) { removeItem(dataType.getUUID()); view.removeItem(dataType); } @Inject  DataTypeList(final View view,
                        final ManagedInstance<DataTypeListItem> listItems,
                        final DataTypeManager dataTypeManager,
                        final DataTypeSearchBar searchBar,
                        final DNDListComponent dndListComponent,
                        final DataTypeStackHash dataTypeStackHash,
                        final DNDDataTypesHandler dndDataTypesHandler,
                        final DataTypeListHighlightHelper highlightHelper,
                        final IsKogito isKogito); }
DataTypeList { void removeItem(final DataType dataType) { removeItem(dataType.getUUID()); view.removeItem(dataType); } @Inject  DataTypeList(final View view,
                        final ManagedInstance<DataTypeListItem> listItems,
                        final DataTypeManager dataTypeManager,
                        final DataTypeSearchBar searchBar,
                        final DNDListComponent dndListComponent,
                        final DataTypeStackHash dataTypeStackHash,
                        final DNDDataTypesHandler dndDataTypesHandler,
                        final DataTypeListHighlightHelper highlightHelper,
                        final IsKogito isKogito); HTMLElement getElement(); void setupItems(final List<DataType> dataTypes); Optional<DataTypeListItem> findItem(final DataType dataType); DNDListComponent getDNDListComponent(); List<DataTypeListItem> getItems(); void showNoDataTypesFound(); void showListItems(); void collapseAll(); void enableEditMode(final String dataTypeHash); void registerDataTypeListItemUpdateCallback(final Consumer<DataTypeListItem> onDataTypeListItemUpdate); Optional<DataTypeListItem> findItemByDataTypeHash(final String dataTypeHash); String calculateHash(final DataType dataType); void onDataTypeEditModeToggle(final @Observes DataTypeEditModeToggleEvent event); HTMLElement getListItems(); void importDataObjects(final List<DataObject> selectedDataObjects); void disableEditModeForChildren(final DataTypeListItem dataTypeListItem); List<String> getExistingDataTypesNames(); void highlightLevel(final DataType dataType); void highlightLevel(final Element element); void highlight(final Element element); void cleanLevelHighlightClass(); void cleanHighlightClass(); }
DataTypeList { void removeItem(final DataType dataType) { removeItem(dataType.getUUID()); view.removeItem(dataType); } @Inject  DataTypeList(final View view,
                        final ManagedInstance<DataTypeListItem> listItems,
                        final DataTypeManager dataTypeManager,
                        final DataTypeSearchBar searchBar,
                        final DNDListComponent dndListComponent,
                        final DataTypeStackHash dataTypeStackHash,
                        final DNDDataTypesHandler dndDataTypesHandler,
                        final DataTypeListHighlightHelper highlightHelper,
                        final IsKogito isKogito); HTMLElement getElement(); void setupItems(final List<DataType> dataTypes); Optional<DataTypeListItem> findItem(final DataType dataType); DNDListComponent getDNDListComponent(); List<DataTypeListItem> getItems(); void showNoDataTypesFound(); void showListItems(); void collapseAll(); void enableEditMode(final String dataTypeHash); void registerDataTypeListItemUpdateCallback(final Consumer<DataTypeListItem> onDataTypeListItemUpdate); Optional<DataTypeListItem> findItemByDataTypeHash(final String dataTypeHash); String calculateHash(final DataType dataType); void onDataTypeEditModeToggle(final @Observes DataTypeEditModeToggleEvent event); HTMLElement getListItems(); void importDataObjects(final List<DataObject> selectedDataObjects); void disableEditModeForChildren(final DataTypeListItem dataTypeListItem); List<String> getExistingDataTypesNames(); void highlightLevel(final DataType dataType); void highlightLevel(final Element element); void highlight(final Element element); void cleanLevelHighlightClass(); void cleanHighlightClass();  }