BuildProcessController implements ProcessController { @Override public boolean isProcessStopped() { return !myProgressIndicator.isRunning(); } BuildProcessController(@NotNull ExternalSystemTaskId taskId,
                         @NotNull BuildStopper buildStopper,
                         @NotNull ProgressIndicator progressIndicator); @Override void stopProcess(); @Override boolean isProcessStopped();  }
@Test public void isProcessStoppedWithRunningProgressIndicator() throws Exception { when(myProgressIndicator.isRunning()).thenReturn(true); assertFalse(myController.isProcessStopped()); }
@Test public void isProcessStoppedWithNotRunningProgressIndicator() throws Exception { when(myProgressIndicator.isRunning()).thenReturn(false); assertTrue(myController.isProcessStopped()); }