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