StorageRecord[] (int count, @NotNull IntSupplier payloadSizeGenerator) { final ThreadLocalRandom rnd = ThreadLocalRandom.current(); return Stream.generate(() -> { final int payloadSize = payloadSizeGenerator.getAsInt(); return BlobStorageTestBase.randomString(rnd, payloadSize); }) .limit(count) .map(StorageRecord::new) .toArray(StorageRecord[]::new); }