AbstractSimpleWorkbenchPanelView extends AbstractDockingWorkbenchPanelView<P> { @Override public void addPart(final WorkbenchPartPresenter.View view) { if (listBar.getPartsSize() == 0) { listBar.addPart(view); } else { throw new RuntimeException("Uberfire Panel Invalid State: This panel support only one part."); } }  void enableDnd(); @Override void init(final P presenter); @Override P 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 void maximize(); @Override void unmaximize(); @Override void setElementId(String elementId); @Override Collection<PartDefinition> getParts();  }
@Test public void addAndGetPartsTest() { assertEquals(0, listBar.getPartsSize()); getViewToTest().addPart(mock(WorkbenchPartPresenter.View.class)); verify(listBar).addPart(any(WorkbenchPartPresenter.View.class)); assertEquals(1, listBar.getPartsSize()); }