CommandLineArgs { public String[] render() { List<String> result = new ArrayList<>(); for (Map.Entry<String, String> entry : dashArgs.entrySet()) { result.add(entry.getKey()); result.add(entry.getValue()); } for (String s : normalArgs) { result.add(s); } return result.toArray(new String[0]); } protected  CommandLineArgs(String[] args); protected  CommandLineArgs(Map<String, String> dashedArgs, List normalArgs); boolean hasArgument(String... paramList); String getArgument(String... paramList); String[] render(); CommandLineArgs remove(String... args); CommandLineArgs convertToNormal(String... args); static CommandLineArgs parse(String[] argv);  }
@Test public void testRender() throws Exception { String[] argv = { "-config", "bootstrap.properties" }; String[] args = CommandLineArgs.parse(argv).render(); assertEquals(2, args.length); assertEquals("bootstrap.properties", args[1]); args = CommandLineArgs.parse(new String[] { "my.properties" }).render(); assertEquals(1, args.length); assertEquals("my.properties", args[0]); }