Environment { static void initialize(String[] commandLineArgs) { final CommandLine commandLine = CommandLine.parse(commandLineArgs); final Map<String, String> sysProps = getSpecifiedSystemProps(); sysProps.putAll(commandLine.getSystemProperties()); setSystemProperties(sysProps); final Map<String, String> optionMap = new HashMap<>(); optionMap.putAll(JkOptions.readSystemAndUserOptions()); optionMap.putAll(commandLine.getCommandOptions()); JkOptions.init(optionMap); final StandardOptions standardOptions = new StandardOptions(optionMap); if (standardOptions.logVerbose) { JkLog.setVerbosity(JkLog.Verbosity.VERBOSE); } if (standardOptions.logQuiteVerbose) { JkLog.setVerbosity(JkLog.Verbosity.QUITE_VERBOSE); } JkHierarchicalConsoleLogConsumer.setMaxLength(standardOptions.logMaxLength); Environment.systemProps = sysProps; Environment.commandLine = commandLine; Environment.standardOptions = standardOptions; } private  Environment();   }
@Test public void initialize() { Environment.initialize(new String[] {"-LV=true", "-CC=HttpClientTaskBuild", "clean", "java#pack", "java#publish" , "-java#publish.localOnly", "-LH"}); assertEquals("HttpClientTaskBuild", Environment.standardOptions.commandClass); }