Code example for ImmutableMap

Methods: get

0
  @Override 
  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));
    } 
    launchedProcesses.add(params);
    return new Result(fakeProcess.waitFor(), "", "");
  } 
 
  @Override 
  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