void () { assertThat(new LineTokenizer("a\nb\n\rc\rd\r\n").execute()).containsExactly("a\n", "b\n", "c\n", "d\n"); assertThat(new LineTokenizer("a\nb").execute()).containsExactly("a\n", "b"); LineTokenizer lineTokenizer = new LineTokenizer("a\n\r\r\nb"); assertThat(lineTokenizer.execute()).containsExactly("a\n", "\n", "b"); assertEquals("\n\r", lineTokenizer.getLineSeparator()); }