assertThat(widgetRating, is(sameInstance((WidgetRating)lookup)));
}
@Test
public void save_Id_Null(){
WidgetRating item = new WidgetRatingImpl();
String widgetId = "5544";
Widget widget = new WidgetImpl();
widget.setRatings(new ArrayList<WidgetRating>());
expect(template.get(widgetId)).andReturn(widget);
expect(template.save(widget)).andReturn(widget);
replay(template);
WidgetRating widgetRating = ratingRepository.createWidgetRating(widgetId, item);
assertTrue(widget.getRatings().contains(item));
assertThat(widgetRating, is(sameInstance(item)));
}