@Test
  public void testCompositeBlobRawMode() throws Exception {
    options = new GetBlobOptionsInternal(
        new GetBlobOptionsBuilder().operationType(GetBlobOptions.OperationType.All).rawMode(true).build(), false,
        routerMetrics.ageAtGet);

    for (int numChunks = 2; numChunks < 10; numChunks++) {
      blobSize = numChunks * maxChunkSize;
      doPut();
      if (testEncryption) {
        getAndAssertSuccess();
        ByteBuffer payload = getBlobBuffer();
        // extract chunk ids
        BlobAll blobAll =
            MessageFormatRecord.deserializeBlobAll(new ByteArrayInputStream(payload.array()), blobIdFactory);
        ByteBuf metadataBuffer = blobAll.getBlobData().content();
        try {
          CompositeBlobInfo compositeBlobInfo =
              MetadataContentSerDe.deserializeMetadataContentRecord(metadataBuffer.nioBuffer(), blobIdFactory);
          Assert.assertEquals("Total size didn't match", blobSize, compositeBlobInfo.getTotalSize());
          Assert.assertEquals("Chunk count didn't match", numChunks, compositeBlobInfo.getKeys().size());
        } finally {
          metadataBuffer.release();
        }

        // TODO; test raw get on each chunk (needs changes to test framework)
      } else {
        // Only supported for encrypted blobs now
      }
      assertEquals(0, routerMetrics.shuffledWithRemoteReplicasForGetDueToFewLocalReplicas.getCount());
    }
  }
Test gets of composite blob in raw mode.
ambry-router/src/test/java/com/github/ambry/router/GetBlobOperationTest.java