CommandHelper { public static List<Class<?>> getAllCommandClass() { final Set<String> commandList = ExtensionLoader.getExtensionLoader(BaseCommand.class).getSupportedExtensions(); final List<Class<?>> classes = new ArrayList<Class<?>>(); for (String commandName : commandList) { BaseCommand command = ExtensionLoader.getExtensionLoader(BaseCommand.class).getExtension(commandName); classes.add(command.getClass()); } return classes; } private  CommandHelper(); static boolean hasCommand(String commandName); static List<Class<?>> getAllCommandClass(); static Class<?> getCommandClass(String commandName);  }
@Test public void testGetAllCommandClass() throws Exception { List<Class<?>> classes = CommandHelper.getAllCommandClass(); assertThat(classes, containsInAnyOrder(GreetingCommand.class, Help.class, Ls.class, Offline.class, Online.class, Quit.class, Ready.class, Version.class, PublishMetadata.class)); }