.withLongOpt( debugOpt )
.hasArg()
.create( 'd' );
Options options = new Options();
options.addOption( debug );
CommandLine commandLine = new PosixParser().parse( options, new String[]{"-d", "true"} );
assertEquals("true", commandLine.getOptionValue( debugOpt ));
assertEquals("true", commandLine.getOptionValue( 'd' ));
assertTrue(commandLine.hasOption( 'd'));
assertTrue(commandLine.hasOption( debugOpt));