test_class.file: cli/src/test/java/com/github/olivergondza/dumpling/cli/MainTest.java
test_class.identifier: MainTest
test_class.superclass: extends AbstractCliTest
test_case.body: @Test
      public void help() {
  
          run("help");
          assertThat(err.toString(), equalTo(""));
          assertThat(out.toString(), containsString("Usage: "));
          assertThat(out.toString(), containsString("Available commands:"));
          assertThat(out.toString(), containsString("blocking-tree"));
          assertThat(this, succeeded());
      }
test_case.class_method_signature: MainTest.help()
test_case.full_signature: @Test public void help()
test_case.identifier: help
test_case.invocations: run assertThat toString equalTo assertThat toString containsString assertThat toString containsString assertThat toString containsString assertThat succeeded
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void help()
focal_class.declarator: handler
focal_class.modifier: @Argument(required = true, metaVar = "COMMAND")
      private
focal_class.original_string: @Argument(required = true, metaVar = "COMMAND")
      private CliCommand handler;
focal_class.type: CliCommand
focal_class.var_name: handler
focal_class.file: cli/src/main/java/com/github/olivergondza/dumpling/cli/Main.java
focal_class.identifier: Main
focal_class.class_method_signature: Main.main(@Nonnull String[] args)
focal_class.full_signature: public static void main(@Nonnull String[] args)
focal_class.identifier: main
focal_class.modifiers: public static
focal_class.parameters: (@Nonnull String[] args)
focal_class.return: void
focal_class.signature: void main(@Nonnull String[] args)
focal_class.class_method_signature: Main.run(@Nonnull String[] args, @Nonnull final ProcessStream system)
focal_class.full_signature:  int run(@Nonnull String[] args, @Nonnull final ProcessStream system)
focal_class.identifier: run
focal_class.parameters: (@Nonnull String[] args, @Nonnull final ProcessStream system)
focal_class.return: int
focal_class.signature: int run(@Nonnull String[] args, @Nonnull final ProcessStream system)
focal_method.body: int run(@Nonnull String[] args, @Nonnull final ProcessStream system) {
          OptionHandlerRegistry.getRegistry().registerHandler(CliCommand.class, CliCommandOptionHandler.class);
          OptionHandlerRegistry.getRegistry().registerHandler(ProcessRuntime.class, new OptionHandlerRegistry.OptionHandlerFactory() {
              public OptionHandler<?> getHandler(CmdLineParser parser, OptionDef o, Setter setter) {
                  return new ProcessRuntimeOptionHandler(parser, o, setter, system);
              }
          });
  
          CmdLineParser parser = new CmdLineParser(this);
  
          try {
              parser.parseArgument(args);
  
              return handler.run(system);
          } catch (CmdLineException ex) {
  
              system.err().println(ex.getMessage());
              HelpCommand.printUsage(handler, system.err(), ex);
          } catch (CommandFailedException ex) {
  
              system.err().println(ex.getMessage());
          } catch (RuntimeException ex) {
  
              ex.printStackTrace(system.err());
          }
  
          return -1;
      }
focal_method.class_method_signature: Main.run(@Nonnull String[] args, @Nonnull final ProcessStream system)
focal_method.full_signature:  int run(@Nonnull String[] args, @Nonnull final ProcessStream system)
focal_method.identifier: run
focal_method.invocations: registerHandler getRegistry registerHandler getRegistry parseArgument run println err getMessage printUsage err println err getMessage printStackTrace err
focal_method.parameters: (@Nonnull String[] args, @Nonnull final ProcessStream system)
focal_method.return: int
focal_method.signature: int run(@Nonnull String[] args, @Nonnull final ProcessStream system)