    private String processRequest(String requestJson) throws IOException {
        checkNotNull(requestJson);
        this.nodeStdin.println(requestJson);
        String resultJson = null;
        do {
            String line = this.nodeStdout.readLine();
            if (line.startsWith("DEBUG")) {
                System.out.println(line);
            } else if (line.startsWith("ERROR")) {
                line = line.substring(7, line.length()); 
                line = line.replaceAll("\\\\n", "\n"); 
                line = line.replaceAll("    ", "\t"); 
                throw new RuntimeException("The following request caused an error to be thrown:" + LINE_SEPARATOR
                        + requestJson + LINE_SEPARATOR
                        + line);
            } else {
                resultJson = line;
            }
        } while (resultJson == null);
        return resultJson;
    }

    private String processRequest(String requestJson) throws IOException {
        checkNotNull(requestJson);
        this.nodeStdin.println(requestJson);
        String resultJson = null;
        do {
            String line = this.nodeStdout.readLine();
            if (line.startsWith("DEBUG")) {
                System.out.println(line);
            } else if (line.startsWith("ERROR")) {
                line = line.substring(7, line.length()); 
                line = line.replaceAll("\\\\n", LINE_SEPARATOR); 
                line = line.replaceAll("    ", "\t"); 
                throw new RuntimeException("The following request caused an error to be thrown:" + LINE_SEPARATOR
                        + requestJson + LINE_SEPARATOR
                        + line);
            } else {
                resultJson = line;
            }
        } while (resultJson == null);
        return resultJson;
    }
