### Question:
CsvLexer { public CsvToken next() throws IOException { if (c == EOF) { return CsvToken.EOF; } else if (c == separator) { consume(); return CsvToken.SEPARATOR; } else if (c == LF) { consume(); return CsvToken.LINE_BREAK; } else if (c == '"') { final StringBuilder buf = new StringBuilder(); while (true) { consume(); if (c == '"') { consume(); if (c != '"') { break; } } buf.append(c); } return CsvToken.field(buf.toString()); } final StringBuilder buf = new StringBuilder(); do { buf.append(c); consume(); } while (c != EOF && c != separator && c != LF); return CsvToken.field(buf.toString()); } CsvLexer(final Reader in, final char separator);  CsvLexer(final Reader in); CsvToken next();  }### Answer:
@Test void test() throws Exception { final var s = "foo,\"b\"\"a,r\"\r\nbaz,qux\r\n,\"\""; final var in = new StringReader(s); final var lexer = new CsvLexer(in); assertEquals(CsvToken.field("foo"), lexer.next()); assertEquals(CsvToken.SEPARATOR, lexer.next()); assertEquals(CsvToken.field("b\"a,r"), lexer.next()); assertEquals(CsvToken.LINE_BREAK, lexer.next()); assertEquals(CsvToken.field("baz"), lexer.next()); assertEquals(CsvToken.SEPARATOR, lexer.next()); assertEquals(CsvToken.field("qux"), lexer.next()); assertEquals(CsvToken.LINE_BREAK, lexer.next()); assertEquals(CsvToken.SEPARATOR, lexer.next()); assertEquals(CsvToken.field(""), lexer.next()); assertEquals(CsvToken.EOF, lexer.next()); }