@Test
public void testMergeRequests_withDifferentIds_fails() {

  DownloadRequest request1 =
      new DownloadRequest(
          "id1",
          TYPE_DASH,
          uri1,
          /* streamKeys= */ Collections.emptyList(),
          /* customCacheKey= */ null,
          /* data= */ null);
  DownloadRequest request2 =
      new DownloadRequest(
          "id2",
          TYPE_DASH,
          uri2,
          /* streamKeys= */ Collections.emptyList(),
          /* customCacheKey= */ null,
          /* data= */ null);
  try {
    request1.copyWithMergedRequest(request2);
    fail();
  } catch (IllegalArgumentException e) {
    // Expected.
  }
}