### Question:
PgException extends RuntimeException { @Override public String getMessage() { StringBuffer sb = new StringBuffer(); append(sb, "message", getErrorMessage()); append(sb, "severity", getSeverity()); append(sb, "code", getCode()); append(sb, "detail", getDetail()); append(sb, "hint", getHint()); append(sb, "position", getPosition()); append(sb, "internalPosition", getInternalPosition()); append(sb, "internalQuery", getInternalQuery()); append(sb, "where", getWhere()); append(sb, "file", getFile()); append(sb, "line", getLine()); append(sb, "routine", getRoutine()); append(sb, "schema", getSchema()); append(sb, "table", getTable()); append(sb, "column", getColumn()); append(sb, "dataType", getDataType()); append(sb, "constraint", getConstraint()); if (sb.length() == 0) { return "{}"; } sb.append(" }"); sb.setCharAt(0, '{'); return sb.toString(); } PgException(String errorMessage, String severity, String code, String detail);  PgException(String errorMessage, String severity, String code, String detail, String hint, String position,
      String internalPosition, String internalQuery, String where, String file, String line, String routine,
      String schema, String table, String column, String dataType, String constraint); String getErrorMessage(); String getSeverity(); String getCode(); String getDetail(); String getHint(); String getPosition(); String getWhere(); String getFile(); String getLine(); String getRoutine(); String getSchema(); String getTable(); String getColumn(); String getDataType(); String getConstraint(); String getInternalPosition(); String getInternalQuery(); @Override String getMessage();  }### Answer:
@Test public void nullFieldConstructor() { assertEquals("{}", new PgException(null, null, null, null).getMessage()); }
@Test public void nullErrorResponseConstructor() { assertEquals("{}", ResponseHelper.getEmptyPgException().getMessage()); }