@Test
public void mergeRequest_nonExistingDownload_createsNewDownload() throws IOException {

  byte[] data = new byte[] {1, 2, 3, 4};
  DownloadRequest request =
      new DownloadRequest(
          "id",
          TYPE_PROGRESSIVE,
          Uri.parse("https://www.test.com/download"),
          asList(
              new StreamKey(/* periodIndex= */ 0, /* groupIndex= */ 1, /* trackIndex= */ 2),
              new StreamKey(/* periodIndex= */ 3, /* groupIndex= */ 4, /* trackIndex= */ 5)),
          /* customCacheKey= */ "key123",
          data);
  ActionFileUpgradeUtil.mergeRequest(
      request, downloadIndex, /* addNewDownloadAsCompleted= */ false, NOW_MS);
  assertDownloadIndexContainsRequest(request, Download.STATE_QUEUED);
}