Tree extends Composite implements HasSelectionHandlers<T>,
                                                                   HasOpenHandlers<T>,
                                                                   HasCloseHandlers<T> { public void removeItem(final T item) { container.remove(item); } Tree();   Tree(final Supplier<FlowPanel> containerProvider); @Override HandlerRegistration addOpenHandler(final OpenHandler<T> handler); @Override HandlerRegistration addCloseHandler(final CloseHandler<T> handler); @Override HandlerRegistration addSelectionHandler(final SelectionHandler<T> handler); void clear(); void setSelectedItem(final T item,
                                final boolean fireEvents); T getSelectedItem(); void setSelectedItem(final T item); @SuppressWarnings("unchecked") T addItem(final T item); @SuppressWarnings("unchecked") T getItemByUuid(String uuid); T getItem(int index); void removeItem(final T item); Iterable<T> getItems(); boolean isEmpty();  }
@Test public void testRemoveItem() { final TreeItem item1 = mock(TreeItem.class); when(container.getWidgetCount()).thenReturn(1); when(container.getWidget(eq(0))).thenReturn(item1); testedTree.addItem(item1); testedTree.removeItem(item1); verify(container, times(1)).remove(item1); }