@Test
  public void testStoreFileChunkFrom() throws IOException {
    String fileName = "testFile";
    long fileSize = 12345L;
    ByteBuf byteBuf = Unpooled.buffer();
    byteBuf.writeBytes(fileName.getBytes());
    byteBuf.writeLong(fileSize);
    DataInputStream fileStream = new DataInputStream(new ByteBufferInputStream(byteBuf.nioBuffer()));

    // Read the byte buffer and create a StoreFileChunk object
    StoreFileChunk storeFileChunk = StoreFileChunk.from(byteBuf.nioBuffer());

    // Assert that the file chunk object has the correct values
    Assert.assertEquals(storeFileChunk.getChunkLength(), fileStream.available());
    Assert.assertTrue(areStreamsEqual(fileStream, storeFileChunk.getStream()));
    byteBuf.release();
  }
Test the {@link StoreFileChunk#from} method.
@throws IOException
ambry-protocol/src/test/java/com/github/ambry/protocol/RequestResponseTest.java