@Test
public void setAndClearSingleDownloadStopReason() throws Throwable {

  DownloadRunner runner = new DownloadRunner(uri1).postDownloadRequest();
  TaskWrapper task = runner.getTask();
  task.assertDownloading();
  runOnMainThread(() -> downloadManager.setStopReason(task.taskId, APP_STOP_REASON));
  task.assertStopped();
  runOnMainThread(() -> downloadManager.setStopReason(task.taskId, Download.STOP_REASON_NONE));
  runner.getDownloader(1).assertStarted().unblock();
  downloadManagerListener.blockUntilTasksCompleteAndThrowAnyDownloadError();
}