### Question:
AgentConfigParser { public AgentConfig parseCommandLine(String args) { if (args == null || args.isEmpty()) { return new AgentConfig(null); } String[] individualArgs = args.split("(?<!\\\\):"); final AgentConfig result = new AgentConfig(Arrays.asList(individualArgs)); for (String arg : individualArgs) { String[] pair = arg.split("(?<!\\\\)="); String value = pair.length > 1 ? pair[1] .replaceAll("\\\\:", ":") .replaceAll("\\\\=", "=") : ""; switch (pair[0].toLowerCase()) { case "runtimeonly": result.setRuntimeOnly(true); break; case "pluginpath": result.setPluginPath(value); break; case "verbose": result.setVerbose(true); break; case "extraverbose": result.setExtraverbose(true); break; case "loggerfactory": result.setLoggerFactoryClass(value); break; default: break; } } return result; }  AgentConfig parseCommandLine(String args);  }### Answer:
@Test public void testArgumentParsing() { final String argLine = "verbose:runtimeonly:pluginpath=path/to/plugins"; AgentConfig config = new AgentConfigParser().parseCommandLine(argLine); assertTrue(config.isRuntimeOnly()); assertTrue(config.isVerbose()); assertFalse(config.isExtraverbose()); assertEquals("path/to/plugins", config.getPluginPath()); }