### Question:
NotificationService { public void sendNotificationAboutTopicCreated(Topic topic) { Collection<JCUser> branchSubscribers = subscriptionService.getAllowedSubscribers(topic.getBranch()); this.filterSubscribers(branchSubscribers, topic); for (JCUser subscriber : branchSubscribers) { mailService.sendTopicCreationMail(subscriber, topic); } } NotificationService(
            UserService userService,
            MailService mailService,
            SubscriptionService subscriptionService,
            PluginLoader pluginLoader); void subscribedEntityChanged(SubscriptionAwareEntity entity); void sendNotificationAboutTopicMoved(Topic topic); void sendNotificationAboutRemovingTopic(Topic topic); void sendNotificationAboutTopicCreated(Topic topic);  }### Answer:
@Test public void notificationMailShouldBeSendAfterTopicWasCreated() { branch.getSubscribers().add(user1); branch.getSubscribers().add(currentUser); when(subscriptionService.getAllowedSubscribers(branch)).thenReturn(branch.getSubscribers()); service.sendNotificationAboutTopicCreated(topic); verify(mailService, times(1)).sendTopicCreationMail(user1, topic); verifyNoMoreInteractions(mailService); }