OtfSegmentParser { public List<OtfSegment> parse(String url) { return parseInt(() -> parseInt(url)); } OtfSegmentParser(boolean cached); List<OtfSegment> parse(String url); List<OtfSegment> parse(Reader stream); List<OtfSegment> parseInt(Callable<List<OtfSegment>> callable);  }
@Test public void parseTest() { InputStream inputStream = TestHelpers.openResource("videoplayback.mp4"); BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream)); OtfSegmentParser otfSegmentParser = new OtfSegmentParser(true); List<OtfSegment> list = otfSegmentParser.parse(bufferedReader); assertThat(list).isNotEmpty().hasSize(8); assertThat(list.get(0).getRepeatCount()).isEqualTo("2"); }