MultiScreenPartWidget extends Composite implements MultiPartWidget { @Override public boolean remove(final PartDefinition part) { final MultiScreenView screen = parts.remove(part); if (screen == null) { return false; } multiScreenViews.destroy(screen); content.removeChild(screen.getElement()); parts.values().stream().reduce((f, s) -> s).ifPresent(s -> s.show()); return true; }  @Override void setPresenter(final WorkbenchPanelPresenter presenter); @Override void setDndManager(WorkbenchDragAndDropManager dndManager); @Override void clear(); @Override void addPart(final WorkbenchPartPresenter.View view); @Override void changeTitle(final PartDefinition part,
                            final String title,
                            final IsWidget titleDecoration); @Override boolean selectPart(final PartDefinition part); @Override boolean remove(final PartDefinition part); @Override void setFocus(boolean hasFocus); @Override void addOnFocusHandler(final Command doWhenFocused); @Override int getPartsSize(); @Override Collection<PartDefinition> getParts(); @Override HandlerRegistration addBeforeSelectionHandler(final BeforeSelectionHandler<PartDefinition> handler); @Override HandlerRegistration addSelectionHandler(final SelectionHandler<PartDefinition> handler); @Override Widget asWidget(); @Override void onResize();  }
@Test public void testInvalidRemovePart() { boolean removed = widget.remove(partDefinition); assertFalse(removed); }