service = new DefaultWidgetRatingService(repository);
}
@Test
public void testGetByWidgetIdAndUserId() {
WidgetRating widgetRating = new WidgetRating(1L, 2L, 3L, 5);
expect(repository.getByWidgetIdAndUserId(2L, 3L)).andReturn(widgetRating);
replay(repository);
final WidgetRating rating = service.getByWidgetIdAndUserId(2L, 3L);
assertEquals("Score is 5", Integer.valueOf(5), rating.getScore());
}