}
@Test
public void unparsableOptionFailsAppropriately() throws IllegalAccessException {
UnparsableOptionException blowup = null;
try {
InheritedOptionExample ioe = (InheritedOptionExample) exampleOne.parse(
new ArrayList<String>() {{
add("-johnny");
add("-badass");
add("421");
}}
);
} catch (UnparsableOptionException x) {
blowup = x;
}
assertNotNull(blowup);
assertEquals("johnny", blowup.getOptionName());
assertEquals("-badass", blowup.getInvalidValue());
assertEquals(Long.class, blowup.getTargetType());
}