EquinoxLaunchConfiguration implements LaunchConfiguration { public void addEnvironmentVariables(Map<String, String> variables) { for (String key : variables.keySet()) { String value = variables.get(key); env.put(key, (value != null) ? value : ""); } } EquinoxLaunchConfiguration(EquinoxInstallation installation); void addEnvironmentVariables(Map<String, String> variables); @Override Map<String, String> getEnvironment(); void setJvmExecutable(String jvmExecutable); @Override String getJvmExecutable(); void setWorkingDirectory(File workingDirectory); @Override File getWorkingDirectory(); void addProgramArguments(String... args); @Override String[] getProgramArguments(); void addVMArguments(String... vmargs); @Override String[] getVMArguments(); @Override File getLauncherJar();  }
@Test public void testAddEnvironmentVariables() { EquinoxLaunchConfiguration config = new EquinoxLaunchConfiguration(null); Map<String, String> envVariables = new HashMap<>(); envVariables.put("key1", "value1"); envVariables.put("key2", null); config.addEnvironmentVariables(envVariables); Map<String, String> environment = config.getEnvironment(); assertThat(environment.size(), equalTo(2)); assertThat(environment.get("key1"), equalTo("value1")); assertThat(environment.get("key2"), equalTo("")); }