### Question:
DataTypeListItem { void hideTooltips() { final String selector = ".tooltip"; final NodeList<Element> tooltips = getDataTypeList().getListItems().querySelectorAll(selector); for (int i = 0; i < tooltips.length; i++) { ElementHelper.remove(tooltips.getAt(i)); } } @Inject  DataTypeListItem(final View view,
                            final DataTypeSelect dataTypeSelectComponent,
                            final DataTypeConstraint dataTypeConstraintComponent,
                            final SmallSwitchComponent dataTypeListComponent,
                            final DataTypeManager dataTypeManager,
                            final DataTypeConfirmation confirmation,
                            final DataTypeNameFormatValidator nameFormatValidator,
                            final Event<DataTypeEditModeToggleEvent> editModeToggleEvent,
                            final Event<DataTypeChangedEvent> dataTypeChangedEvent); void init(final DataTypeList dataTypeList); DataType getDataType(); boolean isReadOnly(); int getLevel(); boolean isCollapsed(); void expand(); void collapse(); void enableEditMode(); void disableEditMode(); void saveAndCloseEditMode(); void remove(); Command removeItem(); Command destroy(); void destroyWithDependentTypes(); void destroyWithoutDependentTypes(); String getType(); void insertFieldAbove(); String insertFieldAbove(final DataType dataType); void insertFieldBelow(); String insertFieldBelow(final DataType dataType); void insertNestedField(); void insertNestedField(final DataType newDataType); HTMLElement getDragAndDropElement(); void highlightLevel(final DataType dataType);  }### Answer:
@Test public void testHideTooltips() { final HTMLElement listItems = mock(HTMLElement.class); final NodeList<Element> tooltips = spy(new NodeList<>()); final Element element0 = mock(Element.class); final Element element1 = mock(Element.class); doReturn(element0).when(tooltips).getAt(0); doReturn(element1).when(tooltips).getAt(1); tooltips.length = 2; element0.parentNode = listItems; element1.parentNode = listItems; doReturn(listItems).when(dataTypeList).getListItems(); doReturn(tooltips).when(listItems).querySelectorAll(".tooltip"); listItem.hideTooltips(); verify(listItems).removeChild(element0); verify(listItems).removeChild(element1); }