RunWithAction extends AbstractRunnerActions { @Override public void actionPerformed(ActionEvent e) { runnerManagerPresenter.setActive(); tabContainer.showTab(locale.runnerTabTemplates()); } @Inject  RunWithAction(RunnerManagerPresenter runnerManagerPresenter,
                         @LeftPanel TabContainer tabContainer,
                         RunnerLocalizationConstant locale,
                         AppContext appContext,
                         RunnerResources resources); @Override void actionPerformed(ActionEvent e);  }
@Test public void actionShouldBePerformed() { when(locale.actionRunWith()).thenReturn(TEXT); when(locale.runnerTabTemplates()).thenReturn(TEXT); when(runActionPermit.isAllowed()).thenReturn(true); RunWithAction runWithAction = new RunWithAction(runnerManagerPresenter, tabContainer, locale, appContext, resources); runWithAction.actionPerformed(actionEvent); verify(locale, times(2)).actionRunWith(); verify(resources).runWith(); verify(runnerManagerPresenter).setActive(); verify(tabContainer).showTab(TEXT); }