ListBarWidgetImpl extends ResizeComposite implements ListBarWidget { void resizePanelBody() { if (currentPart != null && !currentPart.getK1().isSelectable()) { content.getElement().getStyle().setProperty("height", "100%"); } else { content.getElement().getStyle().setProperty("height", "calc(100% - " + header.getOffsetHeight() + "px)"); } }  @Override void enableDnd(); @Override void disableDnd(); @Override void setPresenter(final WorkbenchPanelPresenter presenter); @Override void setDndManager(final 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(final boolean hasFocus); @Override void addOnFocusHandler(final Command command); @Override int getPartsSize(); @Override Collection<PartDefinition> getParts(); @Override HandlerRegistration addBeforeSelectionHandler(final BeforeSelectionHandler<PartDefinition> handler); @Override HandlerRegistration addSelectionHandler(final SelectionHandler<PartDefinition> handler); @Override void onResize(); @Override MaximizeToggleButtonPresenter getMaximizeButton(); @Override boolean isDndEnabled(); @Override void enableClosePart(); @Override void disableClosePart(); @Override void disableExpandPart();  }
@Test public void resizePanelBodyForUnselectablePart() { final PartDefinitionImpl partDefinition = new PartDefinitionImpl(mock(PlaceRequest.class)); partDefinition.setSelectable(false); listBar.currentPart = new Pair<>(partDefinition, mock(FlowPanel.class)); listBar.resizePanelBody(); verify(listBar.content.getElement().getStyle()).setProperty("height", "100%"); }
@Test public void resizePanelBodyForSelectablePart() { final PartDefinitionImpl partDefinition = new PartDefinitionImpl(mock(PlaceRequest.class)); partDefinition.setSelectable(true); listBar.currentPart = new Pair<>(partDefinition, mock(FlowPanel.class)); doReturn(10).when(listBar.header).getOffsetHeight(); listBar.resizePanelBody(); verify(listBar.content.getElement().getStyle()).setProperty("height", "calc(100% - 10px)"); }