PackageCommandSetProvider extends PackageScanner implements CommandSetProvider { @Override public Set<Class<? extends Command>> getCommands() { return scan(Command.class); } PackageCommandSetProvider(Package[] packages);  PackageCommandSetProvider(Package[] packages, ClassLoader[] classLoaders); @Override Set<Class<? extends Command>> getCommands();  }
@Test public void test() { new PackageCommandSetProvider(new Package[]{BogusCommand.class.getPackage()}).getCommands() .contains(BogusCommand.class); }