fail("Should have thrown NoSuchElementException");
} catch (NoSuchElementException nsee) {
}
// there are four definitions but only 3 are optional
cmd = new ParamsTestCommand();
defs = cmd.getParameterDefinitions();
iter = new OptionalParameterDefinitionIterator(defs);
for (int i = 0; i < 3; i++) {
assertNotNull(iter.next());