// Path: ctk-transport/src/main/java/org/ga4gh/ctk/transport/WireTracker.java
// public class WireTracker {
//     final static Logger log = getLogger(WireTracker.class);
// 
//     /**
//      * <p>The target url with which this WireTracker communicated.</p>
//      */
//     public String theUrl;
// 
//     /**
//      * <p>The string BODY sent to the target.</p>
//      */
//     public String bodySent;
// 
//     /**
//      * <p>The string BODY received from the target</p>
//      */
//     public String bodyReceived;
// 
//     private GAException gae;
// 
//     private String gaeMessage; // convenience and in case non-parseable
// 
//     private int gaeErrorCode; // convenience and in case non-parseable
// 
//     /**
//      * <p>Returns true if and only if a {@link GAException} was received on this interaction,
//      * AND it was parsable.</p>
//      * <p>If it's non-parseable then the gaeMessage field
//      * will hold the returned BODY (same as the bodyReceived field) and the
//      * gaeErrorCode will be set to -1</p>
//      *
//      * @return true if we received a {@link GAException} on this interaction
//      */
//     @SuppressWarnings("ThrowableResultOfMethodCallIgnored")
//     public boolean gotParseableGAE() {
//         return getGae() != null;
//     }
// 
//     private boolean parseableGae = false;
// 
//     RespCode responseStatus;
// 
//     public int getErrorCode() {
//         return gaeErrorCode;
//     }
// 
//     public String getMessage() {
//         return gaeMessage;
//     }
// 
//     public GAException getGae() {
//         if (responseStatus != RespCode.OK) {
//             // parse the received body
//             Gson gson = new Gson();
//             try {
//                 gae = gson.fromJson(bodyReceived, GAException.class);
//                 gaeMessage = gae.getMessage();
//                 gaeErrorCode = gae.getErrorCode();
//             } catch (Exception e) {
//                 log.warn("Parse failure on GAException: BODY < " + bodyReceived + " > " + e
//                         .toString());
//                 gaeErrorCode = -1;
//                 gaeMessage = bodyReceived;
//                 parseableGae = false;
//                 gae = null;
//             }
//         }
//         return gae;
//     }
// 
//     public RespCode getResponseStatus() {
//         return responseStatus;
//     }
// 
//     public void setResponseStatus(RespCode responseStatus) {
//         this.responseStatus = responseStatus;
//     }
// }


import com.google.common.base.CharMatcher;
import com.google.common.collect.HashBasedTable;
import com.google.common.collect.Table;
import com.google.protobuf.GeneratedMessage;
import com.google.protobuf.InvalidProtocolBufferException;
import com.google.protobuf.util.JsonFormat;
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.JsonNode;
import com.mashape.unirest.http.exceptions.UnirestException;
import ga4gh.Common;
import org.apache.http.HttpStatus;
import org.ga4gh.ctk.transport.GAWrapperException;
import org.ga4gh.ctk.transport.WireTracker;
import static org.ga4gh.ctk.transport.RespCode.fromInt;
import static org.ga4gh.ctk.transport.TransportUtils.makeUrl;
import static org.slf4j.LoggerFactory.getLogger;
package org.ga4gh.ctk.transport.protobuf;



public abstract class Base<T extends GeneratedMessage.Builder> {

    static org.slf4j.Logger log;

    /**
     * <p>Holds the message traffic sent/received during the entire test run.
     * Intended to support test quality/coverage reporting.</p>
     */
    private static Table<String, String, Integer> messages;

    static {
        log = getLogger(Base.class);
        messages = HashBasedTable.create();
    }

    /**
     * url root to system-under-test; e.g., "http://localhost:8000"
     */
    private final String urlRoot;

    private final String path;

// Path: ctk-transport/src/main/java/org/ga4gh/ctk/transport/WireTracker.java
// public class WireTracker {
//     final static Logger log = getLogger(WireTracker.class);
// 
//     /**
//      * <p>The target url with which this WireTracker communicated.</p>
//      */
//     public String theUrl;
// 
//     /**
//      * <p>The string BODY sent to the target.</p>
//      */
//     public String bodySent;
// 
//     /**
//      * <p>The string BODY received from the target</p>
//      */
//     public String bodyReceived;
// 
//     private GAException gae;
// 
//     private String gaeMessage; // convenience and in case non-parseable
// 
//     private int gaeErrorCode; // convenience and in case non-parseable
// 
//     /**
//      * <p>Returns true if and only if a {@link GAException} was received on this interaction,
//      * AND it was parsable.</p>
//      * <p>If it's non-parseable then the gaeMessage field
//      * will hold the returned BODY (same as the bodyReceived field) and the
//      * gaeErrorCode will be set to -1</p>
//      *
//      * @return true if we received a {@link GAException} on this interaction
//      */
//     @SuppressWarnings("ThrowableResultOfMethodCallIgnored")
//     public boolean gotParseableGAE() {
//         return getGae() != null;
//     }
// 
//     private boolean parseableGae = false;
// 
//     RespCode responseStatus;
// 
//     public int getErrorCode() {
//         return gaeErrorCode;
//     }
// 
//     public String getMessage() {
//         return gaeMessage;
//     }
// 
//     public GAException getGae() {
//         if (responseStatus != RespCode.OK) {
//             // parse the received body
//             Gson gson = new Gson();
//             try {
//                 gae = gson.fromJson(bodyReceived, GAException.class);
//                 gaeMessage = gae.getMessage();
//                 gaeErrorCode = gae.getErrorCode();
//             } catch (Exception e) {
//                 log.warn("Parse failure on GAException: BODY < " + bodyReceived + " > " + e
//                         .toString());
//                 gaeErrorCode = -1;
//                 gaeMessage = bodyReceived;
//                 parseableGae = false;
//                 gae = null;
//             }
//         }
//         return gae;
//     }
// 
//     public RespCode getResponseStatus() {
//         return responseStatus;
//     }
// 
//     public void setResponseStatus(RespCode responseStatus) {
//         this.responseStatus = responseStatus;
//     }
// }


// Path: ctk-transport/src/main/java/org/ga4gh/ctk/transport/protobuf/Base.java
import com.google.common.base.CharMatcher;
import com.google.common.collect.HashBasedTable;
import com.google.common.collect.Table;
import com.google.protobuf.GeneratedMessage;
import com.google.protobuf.InvalidProtocolBufferException;
import com.google.protobuf.util.JsonFormat;
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.JsonNode;
import com.mashape.unirest.http.exceptions.UnirestException;
import ga4gh.Common;
import org.apache.http.HttpStatus;
import org.ga4gh.ctk.transport.GAWrapperException;
import org.ga4gh.ctk.transport.WireTracker;
import static org.ga4gh.ctk.transport.RespCode.fromInt;
import static org.ga4gh.ctk.transport.TransportUtils.makeUrl;
import static org.slf4j.LoggerFactory.getLogger;

package org.ga4gh.ctk.transport.protobuf;



public abstract class Base<T extends GeneratedMessage.Builder> {

    static org.slf4j.Logger log;

    /**
     * <p>Holds the message traffic sent/received during the entire test run.
     * Intended to support test quality/coverage reporting.</p>
     */
    private static Table<String, String, Integer> messages;

    static {
        log = getLogger(Base.class);
        messages = HashBasedTable.create();
    }

    /**
     * url root to system-under-test; e.g., "http://localhost:8000"
     */
    private final String urlRoot;

    private final String path;

    final WireTracker wireTracker;