@Test
public void solveMtx() throws Exception {

    Matrix sol = new LUDecomposition(testMatrix)
        .solve(new DenseMatrix(testMatrix.rowSize(), testMatrix.rowSize()));
    assertEquals("Wrong solution matrix row size.", testMatrix.rowSize(), sol.rowSize());
    assertEquals("Wrong solution matrix column size.", testMatrix.rowSize(), sol.columnSize());
    for (int row = 0; row < sol.rowSize(); row++)
        for (int col = 0; col < sol.columnSize(); col++)
            assertEquals("Unexpected P value at (" + row + "," + col + ").",
                0d, sol.getX(row, col), 0.0000001d);
}