public void doRequestAndHealthCheck(PartitionId partitionId, String description, JSONObject expectedResponse)
      throws IOException, InterruptedException {

    int correlationId = TestUtils.RANDOM.nextInt();
    String clientId = TestUtils.getRandomString(10);

    AdminRequest adminRequest =
        new AdminRequest(AdminRequestOrResponseType.HealthCheck, partitionId, correlationId, clientId);

    AdminResponseWithContent response =
        (AdminResponseWithContent) sendRequestGetResponse(adminRequest, ServerErrorCode.NoError);
    String content = new String(response.getContent(), StandardCharsets.UTF_8);

    //Ensures the response is as expected
    JSONObject contentJSON = new JSONObject(content);

    //Either compares the health by string or compares the arrays without order
    assertEquals(description, expectedResponse.toString(), contentJSON.toString());
  }
Performs the AdminRequest and Response as well as checking if the content is a json and expected
@param partitionId necessary to fulfill the {@link AdminRequest}
@param description for what this function call is attempting to test
@param expectedResponse the response that should be returned from {@link AdminResponseWithContent}
@throws IOException
@throws InterruptedException
ambry-server/src/test/java/com/github/ambry/server/AmbryServerRequestsTest.java