@Override
    public CommandLineImpl parse(final List<String> originalArgs, final Logger logger) {
        return CommandLineImpl.of(originalArgs, logger);
    }
@Test
    public void testRunHelp() throws Exception {
        final CommandLineParserImpl parser = new CommandLineParserImpl();
        final CommandLineImpl commandLine = parse(parser, "-h", "run");

        assertEquals(Command.RUN, commandLine.getCommand());

        assertEquals(
                "Usage: embulk [common options] run [command options] <config.yml>" + NEWLINE
                + NEWLINE
                + "\"embulk run\" runs a bulk load transaction." + NEWLINE
                + NEWLINE
                + "Common options:" + NEWLINE
                + "   -h, --help                  Print help" + NEWLINE
                + "   -version, --version         Show Embulk version" + NEWLINE
                + "   -l, --log-level LEVEL       Set log level (error, warn, info, debug, trace)" + NEWLINE
                + "       --log-path PATH         Output log messages to a file (default: -)" + NEWLINE
                + "   -X KEY=VALUE                Set Embulk system properties" + NEWLINE
                + "   -R OPTION                   Command-line option for JRuby. (Only '--dev')" + NEWLINE
                + NEWLINE
                + "Plugin options:" + NEWLINE
                + "   -L, --load PATH             Add a local plugin path" + NEWLINE
                + "   -I, --load-path PATH        Add Ruby script directory path ($LOAD_PATH)" + NEWLINE
                + "   -C, --classpath PATH        Add $CLASSPATH for JRuby separated by '" + File.pathSeparator + "'" + NEWLINE
                + "   -b, --bundle BUNDLE_DIR     Path to a Gemfile directory" + NEWLINE
                + NEWLINE
                + "Other 'run' options:" + NEWLINE
                + "   -r, --resume-state PATH     Path to a file to write or read resume state" + NEWLINE
                + "   -o, --output PATH           (deprecated)" + NEWLINE
                + "   -c, --config-diff PATH      Path to a file of the next configuration diff" + NEWLINE
                + NEWLINE,
                commandLine.getStdOut());
        assertEquals("", commandLine.getStdErr());
    }