CsvExporter { public void addRow(List<?> data) { addRow(data.toArray(new Object[data.size()])); } CsvExporter(int numCols, String... headers); void addRow(List<?> data); void addRow(Object... data); void clear(); String export();  }
@Test(expected = NullPointerException.class) public void testNullListRow() { exporter = new CsvExporter(1, "abc"); exporter.addRow((List) null); }
@Test(expected = NullPointerException.class) public void testNullVarargsRow() { exporter = new CsvExporter(1, "abc"); exporter.addRow((Object[]) null); }
@Test(expected = IllegalArgumentException.class) public void testNullDataElement() { exporter = new CsvExporter(2, "foo", "bar"); exporter.addRow(null, null); }