### Question:
CSVMatrixWriter implements IMatrixWriter { @Override public void write(String[] strings) throws IOException { writer.writeRecord(strings); if (strings == null || strings.length == 0) { 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 testWrite() { try (CSVMatrixWriter e = new CSVMatrixWriter(fileName)) { String[] cells = new String[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 String(forString); } e.write(cells); } } catch (Exception ex) { fail(ex.getMessage()); } if (tmpFile.exists()) { if (tmpFile.length() == 0L) { fail("File is empty"); } } else { fail("File not exists!"); } }