Execute { public Execute addAllEnv() { this.env.putAll(System.getenv()); return this; } Execute(String command);  Execute(String[] commandPlusArgs); Execute addEnvPaths(); Execute addAllEnv(); Execute arg(String arg); Execute input(String input); Execute env(String key, String value); Execute clearEnv(); Execute path(String possiblePath); Execute clearPath(); Result toSystemOut(); Result toFile(String outPath); Result toFile(File out); BufferedResult toBuffer();  }
@Test public void addAllEnv() { String out = new Execute("bash").addEnvPaths().addAllEnv().arg("-c").arg("echo ${HOME}").toBuffer().out; assertThat(out, is(System.getenv("HOME") + "\n")); }