ratings.add(Ratings.make(7, 5, 3.5));
ratings.add(Ratings.make(3, 5, 1.5));
ratings.add(Ratings.make(8, 5, 2));
SparseVector v = Ratings.itemRatingVector(ratings);
assertEquals(3, v.size());
assertEquals(7, v.sum(), EPSILON);
long[] keys = {3, 7, 8};
double[] values = {1.5, 3.5, 2};
SparseVector sv = MutableSparseVector.wrap(keys, values);
assertEquals(sv, v);