Date createdDate = new Date();
Date lastModDate = new Date();
String text = "my comment";
User user = new UserImpl(VALID_USER_ID.toString());
JpaWidgetComment wc = new JpaWidgetComment();
wc.setCreatedDate(createdDate);
wc.setWidgetId(VALID_WIDGET_ID.toString());
wc.setLastModifiedDate(lastModDate);
wc.setText(text);
wc.setUserId(VALID_USER_ID.toString());
assertThat(wc.getId(), is(nullValue()));
repository.createWidgetComment(VALID_WIDGET_ID.toString(), wc);
String newId = wc.getId();
assertThat(Long.parseLong(newId) > 0, is(true));
WidgetComment newComment = repository.getCommentById(VALID_WIDGET_ID.toString(), newId);
assertThat(newComment.getUserId(), is(VALID_USER_ID.toString()));
assertThat(newComment.getText(), is(text));
assertThat(newComment.getCreatedDate(), is(createdDate));