code: @VisibleForTesting
    static boolean isUnterminatedString(String message, boolean alreadyInString) {
      boolean escaped = false;
      boolean inString = alreadyInString;
      for (int i = 0; i < message.length(); i++) {
        final char c = message.charAt(i);
        if (inString) {
          if (c == '\\') {
            escaped = !escaped;
          } else if (c == '"') {
            if (!escaped)
              inString = false;
            escaped = false;
          } else
            escaped = false;
        } else
          inString = c == '"';
      }
      return inString;
    }
docs: Check for string termination, will check for quote escaping, but only if it's escaped
  within a string... otherwise it's illegal and we'll treat it as a regular quote.
  A trailing backslash indicates a \CRLF was received (as envisaged in RFC 822 3.4.5).