### Question:
DNDListComponentView implements DNDListComponent.View { @Override public void clear() { removeChildren(getDragArea()); } @Inject  DNDListComponentView(final HTMLDivElement dragArea); @Override void init(final DNDListComponent presenter); @Override HTMLElement registerItem(final HTMLElement htmlElement); @Override void refreshItemsPosition(); @Override void refreshItemsHTML(); @Override void consolidateHierarchicalLevel(final boolean isElementsDraggedByUser); @Override void consolidateYPosition(); @Override void clear(); @Override Optional<HTMLElement> getPreviousElement(final Element reference); @Override void refreshDragAreaSize(); @Override HTMLDivElement getDragArea();  }### Answer:
@Test public void testClear() { final HTMLElement element = mock(HTMLElement.class); dragArea.firstChild = element; mockDragAreaWithChildren(element); when(dragArea.removeChild(element)).then(a -> { dragArea.firstChild = null; return element; }); view.clear(); verify(dragArea).removeChild(element); }