private static String getSDPMessageScript(String peerConnection, String type) throws KiteTestException {
    switch (type) {
      case "offer":
        return "var SDP;"
          + "try {SDP = " + peerConnection + ".remoteDescription;} catch (exception) {} "
          + "if (SDP) {return SDP;} else {return 'unknown';}";
      case "answer":
        return "var SDP;"
          + "try {SDP = " + peerConnection + ".localDescription;} catch (exception) {} "
          + "if (SDP) {return SDP;} else {return 'unknown';}";
      default:
        throw new KiteTestException("Not a valid type for sdp message.", Status.BROKEN);
    }
  }
Returns the test's getSDPMessageScript to retrieve the sdp message for either the offer or answer.
If it doesn't exist then the method returns 'unknown'.

@return the getSDPMessageScript as string.
KITE-Framework/src/main/java/org/webrtc/kite/stats/StatsUtils.java