@Test
public void createRiIiMaybeTransposedExceptionOnNonSequentialVector() {

  Vector ratings = new RandomAccessSparseVector(3);
  ratings.setQuick(1, 1.0);
  ratings.setQuick(3, 3.0);
  ratings.setQuick(5, 5.0);
  try {
    JBlasAlternatingLeastSquaresSolver.createRiIiMaybeTransposed(ratings);
    fail();
  } catch (IllegalArgumentException e) {}
}