testFile.deleteOnExit();
BufferedWriter out = new BufferedWriter(new FileWriter(testFile));
MatrixVectorWriter writer = new MatrixVectorWriter(out);
MatrixInfo mi = new MatrixInfo(true, MatrixInfo.MatrixField.Real, MatrixInfo.MatrixSymmetry.General);
writer.printMatrixInfo(mi);
writer.printMatrixSize(new MatrixSize(mat.numColumns(), mat.numColumns(), mat.getData().length), mi);
int[] rows = buildRowArray(mat);
writer.printCoordinate(rows, mat.getColumnIndices(), mat.getData(), 1);
out.close();
CompRowMatrix newMat = new CompRowMatrix(new MatrixVectorReader(new FileReader(testFile)));
MatrixTestAbstract.assertEquals(mat, newMat);