static Set<String> getPeersFromResponse(JSONObject response) throws Exception {
    JSONArray peers = response.getJSONArray(GetPeersHandler.PEERS_FIELD_NAME);
    Set<String> peersFromResponse = new HashSet<>(peers.length());
    for (int i = 0; i < peers.length(); i++) {
      JSONObject peer = peers.getJSONObject(i);
      String peerStr =
          peer.getString(GetPeersHandler.NAME_QUERY_PARAM) + ":" + peer.getInt(GetPeersHandler.PORT_QUERY_PARAM);
      peersFromResponse.add(peerStr);
    }
    return peersFromResponse;
  }
Gets the peers from the response as a {@link Set} of strings, each of the from host:port.
@param response the {@link JSONObject} that contains the peers.
@return the peers from the response as a {@link Set} of strings, each of the from host:port.
@throws Exception
ambry-frontend/src/test/java/com/github/ambry/frontend/GetPeersHandlerTest.java