assertEquals(Arrays.asList("x"), record.get("column0"));
}
private void split(List expected, String line, char separator, boolean isQuoted, boolean addEmptyStrings) throws IOException {
Record record = new Record();
CSVTokenizer tokenizer;
if (isQuoted) {
tokenizer = new QuotedCSVTokenizer(separator, false, addEmptyStrings, new ArrayList<String>(), 1000, false, '"');
tokenizer.tokenizeLine(line, new BufferedReader(new StringReader("")), record);
} else {
tokenizer = new SimpleCSVTokenizer(separator, false, addEmptyStrings, new ArrayList<String>());
tokenizer.tokenizeLine(line, null, record);
}
for (int i = 0; i < expected.size(); i++) {
assertEquals(expected.get(i), record.getFirstValue("column" + i));
}
assertTrue(record.getFields().asMap().size() <= expected.size());