@Test
public void testSolver() throws Exception {

  File testData = getTestTempDir("testdata");
  DistributedRowMatrix matrix = new TestDistributedRowMatrix().randomDistributedMatrix(
      10, 10, 10, 10, 10.0, true, testData.getAbsolutePath());
  matrix.setConf(getConfiguration());
  Vector vector = randomVector(matrix.numCols(), 10.0);
  
  DistributedConjugateGradientSolver solver = new DistributedConjugateGradientSolver();
  Vector x = solver.solve(matrix, vector);
  Vector solvedVector = matrix.times(x);    
  double distance = Math.sqrt(vector.getDistanceSquared(solvedVector));
  assertEquals(0.0, distance, EPSILON);
}