MultiScreenPartWidget extends Composite implements MultiPartWidget { @Override public void onResize() { parts.values().stream().filter(s -> s.isVisible()).forEach(s -> s.onResize()); }  @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 testOnResize(){ when(multiScreenView.isVisible()).thenReturn(true, false); widget.addPart(view); widget.onResize(); widget.onResize(); verify(multiScreenView, times(2)).isVisible(); verify(multiScreenView).onResize(); }