### Question:
DownloadDispatcher { public void execute(DownloadTask task) { Util.d(TAG, "execute: " + task); final DownloadCall call; synchronized (this) { if (inspectCompleted(task)) return; if (inspectForConflict(task)) return; call = DownloadCall.create(task, false, store); runningSyncCalls.add(call); } syncRunCall(call); } DownloadDispatcher();   DownloadDispatcher(List<DownloadCall> readyAsyncCalls,
                       List<DownloadCall> runningAsyncCalls,
                       List<DownloadCall> runningSyncCalls,
                       List<DownloadCall> finishingCalls); void setDownloadStore(@NonNull DownloadStore store); void enqueue(DownloadTask[] tasks); void enqueue(DownloadTask task); void execute(DownloadTask task); @SuppressWarnings("PMD.ForLoopsMustUseBraces") void cancelAll(); void cancel(IdentifiedTask[] tasks); boolean cancel(IdentifiedTask task); boolean cancel(int id); @Nullable synchronized DownloadTask findSameTask(DownloadTask task); synchronized boolean isRunning(DownloadTask task); synchronized boolean isPending(DownloadTask task); synchronized void flyingCanceled(DownloadCall call); synchronized void finish(DownloadCall call); synchronized boolean isFileConflictAfterRun(@NonNull DownloadTask task); static void setMaxParallelRunningCount(int maxParallelRunningCount);  }### Answer:
@Test public void execute() { final DownloadTask mockTask = mockTask(); dispatcher.execute(mockTask); ArgumentCaptor<DownloadCall> callCaptor = ArgumentCaptor.forClass(DownloadCall.class); verify(runningSyncCalls).add(callCaptor.capture()); final DownloadCall call = callCaptor.getValue(); assertThat(call.task).isEqualTo(mockTask); verify(dispatcher).syncRunCall(call); }