@Test
public void testImport() throws IOException {

    @Command(name = "import", version = {"import 2.3", "ignored line 1", "ignored line 2"},
            description = "Imports data from a file into the infra inventory db.",
            optionListHeading = "%nOptions%n", parameterListHeading = "Positional Arguments%n",
            footerHeading = "%nExample:%n",
            footer = {
                    "# This imports all rows from the IP_Allocation_v1.20.csv file into the `${table.hosts}` table.",
                    "@|bold ${COMMAND-FULL-NAME} -v src/test/resources/IP_Allocation_v1.20.csv -Chostname=hostname " +
                            "-Chw_type=server_type -Cenv=class -Cdeviceid=${column.deviceid} -Cenv=env -Cteam=team -COS=os " +
                            "-Cremarks=description -Crack=rack -Clocation=datacenter -Cmgmt_ip=management_ip -Cfront_ip=front_ip " +
                            "-Cilo_ip=ilo_ip -Capp=application|@",
                    "",
                    "# This imports all rows from the network.csv file into the `network` table.",
                    "@|bold ${COMMAND-FULL-NAME} -v --table=network src/test/resources/network.csv -Cdesc=purpose -CDC=datacenter -Csubnet=subnet -Cgateway=gateway -Cvlanid=network|@"
            })
    class ImportCommand {
        @Option(names = {"-o", "--format"}, defaultValue = "CSV", order = 1,
                description = "File format. Valid values: ${COMPLETION-CANDIDATES}. Default: ${DEFAULT-VALUE}")
        Format format;
        @Parameters(description = "The file to import.")
        File file;
        @ArgGroup(validate = false, heading = "%nCSV/TSV-only Options%n")
        CsvOptions csvOptions;
        @Option(names = {"--dry-run"},
                description = "Don't actually add the row(s), just show if they exist and/or will be ignored..")
        boolean dryRun;
        @Option(names = "-n", description = {"Number-of-iterations limit as:  `-n number`",
                "Specifies the maximum number of iterations, or frames, top " +
                        "should produce before ending."})
        int number;
        @Option(names = {"-t", "--table"}, paramLabel = "<tableName>", order = 51,
                description = {"Name of the table that the CRUD operations apply to. Default: ${table.hosts}."})
        public void setTableName(String tableName) {
        }
        @Option(names = {"-v", "--verbose"}, order = 50,
                description = {
                        "Specify multiple -v options to increase verbosity.",
                        "For example, `-v -v -v` or `-vvv`"})
        public void setVerbosity(boolean[] verbosity) {
        }
    }
    StringWriter sw = new StringWriter();
    PrintWriter pw = new PrintWriter(sw); //System.out, true
    ManPageGenerator.writeSingleManPage(pw, new CommandLine(new ImportCommand()).getCommandSpec());
    pw.flush();
    String expected = read("/import.manpage.txt.adoc");
    expected = expected.replace("\r\n", "\n");
    expected = expected.replace("\n", System.getProperty("line.separator"));
    assertEquals(expected, sw.toString());
}