@Test
public void testEquals() {

  DrmInitData drmInitData = new DrmInitData(DATA_1, DATA_2);
  // Basic non-referential equality test.
  DrmInitData testInitData = new DrmInitData(DATA_1, DATA_2);
  assertThat(testInitData).isEqualTo(drmInitData);
  assertThat(testInitData.hashCode()).isEqualTo(drmInitData.hashCode());
  // Basic non-referential equality test with non-referential scheme data.
  testInitData = new DrmInitData(DATA_1B, DATA_2B);
  assertThat(testInitData).isEqualTo(drmInitData);
  assertThat(testInitData.hashCode()).isEqualTo(drmInitData.hashCode());
  // Passing the scheme data in reverse order shouldn't affect equality.
  testInitData = new DrmInitData(DATA_2, DATA_1);
  assertThat(testInitData).isEqualTo(drmInitData);
  assertThat(testInitData.hashCode()).isEqualTo(drmInitData.hashCode());
  // Ditto.
  testInitData = new DrmInitData(DATA_2B, DATA_1B);
  assertThat(testInitData).isEqualTo(drmInitData);
  assertThat(testInitData.hashCode()).isEqualTo(drmInitData.hashCode());
  // Different number of tuples should affect equality.
  testInitData = new DrmInitData(DATA_1);
  assertThat(drmInitData).isNotEqualTo(testInitData);
  // Different data in one of the tuples should affect equality.
  testInitData = new DrmInitData(DATA_1, DATA_UNIVERSAL);
  assertThat(testInitData).isNotEqualTo(drmInitData);
}