}
public void testFile() throws Exception {
UserSimilarity userSimilarity = new PearsonCorrelationSimilarity(model);
UserNeighborhood neighborhood = new NearestNUserNeighborhood(2, userSimilarity, model);
Recommender recommender = new GenericUserBasedRecommender(model, neighborhood, userSimilarity);
assertEquals(2, recommender.recommend(123, 3).size());
assertEquals(2, recommender.recommend(234, 3).size());
assertEquals(1, recommender.recommend(345, 3).size());
// Make sure this doesn't throw an exception
model.refresh(null);
}