### Question:
CSVMatrixWriter implements IMatrixWriter { @Override public void writeCells(SimpleCell[] cells) throws IOException { for (SimpleCell sc : cells) { writer.write(sc != null ? sc.getValue() : null); } writer.endRecord(); } CSVMatrixWriter(String fileName);  CSVMatrixWriter(String fileName, char delimiter);  CSVMatrixWriter(String fileName, String encoding);  CSVMatrixWriter(OutputStream outputStream);  CSVMatrixWriter(OutputStream outputStream, char delimiter);  CSVMatrixWriter(OutputStream outputStream, char delimiter, String encoding);  CSVMatrixWriter(OutputStream outputStream, char delimiter, Charset charset); @Override void close(); @Override void writeCells(SimpleCell[] cells); @Override void write(String[] strings); @Override void flush();  }### Answer:
@Test public void testWriteCells() { try (CSVMatrixWriter e = new CSVMatrixWriter(new FileOutputStream(tmpFile))) { SimpleCell[] cells = new SimpleCell[10]; for (int i = 0; i < 10; i++) { for (int j = 0; j < 10; j++) { byte[] forString = new byte[32]; new Random().nextBytes(forString); cells[j] = new SimpleCell(new String(forString)); } e.writeCells(cells); } } catch (Exception ex) { fail(ex.getMessage()); } if (tmpFile.exists()) { if (tmpFile.length() == 0L) { fail("File is empty"); } } else { fail("File not exists!"); } }