CommandMetadata implements MetadataNode { public String getShortName() { return (shortName != null) ? shortName : name.substring(0, 1); } CommandMetadata(); static Builder builder(Class<? extends Command> commandType); static Builder builder(String commandName); @Override String getName(); @Override String getDescription(); OptionMetadata asOption(); Collection<OptionMetadata> getOptions(); String getShortName(); boolean isHidden();  }
@Test public void testGetShortName() { CommandMetadata md = CommandMetadata.builder(MyCommand.class).shortName('M').build(); assertEquals("my", md.getName()); assertEquals("M", md.getShortName()); }