WebvttSubtitle implements Subtitle { @Override public int getEventTimeCount() { return sortedCueTimesUs.length; } WebvttSubtitle(List<WebvttCue> cues); @Override int getNextEventTimeIndex(long timeUs); @Override int getEventTimeCount(); @Override long getEventTime(int index); @Override List<Cue> getCues(long timeUs);  }
@Test public void testEventCount() { assertThat(emptySubtitle.getEventTimeCount()).isEqualTo(0); assertThat(simpleSubtitle.getEventTimeCount()).isEqualTo(4); assertThat(overlappingSubtitle.getEventTimeCount()).isEqualTo(4); assertThat(nestedSubtitle.getEventTimeCount()).isEqualTo(4); }