@Test
public void help() throws Exception {

    ArrayList<CharSequence> r = new ArrayList<>();
    complete("hel", r);
    assertEquals(1, r.size());
    assertEquals("help", r.get(0));
    r = new ArrayList<>();
    complete("help ge", r);
    assertEquals(1, r.size());
    assertEquals("get", r.get(0));
    r = new ArrayList<>();
    complete("help get st", r);
    assertEquals(1, r.size());
    assertEquals("style", r.get(0));
    r = new ArrayList<>();
    complete("help get", r);
    OptionGroup<ID> options = OptionIntrospector.introspect(ShellGetCommand.class);
    assertEquals(options.getCommands().size(), r.size());
    for (Option<ID> cmd : options.getCommands()) {
        assertTrue(r.contains(cmd.getLongName()));
    }
    r = new ArrayList<>();
    complete("help", r);
    options = OptionIntrospector.introspect(CSLTool.class);
    OptionGroup<ID> optionsAdditional = OptionIntrospector.introspect(
            AdditionalShellCommands.class);
    // get number of commands, subtract 1 because there's a HelpCommand
    // and a ShellHelpCommand
    int numCommands = options.getCommands().size() +
            optionsAdditional.getCommands().size() - 1;
    assertEquals(numCommands, r.size());
}