@Test
public void createRiIiMaybeTransposed() {

  Vector ratings = new SequentialAccessSparseVector(3);
  ratings.setQuick(1, 1.0);
  ratings.setQuick(3, 3.0);
  ratings.setQuick(5, 5.0);
  DoubleMatrix riIiMaybeTransposed = JBlasAlternatingLeastSquaresSolver.createRiIiMaybeTransposed(ratings);
  assertEquals(1, riIiMaybeTransposed.columns, 1);
  assertEquals(3, riIiMaybeTransposed.rows, 3);
  assertEquals(1.0, riIiMaybeTransposed.get(0, 0), EPSILON);
  assertEquals(3.0, riIiMaybeTransposed.get(1, 0), EPSILON);
  assertEquals(5.0, riIiMaybeTransposed.get(2, 0), EPSILON);
}