private static void assertMp4WebvttSubtitleEquals(Subtitle sub,Cue... expectedCues){
  assertEquals(1,sub.getEventTimeCount());
  assertEquals(0,sub.getEventTime(0));
  List<Cue> subtitleCues=sub.getCues(0);
  assertEquals(expectedCues.length,subtitleCues.size());
  for (int i=0; i < subtitleCues.size(); i++) {
    List<String> differences=getCueDifferences(subtitleCues.get(i),expectedCues[i]);
    assertTrue("Cues at position " + i + " are not equal. Different fields are "+ Arrays.toString(differences.toArray()),differences.isEmpty());
  }
}

private static void assertMp4WebvttSubtitleEquals ( Subtitle sub , Cue ... expectedCues ) { assertEquals ( 1 , sub . getEventTimeCount ( ) ) ; assertEquals ( 0 , sub . getEventTime ( 0 ) ) ; List < Cue > subtitleCues = sub . getCues ( 0 ) ; assertEquals ( expectedCues . length , subtitleCues . size ( ) ) ; for ( int i = 0 ; i < subtitleCues . size ( ) ; i ++ ) { List < String > differences = getCueDifferences ( subtitleCues . get ( i ) , expectedCues [ i ] ) ; assertTrue ( "Cues at position " + i + " are not equal. Different fields are " + Arrays . toString ( differences . toArray ( ) ) , differences . isEmpty ( ) ) ; } }
asserts that the subtitle ' s cues ( which are all part of the event at t = 0 ) are equal to the expected cues .
