### Question:
Command implements Named { protected Command(String name, String... names) { this.name = name; aliases.addAll(Arrays.asList(names)); aliases.add(name); } protected  Command(String name, String... names); void process(CommandSource source, String... args); void process(CommandSource source, CommandArguments args); Executor getExecutor(); Command setExecutor(Executor executor); Set<CommandFilter> getFilters(); Command addFilter(CommandFilter... filter); Set<Command> getChildren(); Command getChild(String name, boolean createIfAbsent); Command getChild(String name); List<String> getAliases(); Command addAlias(String... alias); Command removeAlias(String... alias); boolean shouldParseFlags(); void setShouldParseFlags(boolean parseFlags); List<CommandFlags.Flag> getFlags(); void addFlag(CommandFlags.Flag flag); void addFlag(CommandFlags.Flag... flags); String getHelp(); Command setHelp(String help); String getUsage(); Command setUsage(String usage); String getPermission(); Command setPermission(String permission); @Override String getName(); @Override boolean equals(Object obj); @Override String toString(); @Override int hashCode();  }### Answer:
@Test public void testCommand() throws CommandException { CommandManager cm = new CommandManager(); CommandSource testSource = new TestCommandSource(cm); Command cmd = cm.getCommand("test1") .addAlias("t1") .setPermission("test.1") .setExecutor(new Executor() { @Override public void execute(CommandSource source, Command command, CommandArguments args) throws CommandException { args.popString("testArg1"); args.popString("testArg2", "Not specified"); args.assertCompletelyParsed(); } }); cmd.process(testSource, "foo"); cmd.process(testSource, "foo", "bar"); thrown.expect(CommandException.class); cmd.process(testSource, "foo", "bar", "baz"); cmd.process(testSource); }