/**
  * The commentAdded() method should notify both the author of the commented ad and the authors of
  * all of the ad's comments.
  */
 @Test
 public void commentAddedShouldNotifyClassifiedAndCommentAuthors() throws Exception {
   mockGetUserDetailReturnedValue();
   notificationService.commentAdded(concernedComment);
   verify(notificationService).getNotificationSender(CLASSIFIED_INSTANCEID);
   verify(notificationSender).notifyUser(notifInfoCaptor.capture());
   NotificationMetaData notif = getCapturedInfoInNotificiation();
   assertNotNull(notif);
   assertThat("The comment should be in the notification", concernedComment, isSetIn(notif));
   assertEquals(
       "The sender should be the author of the comment from which the callback is invoked",
       COMMENT_AUTHORID,
       notif.getSender());
   for (Comment aComment : classifiedComments) {
     UserRecipient authorId = new UserRecipient(String.valueOf(aComment.getOwnerId()));
     if (!authorId.getUserId().equals(String.valueOf(concernedComment.getOwnerId()))) {
       assertThat(
           "The author '" + authorId + "' should be in the notification recipients",
           notif.getUserRecipients(),
           hasItem(authorId));
     } else {
       assertFalse(
           "The author '" + authorId + "' shouldn't be in the notification recipients",
           notif.getUserRecipients().contains(authorId));
     }
   }
 }