@Test public void submit_task_to_the_queue_and_ask_for_immediate_processing() { when(reportSubmitter.submit(eq(organizationKey), eq("my_project"), isNull(), eq("My Project"), anyMap(), any())).thenReturn(A_CE_TASK); Ce.SubmitResponse submitResponse = tester.newRequest() .setParam("projectKey", "my_project") .setParam("projectName", "My Project") .setPart("report", new ByteArrayInputStream("{binary}".getBytes()), "foo.bar") .setMethod("POST") .executeProtobuf(Ce.SubmitResponse.class); verify(reportSubmitter).submit(eq(organizationKey), eq("my_project"), isNull(), eq("My Project"), anyMap(), any()); assertThat(submitResponse.getTaskId()).isEqualTo("TASK_1"); assertThat(submitResponse.getProjectId()).isEqualTo(PROJECT_UUID); }