private ByteBuf createByteBuf() {
    int size = TestUtils.RANDOM.nextInt(MAX_DATA_SIZE - MIN_DATA_SIZE) + MIN_DATA_SIZE;
    byte[] randomData = new byte[size];
    TestUtils.RANDOM.nextBytes(randomData);
    if (isCompositeByteBuf) {
      return fromByteArrayToCompositeByteBuf(randomData);
    } else {
      return ByteBufAllocator.DEFAULT.heapBuffer(size);
    }
  }
Create a {@link ByteBuf} based on whether it should be a composite ByteBuf or not. If it should, then
create a {@link CompositeByteBuf} with three components.
@return A {@link ByteBuf}.
ambry-router/src/test/java/com/github/ambry/router/CryptoServiceTest.java