### Question:
PackedRatingMatrix implements RatingMatrix { @Override public KeyIndex itemIndex() { requireValid(); return data.getItemIndex(); } PackedRatingMatrix(PackedRatingData data); @Override LongCollection getUserIds(); @Override LongCollection getItemIds(); @Override KeyIndex userIndex(); @Override KeyIndex itemIndex(); @Override List<RatingMatrixEntry> getRatings(); @Override Collection<RatingMatrixEntry> getUserRatings(long userId); @Override synchronized Long2DoubleMap getUserRatingVector(long userId); @PreDestroy void dispose();  }### Answer:
@Test public void testItemIndex() { KeyIndex ind = snap.itemIndex(); assertEquals(5, ind.size()); assertThat(ind.getKeyList(), containsInAnyOrder(7L, 8L, 9L, 10L, 11L)); }