TreeItem extends Composite { public void removeItem(final I treeItem) { checkContainerType(); content.remove(treeItem); } TreeItem(final Type type,
                    final String value,
                    final String label,
                    final IsWidget icon);   TreeItem(final Type type,
             final String value,
             final String label,
             final IsWidget icon,
             final Supplier<FlowPanel> contentProvider
    ); @SuppressWarnings("unchecked") I getItemByUuid(final String uuid); State getState(); void setState(final State state); void setState(final State state,
                         boolean fireEvents); void setState(final State state,
                         boolean propagateParent,
                         boolean fireEvents); Object getUserObject(); void setUserObject(final Object userObject); Type getType(); I addItem(final I item); I insertItem(final I item, final int index); I addItem(final Type type,
                     final String value,
                     final String label,
                     final IsWidget icon); I insertItem(final Type type,
                        final String value,
                        final String label,
                        final IsWidget icon,
                        final int index); void removeItems(); int getChildCount(); @SuppressWarnings("unchecked") I getChild(final int i); Iterable<I> getChildren(); @SuppressWarnings("unchecked") void remove(); void removeItem(final I treeItem); String getText(); String getUuid(); String getLabel(); boolean isSelected(); TreeItem getParentItem(); boolean isEmpty(); @Override boolean equals(final Object other); @Override int hashCode();  }
@Test public void testRemoveItem() { final TreeItem item = mock(TreeItem.class); when(item.getType()).thenReturn(TreeItem.Type.ITEM); testedRoot.addItem(item); testedRoot.removeItem(item); verify(content, times(1)).remove(eq(item)); }