### Question:
CommandLine implements Serializable { public Object getParsedOptionValue(String opt) throws ParseException { String res = getOptionValue(opt); Option option = resolveOption(opt); if (option == null || res == null) { return null; } return TypeHandler.createValue(res, option.getType()); } protected  CommandLine(); boolean hasOption(String opt); boolean hasOption(char opt); @Deprecated Object getOptionObject(String opt); Object getParsedOptionValue(String opt); Object getOptionObject(char opt); String getOptionValue(String opt); String getOptionValue(char opt); String[] getOptionValues(String opt); String[] getOptionValues(char opt); String getOptionValue(String opt, String defaultValue); String getOptionValue(char opt, String defaultValue); Properties getOptionProperties(String opt); String[] getArgs(); List<String> getArgList(); Iterator<Option> iterator(); Option[] getOptions();  }### Answer:
@Test public void testGetParsedOptionValue() throws Exception { Options options = new Options(); options.addOption(OptionBuilder.hasArg().withType(Number.class).create("i")); options.addOption(OptionBuilder.hasArg().create("f")); CommandLineParser parser = new DefaultParser(); CommandLine cmd = parser.parse(options, new String[] { "-i", "123", "-f", "foo" }); assertEquals(123, ((Number) cmd.getParsedOptionValue("i")).intValue()); assertEquals("foo", cmd.getParsedOptionValue("f")); }