private ByteBuffer fromByteBufToByteBuffer(ByteBuf byteBuf) {
    int size = byteBuf.readableBytes();
    ByteBuffer buffer = ByteBuffer.allocate(size);
    byteBuf.getBytes(0, buffer);
    buffer.flip();
    return buffer;
  }
Create a {@link ByteBuffer} from given {@link ByteBuf} so that they have the same content.
@param byteBuf The given {@link ByteBuf}....
@return The {@link ByteBuffer}.
ambry-router/src/test/java/com/github/ambry/router/CryptoServiceTest.java