assertEquals("one recommendation", movie2, recommendations.get(0).getMovie());
assertEquals("one recommendation", 3, recommendations.get(0).getRating());
}
@Test
public void testRateMovie() throws Exception {
Movie movie = new Movie("1", "Test-Movie").persist();
User user=new User("me","me","me").persist();
user.rate(movie, 5, "comment");
final Rating rating = IteratorUtil.first(movie.getRatings());
assertEquals("rating stars", 5, rating.getStars());
assertEquals("rating comment", "comment", rating.getComment());
assertEquals("rating user", user, rating.getUser());
assertEquals("rating movie", movie, rating.getMovie());
}