### Question:
MarkReviewAsReadTask extends BackgroundTask { @Override public int start(TaskStatusMonitor progress) { progress.startProgress(this.getDescription(), 1); boolean success = server.markReviewAsRead(review); progress.incrementProgress(1); return success ? RETURN_SUCCESS : RETURN_FAILURE; } MarkReviewAsReadTask(ServerManager server, Review review); @Override int start(TaskStatusMonitor progress);  }### Answer:
@Test public void taskInitializesFeedbackCorrectly() { task.start(progress); verify(progress, times(1)).startProgress("Marking review as read", 1); }
@Test public void taskCallsServerAndIncrementsProgress() { task.start(progress); verify(server, times(1)).markReviewAsRead(review); verify(progress, times(1)).incrementProgress(1); }
@Test public void taskReturnsSuccessIfServerReturnsTrue() { when(server.markReviewAsRead(review)).thenReturn(true); assertEquals(BackgroundTask.RETURN_SUCCESS, task.start(progress)); }
@Test public void taskReturnsFailureIfServerReturnsFalse() { when(server.markReviewAsRead(review)).thenReturn(false); assertEquals(BackgroundTask.RETURN_FAILURE, task.start(progress)); }