public AgentBootstrapperArgs parse(String... args) {
        AgentBootstrapperArgs result = new AgentBootstrapperArgs();
        try {
            new JCommander(result).parse(args);

            if (result.help) {
                printUsageAndExit(0);
            }

            return result;
        } catch (ParameterException e) {
            stderr.println(e.getMessage());
            printUsageAndExit(1);
        }

        return null;
    }
@Test
    public void printsHelpAndExitsWith0() {
        try {
            agentCLI.parse("-help");
            fail("Was expecting an exception!");
        } catch (ExitException e) {
            assertThat(e.getStatus()).isEqualTo(0);
        }
    }