### Question:
TransactionalPostCommentService extends
        AbstractTransactionalEntityService<PostComment, Crud<PostComment>> implements
        PostCommentService, PluginCommentService { @Override @PreAuthorize("(hasPermission(#post.topic.branch.id, 'BRANCH', 'BranchPermission.DELETE_OWN_POSTS') and " + "#comment.author.username == principal.username) or " + "(hasPermission(#post.topic.branch.id, 'BRANCH', 'BranchPermission.DELETE_OTHERS_POSTS') and " + "#comment.author.username != principal.username)") public PostComment markCommentAsDeleted(Post post, PostComment comment) { comment.setDeletionDate(new DateTime()); getDao().saveOrUpdate(comment); return comment; } TransactionalPostCommentService(Crud<PostComment> dao,
                                           PermissionService permissionService, UserService userService); PostComment updateComment(long id, String body, long branchId); @Override PostComment getComment(long id); @Override @PreAuthorize("(hasPermission(#post.topic.branch.id, 'BRANCH', 'BranchPermission.DELETE_OWN_POSTS') and " + "#comment.author.username == principal.username) or " + "(hasPermission(#post.topic.branch.id, 'BRANCH', 'BranchPermission.DELETE_OTHERS_POSTS') and " + "#comment.author.username != principal.username)") PostComment markCommentAsDeleted(Post post, PostComment comment);  }### Answer:
@Test public void testMarkCommentAsDeleted() { PostComment postComment = new PostComment(); PostComment result = postCommentService.markCommentAsDeleted(null, postComment); assertNotNull(result.getDeletionDate()); verify(dao).saveOrUpdate(postComment); }