private FileCopyGetChunkResponse getFileCopyGetChunkResponse(File indexFile)
      throws IOException {
    ByteBuf byteBuf = Unpooled.buffer();
    byte[] indexFile1Bytes = Files.readAllBytes(indexFile.toPath());
    byteBuf.writeBytes(indexFile1Bytes);
    DataInputStream fileStream = new DataInputStream(new ByteBufferInputStream(byteBuf.nioBuffer()));

    return new FileCopyGetChunkResponse(
        FileCopyGetChunkResponse.FILE_COPY_CHUNK_RESPONSE_VERSION_V_1, 0, "clientId",
        ServerErrorCode.NoError, fileCopyInfo.getTargetReplicaId().getPartitionId(), indexFile.getName(), fileStream,
        0, indexFile.length(), false);
  }
For the given index file, this method creates a {@link FileCopyGetChunkResponse} object
with the chunk data read from the file.
ambry-file-transfer/src/test/java/com/github/ambry/filetransfer/handler/StoreFileCopyHandlerIntegTest.java