PropertiesContainerPresenter implements PropertiesContainer,
                                                     PropertiesContainerView.ActionDelegate,
                                                     SelectionManager.SelectionChangeListener,
                                                     PropertiesPanelPresenter.RemovePanelListener { @Override public void onSelectionChanged(@NotNull Selection selection) { if (ENVIRONMENT.equals(selection)) { return; } Runner runner = selectionManager.getRunner(); if (runner == null) { return; } show(runner); } @Inject  PropertiesContainerPresenter(PropertiesContainerView view,
                                        WidgetFactory widgetFactory,
                                        SelectionManager selectionManager,
                                        AppContext appContext); @Override void show(@Nullable Runner runner); @Override void show(@Nullable Environment environment); @Override void reset(); @NotNull @Override IsWidget getView(); @Override void setVisible(boolean visible); @Override void go(AcceptsOneWidget container); @Override void onSelectionChanged(@NotNull Selection selection); @Override void onPanelRemoved(@NotNull Environment environment); @Override void setVisibleNoRunnerLabel(boolean visible);  }
@Test public void runnerSelectionShouldBeChangedAndShowPanel() { when(widgetFactory.createPropertiesPanel(runner)).thenReturn(currentPanel); when(selectionManager.getRunner()).thenReturn(runner); presenter.onSelectionChanged(RUNNER); verify(selectionManager).getRunner(); verify(widgetFactory).createPropertiesPanel(runner); verify(currentPanel).update(runner); verify(view).showWidget(currentPanel); }