HistoryPresenter implements HistoryPanel, RunnerWidget.ActionDelegate, HistoryView.ActionDelegate { @Override public void addRunner(@NotNull Runner runner) { if (runnerWidgets.get(runner) != null) { return; } selectionManager.setRunner(runner); RunnerWidget runnerWidget = widgetFactory.createRunner(); runnerWidget.setDelegate(this); runnerWidget.update(runner); runnerWidgets.put(runner, runnerWidget); view.addRunner(runnerWidget); selectRunner(runner); } @Inject  HistoryPresenter(HistoryView view,
                            WidgetFactory widgetFactory,
                            SelectionManager selectionManager,
                            RunnerManagerView runnerManager,
                            ConsoleContainer consolePresenter,
                            TerminalContainer terminalContainer); @Override void addRunner(@NotNull Runner runner); @Override void update(@NotNull Runner runner); @Override void selectRunner(@NotNull Runner runner); @Override void clear(); @NotNull @Override IsWidget getView(); @Override void setVisible(boolean visible); @Override void go(@NotNull AcceptsOneWidget container); @Override boolean isRunnerExist(@NotNull Runner runner); @Override void removeRunnerWidget(@NotNull Runner runner); @Override void cleanInactiveRunners();  }
@Test public void runnerShouldNotBeAddedIfWidgetForThisRunningIsAlreadyCreated() { historyPresenter.addRunner(runner); reset(selectionManager, widgetFactory, view, runnerWidget); historyPresenter.addRunner(runner); verifyNoMoreInteractions(selectionManager, widgetFactory, view, runnerWidget); }