StatusAction extends AbstractRunnerAction { @Override public void stop() { if (webSocketChannel == null || runnerStatusHandler == null) { return; } webSocketUtil.unSubscribeHandler(webSocketChannel, runnerStatusHandler); checkHealthStatusAction.stop(); super.stop(); webSocketChannel = null; runnerStatusHandler = null; } @Inject  StatusAction(DtoUnmarshallerFactory dtoUnmarshallerFactory,
                        DtoFactory dtoFactory,
                        TerminalContainer terminalContainer,
                        WebSocketUtil webSocketUtil,
                        AppContext appContext,
                        EventBus eventBus,
                        RunnerLocalizationConstant locale,
                        RunnerManagerPresenter presenter,
                        RunnerUtil runnerUtil,
                        ConsoleContainer consoleContainer,
                        RunnerActionFactory actionFactory,
                        @NotNull @Assisted Notification notification,
                        ResourcesLockedActionPermit resourcesLockedActionPermit); @Override void perform(@NotNull final Runner runner); @Override void stop();  }
@Test public void shouldStopWhenRunnerStatusHandlerAndWebSocketChannelAreNull() { reset(logsAction); statusAction.stop(); verifyNoMoreInteractions(webSocketUtil, checkHealthStatusAction, logsAction); }