@Test
public void testDecodeTypicalWithInitializationData() throws IOException {

  byte[] headerBytes =
      TestUtil.getByteArray(ApplicationProvider.getApplicationContext(), TYPICAL_HEADER_ONLY);
  byte[] formatBytes =
      TestUtil.getByteArray(ApplicationProvider.getApplicationContext(), TYPICAL_FORMAT_ONLY);
  ArrayList<byte[]> initializationData = new ArrayList<>();
  initializationData.add(formatBytes);
  initializationData.add(headerBytes);
  SsaDecoder decoder = new SsaDecoder(initializationData);
  byte[] bytes =
      TestUtil.getByteArray(ApplicationProvider.getApplicationContext(), TYPICAL_DIALOGUE_ONLY);
  Subtitle subtitle = decoder.decode(bytes, bytes.length, false);
  assertThat(subtitle.getEventTimeCount()).isEqualTo(6);
  assertTypicalCue1(subtitle, 0);
  assertTypicalCue2(subtitle, 2);
  assertTypicalCue3(subtitle, 4);
}