@Test
  public void getReplicasTest() throws Exception {
    List<? extends PartitionId> partitionIds = CLUSTER_MAP.getWritablePartitionIds(null);
    for (PartitionId partitionId : partitionIds) {
      String originalReplicaStr = partitionId.getReplicaIds().toString().replace(", ", ",");
      BlobId blobId = new BlobId(CommonTestUtils.getCurrentBlobIdVersion(), BlobId.BlobIdType.NATIVE,
          ClusterMap.UNKNOWN_DATACENTER_ID, Account.UNKNOWN_ACCOUNT_ID, Container.UNKNOWN_CONTAINER_ID, partitionId,
          false, BlobId.BlobDataType.DATACHUNK);
      FullHttpRequest httpRequest = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET,
          blobId.getID() + "/" + RestUtils.SubResource.Replicas, Unpooled.buffer(0));
      ResponseParts responseParts = nettyClient.sendRequest(httpRequest, null, null).get();
      HttpResponse response = getHttpResponse(responseParts);
      assertEquals("Unexpected response status", HttpResponseStatus.OK, response.status());
      verifyTrackingHeaders(response);
      ByteBuffer content = getContent(responseParts.queue, HttpUtil.getContentLength(response));
      JSONObject responseJson = new JSONObject(new String(content.array()));
      String returnedReplicasStr = responseJson.get(GetReplicasHandler.REPLICAS_KEY).toString().replace("\"", "");
      assertEquals("Replica IDs returned for the BlobId do no match with the replicas IDs of partition",
          originalReplicaStr, returnedReplicasStr);
    }
  }
Tests {@link RestUtils.SubResource#Replicas} requests
<p/>
For each {@link PartitionId} in the {@link ClusterMap}, a {@link BlobId} is created. The replica list returned from
server is checked for equality against a locally obtained replica list.
@throws Exception
ambry-frontend/src/integration-test/java/com/github/ambry/frontend/FrontendIntegrationTest.java