    @Test
    public void testPrintHelp() throws ArgumentParserException {

        String h = "Alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do";
        ap.addArgument("bar").help(h);
        ap.addArgument("verylonglongpositionalargument").help(h);
        ap.addArgument("-f", "--foo").help(h);
        ap.addArgument("-1", "--1").metavar("X").nargs(2).help(h);
        ap.addArgument("-2").metavar("X").nargs("*").help(h);
        ap.addArgument("-3").metavar("X").nargs("+").help(h);
        ap.addArgument("-4").metavar("X").nargs("?").help(h);
        Subparsers subparsers = ap.addSubparsers().help("sub-command help");
        Subparser parserA = subparsers.addParser("install");
        parserA.help("parserA help");
        subparsers.addParser("search");

        // StringWriter out = new StringWriter();
        ap.printHelp(new PrintWriter(System.out));
    }