/** <p>Tests {@link GenericItemBasedRecommender}.</p> */
public final class GenericItemBasedRecommenderTest extends TasteTestCase {
@Test
public void testRecommender() throws Exception {
Recommender recommender = buildRecommender();
List<RecommendedItem> recommended = recommender.recommend(1, 1);
assertNotNull(recommended);
assertEquals(1, recommended.size());
RecommendedItem firstRecommended = recommended.get(0);
assertEquals(2, firstRecommended.getItemID());
assertEquals(0.1f, firstRecommended.getValue(), EPSILON);
recommender.refresh(null);
recommended = recommender.recommend(1, 1);
firstRecommended = recommended.get(0);
assertEquals(2, firstRecommended.getItemID());
assertEquals(0.1f, firstRecommended.getValue(), EPSILON);
}