@Transactional(readOnly=false)
@Rollback(true)
public void save_new() {
final int EXPECTED_SCORE = 1;
WidgetRating wr = new JpaWidgetRating();
wr.setScore(EXPECTED_SCORE);
wr.setUserId(VALID_USER_ID);
assertThat(wr.getId(), is(nullValue()));
repository.createWidgetRating(VALID_WIDGET_ID, wr);
String newId = wr.getId();
assertThat(Long.parseLong(newId) > 0, is(true));
WidgetRating newRating = repository.getRatingById(VALID_WIDGET_ID, newId);
assertThat(newRating.getScore(), is(EXPECTED_SCORE));
assertThat(newRating.getUserId(), is(VALID_USER_ID));
}