CmdLineUtils.findPrintSupportedActionsOption(options));
}
public void testFindSpecifiedPrintSupportedActionsOption() {
CmdLineOptionInstance psaAction = createOptionInstance(
new PrintSupportedActionsCmdLineOption());
Set<CmdLineOptionInstance> options = Sets.newHashSet(
createOptionInstance(createSimpleOption("test", false)),
createOptionInstance(createSimpleOption("test2", false)));
assertNull(findSpecifiedPrintSupportedActionsOption(options));
options.add(psaAction);
assertEquals(psaAction,
findSpecifiedPrintSupportedActionsOption(options));
options.add(createOptionInstance(new PrintSupportedActionsCmdLineOption(
"psa2", "PrintSupportedActions2", "Print Actions 2", false)));
try {
findSpecifiedPrintSupportedActionsOption(options);
fail("Should have thrown IllegalArgumentException");
} catch (IllegalArgumentException ignore) { /* expect throw */ }