public void testRecommender() throws Exception {
Recommender recommender = new ItemAverageRecommender(getDataModel());
List<RecommendedItem> recommended = recommender.recommend(1, 1);
assertNotNull(recommended);
assertEquals(1, recommended.size());
RecommendedItem firstRecommended = recommended.get(0);
assertEquals(2, firstRecommended.getItemID());
assertEquals(0.53333336f, firstRecommended.getValue(), EPSILON);
recommender.refresh(null);
assertEquals(2, firstRecommended.getItemID());
assertEquals(0.53333336f, firstRecommended.getValue(), EPSILON);
}