OrganizationNotificationEmailSender implements EventSubscriber<OrganizationEvent> { @Inject public void subscribe(EventService eventService) { eventService.subscribe(this); } @Inject  OrganizationNotificationEmailSender(
      @Named("che.api") String apiEndpoint,
      MailSender mailSender,
      OrganizationManager organizationManager,
      UserManager userManager,
      OrganizationEmailNotifications emails); @Inject void subscribe(EventService eventService); @Override void onEvent(OrganizationEvent event);  }
@Test public void shouldSelfSubscribe() { emailSender.subscribe(eventService); verify(eventService).subscribe(emailSender); }