### Question:
ProjectUploader { public void handleSubmissionResult(StopStatus stopStatus) { result = server.getSubmissionResult(response.submissionUrl); while (result.getStatus() == SubmissionResult.Status.PROCESSING) { if (!waitForServer(stopStatus)) { result = null; return; } result = server.getSubmissionResult(response.submissionUrl); } } ProjectUploader(ServerManager server); void setProject(Project project); void zipProjects(); void handleSubmissionResponse(); void handleSubmissionResult(StopStatus stopStatus); SubmissionResponse getResponse(); SubmissionResult getResult(); Project getProject(); void setAsPaste(String pasteMessage); void setAsRequest(String requestMessage);  }### Answer:
@Test public void getSubmissionResultHasCorrectArgumentInHandleSubmissionResult() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException, URISyntaxException { URI uri = new URI("http: SubmissionResponse response = new SubmissionResponse(uri, uri); setResponse(response); when(result.getStatus()).thenReturn(SubmissionResult.Status.PROCESSING); uploader.handleSubmissionResult(new StopStatus() { @Override public boolean mustStop() { return true; } }); verify(server, times(1)).getSubmissionResult(uri); }
@Test public void handleSubmissionResponseCallsServerGetSubmissionResult() throws URISyntaxException, NoSuchFieldException, IllegalAccessException { URI uri = new URI("http: SubmissionResponse response = new SubmissionResponse(uri, uri); setResponse(response); uploader.handleSubmissionResult(new StopStatus() { @Override public boolean mustStop() { return false; } }); verify(server, times(1)).getSubmissionResult(response.submissionUrl); }