@Test
public void solveVec() throws Exception {

    Vector sol = new LUDecomposition(testMatrix)
        .solve(new DenseVector(testMatrix.rowSize()));
    assertEquals("Wrong solution vector size.", testMatrix.rowSize(), sol.size());
    for (int i = 0; i < sol.size(); i++)
        assertEquals("Unexpected value at index " + i, 0d, sol.getX(i), 0.0000001d);
}