final String[] newArgs = Arrays.copyOf(args, args.length + 2);
newArgs[newArgs.length - 2] = "--list-inventory";
newArgs[newArgs.length - 1] = "inventory-job-id";
final OptionSet optionSet = optionsParser.parse(newArgs);
assertTrue("Option 'list-inventory' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
optionSet.has("list-inventory"));
if (optionSet.hasArgument(optionsParser.INVENTORY_LISTING)) {
assertEquals("Value of option 'list-inventory' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
"inventory-job-id", optionSet.valueOf("list-inventory"));
}