InviteToPermissionsConverter implements EventSubscriber<UserCreatedEvent> { @Inject public void subscribe(EventService eventService) { eventService.subscribe(this, UserCreatedEvent.class); } @Inject  InviteToPermissionsConverter(
      InviteManager inviteManager, PermissionsManager permissionsManager); @Inject void subscribe(EventService eventService); @Override void onEvent(UserCreatedEvent event);  }
@Test public void shouldSubscribeItself() { converter.subscribe(eventService); verify(eventService).subscribe(converter, UserCreatedEvent.class); }