RemoveInvitesBeforeOrganizationRemovedEventSubscriber extends CascadeEventSubscriber<BeforeOrganizationRemovedEvent> { @Inject public void subscribe(EventService eventService) { eventService.subscribe(this, BeforeOrganizationRemovedEvent.class); } @Inject  RemoveInvitesBeforeOrganizationRemovedEventSubscriber(InviteManager inviteManager); @Inject void subscribe(EventService eventService); @Override void onCascadeEvent(BeforeOrganizationRemovedEvent event);  }
@Test public void shouldSubscribeItself() { subscriber.subscribe(eventService); verify(eventService).subscribe(subscriber, BeforeOrganizationRemovedEvent.class); }