### Question:
CSVParser { public boolean parse(InputStream is, String regex, Function<List<String>, Boolean> sink) throws IOException { return parse(is, Pattern.compile(regex), sink); } CSVParser(char separator, char quote, char escape, @Nullable String empty, boolean trim); static CSVParser csvParser(); static CSVParser tsvParser(); boolean parse(InputStream is, String regex, Function<List<String>, Boolean> sink); boolean parse(InputStream is, Pattern pattern, Function<List<String>, Boolean> sink); List<String> parse(String line); @Override String toString(); static final char EOT; static final char NUL; }### Answer:
@Test(expected = ParseException.class) public void testEolInsideQuotes1() throws ParseException { CSVParser csvParser = new CSVParser(',', '*', '/', null, false); csvParser.parse("*"); }
@Test(expected = ParseException.class) public void testEolInsideQuotes2() throws ParseException { CSVParser csvParser = new CSVParser(',', '*', '/', null, false); csvParser.parse("*x*y*z"); }
@Test(expected = ParseException.class) public void testEolInsideQuotes3() throws ParseException { CSVParser csvParser = new CSVParser(',', '*', '/', null, false); csvParser.parse("x*y*z*"); }
@Test(expected = ParseException.class) public void testEolAfterEscape() throws ParseException { CSVParser csvParser = new CSVParser(',', '*', '/', null, false); csvParser.parse("/"); }
@Test(expected = ParseException.class) public void testExtraneousCharAtEnd() throws ParseException { CSVParser csvParser = new CSVParser(',', '*', '/', null, false); csvParser.parse("*x*k"); }
@Test(expected = ParseException.class) public void testTrimExtraneousCharAtEnd() throws ParseException { CSVParser csvParser = new CSVParser(',', '*', '/', null, true); csvParser.parse("*x* k"); }
@Test(expected = ParseException.class) public void testExtraneousCharAtStart() throws ParseException { CSVParser csvParser = new CSVParser(',', '*', '/', null, false); csvParser.parse("k*x"); }