@Test public void runProcessAndWait_ReturnsExpectedResults_OnSuccessfulCommandExecution() throws IOException { String[] command = new String[] {"java", "-version"}; ProcessRunner.ExecutionResult executionResult = ProcessRunner.run(command).bufferOutput(true).runAndWait(); assertEquals(executionResult.getExitCode(), 0); assertEquals(3, executionResult.getBufferedStandardError().size()); assertTrue(executionResult.getBufferedStandardError().get(0).startsWith("java version ")); assertTrue(executionResult.getBufferedStandardOutput().isEmpty()); }
public static ExecutionBuilder run(String... command) { return new ExecutionBuilder(new ProcessBuilder().command(command)); }
ProcessRunner { public static ExecutionBuilder run(String... command) { return new ExecutionBuilder(new ProcessBuilder().command(command)); } }
ProcessRunner { public static ExecutionBuilder run(String... command) { return new ExecutionBuilder(new ProcessBuilder().command(command)); }  }
ProcessRunner { public static ExecutionBuilder run(String... command) { return new ExecutionBuilder(new ProcessBuilder().command(command)); }  static ExecutionBuilder run(String... command); }
ProcessRunner { public static ExecutionBuilder run(String... command) { return new ExecutionBuilder(new ProcessBuilder().command(command)); }  static ExecutionBuilder run(String... command);  }