@Test public void testUpdateComment() throws Exception { Comment comment = jpaCommentDao.getCommentById(1); comment.setName("updatedName"); Comment returnedComment = jpaCommentDao.updateComment(comment); Comment updatedComment = jpaCommentDao.getCommentById(1); assertEquals(returnedComment.getName(), "updatedName"); assertEquals(updatedComment.getName(), "updatedName"); }
@Test public void testGetCommentById() throws Exception { Comment comment = jpaCommentDao.getCommentById(1); assertEquals(comment.getName(), "commentName1"); }