### Question:
ParserCsv extends ParserByLine { @Override public List<String> parseRow(String line) throws ParseException { int realPos = 0; int pos = 0; boolean isDelimiter = false; StringBuilder sb = new StringBuilder(line); List<String> row = new ArrayList<String>(); while (pos < sb.length()) { char c = sb.charAt(pos); if (c == escapeChar) { realPos++; pos++; if (pos == sb.length()) { throw getParseException("Invalid escape char", realPos, line); } sb.delete(pos - 1, pos); realPos++; } else if (c == fieldTerminator) { realPos++; if (isDelimiter) { realPos++; pos++; if (pos == sb.length()) { sb.delete(pos - 1, pos); break; } if (sb.charAt(pos) == fieldSeparator) { row.add(sb.substring(0, pos - 1)); sb.delete(0, pos + 1); pos = 0; isDelimiter = false; continue; } throw getParseException("Invalid field delimiter", realPos, line); } if (pos != 0) { throw getParseException("Unterminated field", realPos, line); } sb.delete(0, 1); isDelimiter = true; continue; } else if (c == fieldSeparator) { realPos++; if (isDelimiter) { pos++; continue; } row.add(sb.substring(0, pos)); sb.delete(0, pos + 1); pos = 0; } else { realPos++; pos++; } } row.add(sb.toString()); return row; }  char getFieldSeparator(); void setFieldSeparator(char fieldSeparator); char getFieldTerminator(); void setFieldTerminator(char fieldTerminator); char getEscapeChar(); void setEscapeChar(char escapeChar); int getHeaderLineNo(); void setHeaderLineNo(int headerLineNo); int getSkipLines(); void setSkipLines(int skipLines); @Override void initialize(); @Override List<String> parseHeader(); @Override List<String> parseRow(String line); @Override ToStringHelper toStringHelper(Object self); static final char FIELD_SEPARATOR_DEFAULT; static final char FIELD_DELIMITER_DEFAULT; static final char ESCAPE_CHAR_DEFAULT; }### Answer:
@Test public void parseRow() throws ParseException { ParserCsv parser = new ParserCsv(); final List<String> row = Lists.newArrayList("qwe", "rty", "\"uio\"", "asd\"fgh\"jkl"); final String line = "\"qwe\",\"rty\",\"\\\"uio\\\"\",\"asd\\\"fgh\\\"jkl\""; List<String> rowParsed = parser.parseRow(line); assertEquals(MoreObjects.toStringHelper(this).add("row", row).toString(), MoreObjects.toStringHelper(this).add("row", rowParsed).toString()); }