CsvWriter { public void write(String[][] lines) { for (int i = 0; i < lines.length; i++) writeLine(lines[i]); } CsvWriter(); void write(String[][] lines);  }
@Test public void testWriter() { CsvWriter writer = new CsvWriter(); String[][] lines = new String[][] { new String[] {}, new String[] { "only one field" }, new String[] { "two", "fields" }, new String[] { "", "contents", "several words included" }, new String[] { ",", "embedded , commas, included", "trailing comma," }, new String[] { "\"", "embedded \" quotes", "multiple \"\"\" quotes\"\"" }, new String[] { "mixed commas, and \"quotes\"", "simple field" } }; writer.write(lines); }