LenskitConfiguration config = new LenskitConfiguration();
config.bind(EventDAO.class).to(dao);
config.bind(ItemScorer.class).to(UserUserItemScorer.class);
config.bind(NeighborFinder.class).to(SnapshotNeighborFinder.class);
LenskitRecommenderEngine engine = LenskitRecommenderEngine.build(config);
Recommender rec = engine.createRecommender();
assertThat(rec.getItemScorer(),
instanceOf(UserUserItemScorer.class));
assertThat(rec.getItemRecommender(),
instanceOf(TopNItemRecommender.class));
RatingPredictor pred = rec.getRatingPredictor();
assertThat(pred, instanceOf(SimpleRatingPredictor.class));
Recommender rec2 = engine.createRecommender();
assertThat(rec2.getItemScorer(), not(sameInstance(rec.getItemScorer())));
}