### Question:
DownloadSerialQueue extends DownloadListener2 implements Runnable { public synchronized void resume() { if (!paused) { Util.w(TAG, "require resume this queue(remain " + taskList.size() + "), but it is" + " still running"); return; } paused = false; if (!taskList.isEmpty() && !looping) { looping = true; startNewLooper(); } } DownloadSerialQueue();   DownloadSerialQueue(DownloadListener listener, ArrayList<DownloadTask> taskList);  DownloadSerialQueue(DownloadListener listener); void setListener(DownloadListener listener); synchronized void enqueue(DownloadTask task); synchronized void pause(); synchronized void resume(); int getWorkingTaskId(); int getWaitingTaskCount(); synchronized DownloadTask[] shutdown(); @Override void run(); @Override void taskStart(@NonNull DownloadTask task); @Override synchronized void taskEnd(@NonNull DownloadTask task, @NonNull EndCause cause,
                                     @Nullable Exception realCause);  }### Answer:
@Test public void resume() { serialQueue.paused = true; serialQueue.looping = false; doNothing().when(serialQueue).startNewLooper(); taskList.add(mock(DownloadTask.class)); serialQueue.resume(); verify(serialQueue).startNewLooper(); assertThat(serialQueue.paused).isFalse(); assertThat(serialQueue.looping).isTrue(); }