public void testRecommendedBecause() throws Exception {
ItemBasedRecommender recommender = buildRecommender2();
List<RecommendedItem> recommendedBecause = recommender.recommendedBecause("test1", "4", 3);
assertNotNull(recommendedBecause);
assertEquals(3, recommendedBecause.size());
RecommendedItem first = recommendedBecause.get(0);
RecommendedItem second = recommendedBecause.get(1);
RecommendedItem third = recommendedBecause.get(2);
assertEquals("2", first.getItem().getID());
assertEquals(0.99, first.getValue(), EPSILON);
assertEquals("3", second.getItem().getID());
assertEquals(0.4, second.getValue(), EPSILON);
assertEquals("0", third.getItem().getID());
assertEquals(0.2, third.getValue(), EPSILON);
}