similarities.add(new GenericItemSimilarity.ItemItemSimilarity(0, 2, 0.5));
similarities.add(new GenericItemSimilarity.ItemItemSimilarity(0, 3, 0.2));
similarities.add(new GenericItemSimilarity.ItemItemSimilarity(1, 2, 0.7));
similarities.add(new GenericItemSimilarity.ItemItemSimilarity(1, 3, 0.5));
similarities.add(new GenericItemSimilarity.ItemItemSimilarity(2, 3, 0.9));
ItemSimilarity similarity = new GenericItemSimilarity(similarities);
Recommender recommender = new GenericItemBasedRecommender(dataModel, similarity);
List<RecommendedItem> originalRecommended = recommender.recommend(1, 4, null, true);
List<RecommendedItem> rescoredRecommended = recommender.recommend(1, 4, new ReversingRescorer<Long>(), true);
assertNotNull(originalRecommended);
assertNotNull(rescoredRecommended);