}
@Test
public void testGetMovieRecommendations() throws Exception {
Movie movie = new Movie("1", "Test-Movie").persist();
Movie movie2 = new Movie("2", "Test-Movie2").persist();
User user=new User("me","me","me").persist();
user.rate(movie,3,"me");
User friend=new User("friend","friend","friend").persist();
friend.rate(movie,5,"friend");
friend.rate(movie2,3,"friend2");
assertEquals(2,movieRepository.count());
final List<MovieRecommendation> recommendations = movieRepository.getRecommendations(user);
assertEquals("one recommendation", 1, recommendations.size());
assertEquals("one recommendation", movie2, recommendations.get(0).getMovie());
assertEquals("one recommendation", 3, recommendations.get(0).getRating());