private static String toString(List<String> lines) {
    StringBuilder sb = new StringBuilder();
    if (lines != null) {
      String emptyOrNewLine = "";
      for (String line : lines) {
        sb.append(emptyOrNewLine).append(line);
        emptyOrNewLine = "\n";
      }
    }
    return sb.toString();
  }
Results of running a command in a shell. Results contain stdout, stderr, and the exit status.
imitate/src/main/java/com/engineer/imitate/shell/CommandResult.java