code: public static <T> List<T> randomListFrom(Supplier<T> elementSupplier, int size) {
      checkArgument(size >= 0, "Size must be greater than or equal to zero");
      return Stream.generate(elementSupplier).limit(size).collect(Collectors.toList());
    }
docs: Returns a list filled from the given element supplier.
  
  @param elementSupplier element supplier to fill list from
  @param size of the random collection to return
  @param <T> the type of element the given supplier returns
  @return list filled from the given element supplier
  @throws IllegalArgumentException if the size is negative