@Test
public void testTranspose() throws Exception {

  DistributedRowMatrix m = randomDistributedMatrix(10, 9, 5, 4, 1.0, false);
  m.setConf(getConfiguration());
  DistributedRowMatrix mt = m.transpose();
  mt.setConf(getConfiguration());
  Path tmpPath = getTestTempDirPath();
  m.setOutputTempPathString(tmpPath.toString());
  Path tmpOutPath = new Path(tmpPath, "/tmpOutTranspose");
  mt.setOutputTempPathString(tmpOutPath.toString());
  HadoopUtil.delete(getConfiguration(), tmpOutPath);
  DistributedRowMatrix mtt = mt.transpose();
  assertEquals(m, mtt, EPSILON);
}