StaticWorkbenchPanelView extends AbstractWorkbenchPanelView<StaticWorkbenchPanelPresenter> { @Override public void addPart(final WorkbenchPartPresenter.View view) { if (panel.getPartView() == null) { panel.setPart(view); onResize(); } else { throw new RuntimeException("Uberfire Panel Invalid State: This panel support only one part."); } }  @Override Widget getWidget(); StaticFocusedResizePanel getPanel(); @Override void init(final StaticWorkbenchPanelPresenter presenter); @Override StaticWorkbenchPanelPresenter getPresenter(); @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 removePart(final PartDefinition part); @Override void setFocus(boolean hasFocus); @Override void onResize(); @Override Collection<PartDefinition> getParts();  }
@Test public void addPartToPanelWhenPartViewIsNull() { WorkbenchPartPresenter.View viewWbPartPresenter = mock(WorkbenchPartPresenter.View.class); when(panel.getPartView()).thenReturn(null); view.addPart(viewWbPartPresenter); verify(panel).setPart(viewWbPartPresenter); }