@Test(expected = IllegalStateException.class) public void executeShouldThrowException() { command.execute("arg1", "arg2"); }
@Override public void execute(String... args) { if (executor == null) throw new IllegalStateException("Executor not defined."); executor.accept(args); }
SimpleCommand extends Command { @Override public void execute(String... args) { if (executor == null) throw new IllegalStateException("Executor not defined."); executor.accept(args); } }
SimpleCommand extends Command { @Override public void execute(String... args) { if (executor == null) throw new IllegalStateException("Executor not defined."); executor.accept(args); } SimpleCommand(String command, String helpText, String usageText); }
SimpleCommand extends Command { @Override public void execute(String... args) { if (executor == null) throw new IllegalStateException("Executor not defined."); executor.accept(args); } SimpleCommand(String command, String helpText, String usageText); @Override void execute(String... args); void setExecutor(Consumer<String[]> func); }
SimpleCommand extends Command { @Override public void execute(String... args) { if (executor == null) throw new IllegalStateException("Executor not defined."); executor.accept(args); } SimpleCommand(String command, String helpText, String usageText); @Override void execute(String... args); void setExecutor(Consumer<String[]> func);  }