@Override
    public CommandLineImpl parse(final List<String> originalArgs, final Logger logger) {
        return CommandLineImpl.of(originalArgs, logger);
    }
@Test
    public void testInvalidOption() throws Exception {
        final CommandLineParserImpl parser = new CommandLineParserImpl();
        final CommandLineImpl commandLine = parse(parser, "-p");
        assertEquals(Command.NONE, commandLine.getCommand());

        assertEquals(
                "Usage: embulk [common options] <command> [command options]" + NEWLINE
                + NEWLINE
                + "Commands:" + NEWLINE
                + "   run          Run a bulk load transaction." + NEWLINE
                + "   cleanup      Cleanup resume state." + NEWLINE
                + "   preview      Dry-run a bulk load transaction, and preview it." + NEWLINE
                + "   guess        Guess missing parameters to complete configuration." + NEWLINE
                + "   install      Installs a Maven artifact, typically an Embulk plugin." + NEWLINE
                + "   example      Create example files for a quick trial of Embulk." + NEWLINE
                + "   license      Print out the license notice." + NEWLINE
                + "   selfupdate   Upgrade Embulk to the specified version." + NEWLINE
                + "   gem          Run \"gem\" to install a RubyGem plugin." + NEWLINE
                + "   mkbundle     Create a new plugin bundle environment." + NEWLINE
                + "   bundle       Update a plugin bundle environment." + 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,
                commandLine.getStdOut());
        assertEquals("embulk: Unrecognized option: -p" + NEWLINE, commandLine.getStdErr());
    }