@Test
public void subcommand() throws Exception {

    ArrayList<CharSequence> r = new ArrayList<>();
    complete("get", r);
    OptionGroup<ID> options = OptionIntrospector.introspect(
            ShellGetCommand.class);
    assertEquals(options.getCommands().size(), r.size());
    for (Option<ID> o : options.getCommands()) {
        assertTrue(r.contains(o.getLongName()));
    }
    r = new ArrayList<>();
    complete("get ", r);
    assertEquals(options.getCommands().size(), r.size());
    r = new ArrayList<>();
    complete("get st", r);
    assertEquals(1, r.size());
    assertEquals("style", r.get(0));
    r = new ArrayList<>();
    complete("get   st", r);
    assertEquals(1, r.size());
    assertEquals("style", r.get(0));
    r = new ArrayList<>();
    complete("get style", r);
    assertEquals(0, r.size());
    r = new ArrayList<>();
    complete("get bla", r);
    assertEquals(0, r.size());
}