@Test
  public void testDecompressContent() throws Exception {
    // Prepare the requirement settings to create GetBlobOperation instance.
    MockDataNodeId dn1 = new MockDataNodeId("dn1", Collections.singletonList(new Port(6667, PortType.PLAINTEXT)),
        Collections.singletonList("/tmp"), "DC1");
    MockDataNodeId dn2 = new MockDataNodeId("dn2", Collections.singletonList(new Port(6667, PortType.PLAINTEXT)),
        Collections.singletonList("/tmp"), "DC2");
    MockPartitionId partitionId = new MockPartitionId(1, "default", Arrays.asList(dn1, dn2), 0);
    BlobId blobId =
        new BlobId(BlobId.BLOB_ID_V6, BlobId.BlobIdType.CRAFTED, (byte) 1, (short) 2, (short) 3, partitionId, false,
            BlobId.BlobDataType.DATACHUNK);

    // Create GetBlobOperation instance and get the FirstChunk instance.
    GetBlobOperation op =
        new GetBlobOperation(routerConfig, routerMetrics, mockClusterMap, responseHandler, blobId, options, null,
            routerCallback, blobIdFactory, kms, cryptoService, cryptoJobHandler, time, false, quotaChargeCallback,
            this.blobMetadataCache, router, compressionService);
    Object firstChunk = FieldUtils.readField(op, "firstChunk", true);
    FieldUtils.writeField(firstChunk, "isChunkCompressed", true, true);

    // Generate the test compressed buffer.
    ByteBuffer sourceBuffer =
        ByteBuffer.wrap("Compression unit test to test compression.".getBytes(StandardCharsets.UTF_8));
    ZstdCompression zstd = new ZstdCompression();
    ByteBuffer compressedBuffer = ByteBuffer.allocate(zstd.getCompressBufferSize(sourceBuffer.remaining()));
    zstd.compress(sourceBuffer, compressedBuffer);

    // Invoke the decompressContent method on the compressed buffer.
    ByteBuf compressedByteBuf = Unpooled.wrappedBuffer((ByteBuffer) compressedBuffer.flip());
    ByteBuf decompressedByteBuf =
        (ByteBuf) MethodUtils.invokeMethod(firstChunk, true, "decompressContent", compressedByteBuf);
    byte[] decompressedData = new byte[decompressedByteBuf.readableBytes()];
    decompressedByteBuf.readBytes(decompressedData);
    decompressedByteBuf.release();

    Assert.assertArrayEquals(sourceBuffer.array(), decompressedData);
  }
Test the Errors {@link RouterErrorCode} received by Get Operation. The operation exception is set
based on the priority of these errors.
@throws Exception
ambry-router/src/test/java/com/github/ambry/router/GetBlobOperationTest.java