}
@Test
public void newComment() {
WidgetComment comment = new WidgetCommentImpl();
comment.setCreatedDate(new Date());
comment.setId(9L);
comment.setLastModifiedDate(new Date());
comment.setText("hello");
comment.setUser(new JpaUser(1L));
comment.setWidgetId(9L);
JpaWidgetComment converted = widgetCommentConverter.convert(comment);
assertThat(converted, is(not(sameInstance(comment))));
assertThat(converted, is(instanceOf(JpaWidgetComment.class)));
assertThat(converted.getCreatedDate(), is(equalTo(comment.getCreatedDate())));
assertThat(converted.getEntityId(), is(equalTo(comment.getId())));
assertThat(converted.getId(), is(equalTo(comment.getId())));
assertThat(converted.getLastModifiedDate(), is(equalTo(comment.getLastModifiedDate())));
assertThat(converted.getText(), is(equalTo(comment.getText())));
assertThat(converted.getUser(), is(equalTo(comment.getUser())));
assertThat(converted.getWidgetId(), is(equalTo(comment.getWidgetId())));
}