### Question:
FeedbackSubmissionTask extends BackgroundTask { @Override public int start(TaskStatusMonitor progress) { progress.startProgress(this.getDescription(), 1); try { submitter.submitFeedback(answers, feedbackUrl); progress.incrementProgress(1); } catch (Exception ex) { invoker.raiseVisibleException("An error occured while submitting feedback:\n" + ex.getMessage()); return BackgroundTask.RETURN_FAILURE; } return BackgroundTask.RETURN_SUCCESS; } FeedbackSubmissionTask(FeedbackAnswerSubmitter submitter, List<FeedbackAnswer> answers, String feedbackUrl,
            IdeUIInvoker invoker); @Override int start(TaskStatusMonitor progress); @Override void stop();  }### Answer:
@Test public void FeedbackAnswerSubmitterIsCalledWhenTaskIsRun() { task.start(mock(TaskStatusMonitor.class)); verify(submitter, times(1)).submitFeedback(answers, url); }
@Test public void FeedbackAnswerSubmitterReturnsSuccess() { assertEquals(BackgroundTask.RETURN_SUCCESS, task.start(mock(TaskStatusMonitor.class))); }
@Test public void feedbackAnswerSubmitterCallsErrorHandlerAndReturnsFalseOnException() { Mockito.doThrow(new RuntimeException("Error message here")).when(submitter).submitFeedback(answers, url); assertEquals(BackgroundTask.RETURN_FAILURE, task.start(mock(TaskStatusMonitor.class))); verify(invoker, times(1)).raiseVisibleException( "An error occured while submitting feedback:\nError message here"); }