code: protected ProcessBuilder newProcessBuilder(String[] commandLine, File directory, Environment environment) {
      ProcessBuilder processBuilder = new ProcessBuilder(commandLine);
  
      processBuilder.directory(directory);
      processBuilder.environment().clear();
      processBuilder.environment().putAll(environment.toMap());
      processBuilder.redirectErrorStream(isRedirectingErrorStream());
  
      getError().ifPresent(processBuilder::redirectError);
      getIn().ifPresent(processBuilder::redirectInput);
      getOut().ifPresent(processBuilder::redirectOutput);
  
      return processBuilder;
    }
docs: Constructs, configures and initializes a new instance of {@link ProcessBuilder} used to execute and run programs.
  
  The configuration of the {@link ProcessBuilder} is based on this {@link ProcessBuilderProcessExecutor}.
  
  @param commandLine array of {@link String} values constituting the program and its runtime arguments.
  @param directory {@link File directory} in which the program will run.
  @param environment {@link Environment} configuration used to run the program.
  @return a new instance of {@link ProcessBuilder} configured and initialized with this
  {@link ProcessBuilderProcessExecutor} configuration.
  @see org.cp.elements.util.Environment
  @see java.lang.ProcessBuilder
  @see java.io.File