PackageEventSetProvider extends PackageScanner<Event> implements EventSetProvider { @Override public Set<Class<? extends Event>> getEvents() { return scan(Event.class); } PackageEventSetProvider(Package[] packages);  PackageEventSetProvider(Package[] packages, ClassLoader[] classLoaders); @Override Set<Class<? extends Event>> getEvents();  }
@Test public void test() { new PackageEventSetProvider(new Package[]{BogusEvent.class.getPackage()}).getEvents() .contains(BogusEvent.class); }