Code example for ImmutableMap

Methods: get

  public Result launchAndExecute(
      ProcessExecutorParams params,
      Set<Option> options,
      Optional<String> stdin) {
    FakeProcess fakeProcess = processMap.get(params);
    if (fakeProcess == null) {
      throw new RuntimeException(String.format("Unexpected params: %s", params));
    return new Result(fakeProcess.waitFor(), "", "");
  public Result execute(Process process, Set<Option> options, Optional<String> stdin) {
    return new Result(0, "", "");
  public boolean isProcessLaunched(ProcessExecutorParams params) {
    return launchedProcesses.contains(params);
Connect your IDE to all the code out there  Get Codota for Java