public static BytesValueRLPOutput randomRLPValue(final int randomSeed) {
    final Random random = new Random(randomSeed);
    final BytesValueRLPOutput out = new BytesValueRLPOutput();
    final AtomicInteger listDepth = new AtomicInteger(0);
    int iterations = 0;
    do {
      if (iterations > 1000) {
        out.endList();
        listDepth.decrementAndGet();
        continue;
      }
      iterations += 1;

      writeRandomRLPData(out, random, listDepth);
    } while (listDepth.get() > 0);

    return out;
  }
Generate a random rlp-encoded value.

@param randomSeed Seed to use for random generation.
@return a random rlp-encoded value
ethereum/rlp/src/test-support/java/org/hyperledger/besu/ethereum/rlp/util/RLPTestUtil.java