@Test
@SuppressWarnings("deprecation")
public void testGetByUuid() {

  // Basic matching.
  DrmInitData testInitData = new DrmInitData(DATA_1, DATA_2);
  assertThat(testInitData.get(WIDEVINE_UUID)).isEqualTo(DATA_1);
  assertThat(testInitData.get(PLAYREADY_UUID)).isEqualTo(DATA_2);
  assertThat(testInitData.get(UUID_NIL)).isNull();
  // Basic matching including universal data.
  testInitData = new DrmInitData(DATA_1, DATA_2, DATA_UNIVERSAL);
  assertThat(testInitData.get(WIDEVINE_UUID)).isEqualTo(DATA_1);
  assertThat(testInitData.get(PLAYREADY_UUID)).isEqualTo(DATA_2);
  assertThat(testInitData.get(UUID_NIL)).isEqualTo(DATA_UNIVERSAL);
  // Passing the scheme data in reverse order shouldn't affect equality.
  testInitData = new DrmInitData(DATA_UNIVERSAL, DATA_2, DATA_1);
  assertThat(testInitData.get(WIDEVINE_UUID)).isEqualTo(DATA_1);
  assertThat(testInitData.get(PLAYREADY_UUID)).isEqualTo(DATA_2);
  assertThat(testInitData.get(UUID_NIL)).isEqualTo(DATA_UNIVERSAL);
  // Universal data should be returned in the absence of a specific match.
  testInitData = new DrmInitData(DATA_1, DATA_UNIVERSAL);
  assertThat(testInitData.get(WIDEVINE_UUID)).isEqualTo(DATA_1);
  assertThat(testInitData.get(PLAYREADY_UUID)).isEqualTo(DATA_UNIVERSAL);
  assertThat(testInitData.get(UUID_NIL)).isEqualTo(DATA_UNIVERSAL);
}