// Path: remote/src/main/java/org/testng/remote/RemoteTestNG.java
// public static boolean isVerbose() {
//     boolean result = System.getProperty(PROPERTY_VERBOSE) != null || isDebug();
//     return result;
// }


import static org.testng.remote.RemoteTestNG.isVerbose;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.StringReader;
import java.io.UnsupportedEncodingException;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
      if (!"data".equals(name)) {
        throw new IOException("data node then");
      }

      Gson gson = new GsonBuilder().create();
      IMessage message = null;
      switch (type) {
      case GENERIC:
        message = gson.fromJson(reader, GenericMessage.class);
        break;
      case SUITE:
        message = gson.fromJson(reader, SuiteMessage.class);
        break;
      case TEST:
        message = gson.fromJson(reader, TestMessage.class);
        break;
      case TEST_RESULT:
        message = gson.fromJson(reader, TestResultMessage.class);
        break;
      default:
        throw new IOException("unsupported message type: " + msgType + ", raw json: " + jsonMsg);
      }

      reader.endObject();

      return message;
    }
  }

  private static void p(String msg) {
// Path: remote/src/main/java/org/testng/remote/RemoteTestNG.java
// public static boolean isVerbose() {
//     boolean result = System.getProperty(PROPERTY_VERBOSE) != null || isDebug();
//     return result;
// }


// Path: remote/src/main/java/org/testng/remote/strprotocol/JsonMessageSender.java
import static org.testng.remote.RemoteTestNG.isVerbose;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.StringReader;
import java.io.UnsupportedEncodingException;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;

      if (!"data".equals(name)) {
        throw new IOException("data node then");
      }

      Gson gson = new GsonBuilder().create();
      IMessage message = null;
      switch (type) {
      case GENERIC:
        message = gson.fromJson(reader, GenericMessage.class);
        break;
      case SUITE:
        message = gson.fromJson(reader, SuiteMessage.class);
        break;
      case TEST:
        message = gson.fromJson(reader, TestMessage.class);
        break;
      case TEST_RESULT:
        message = gson.fromJson(reader, TestResultMessage.class);
        break;
      default:
        throw new IOException("unsupported message type: " + msgType + ", raw json: " + jsonMsg);
      }

      reader.endObject();

      return message;
    }
  }

  private static void p(String msg) {
    if (isVerbose()) {