public <T> T next(Iterable<T> iterable) {
    List<T> list = requireNonNulls(requireNonEmpty(stream(iterable.spliterator(), false)
        .collect(toList())));
    return list.get(nextInt(0, list.size() - 1));
  }
Returns the next pseudorandom, uniformly distributed element from the specified iterable as
indexed by this random number generator's sequence.

@param <T> the type of the elements
@param iterable the range of values (inclusive) for the pseudorandom.
@return the next pseudorandom, uniformly distributed element from the specified iterable as
        indexed by this random number generator's sequence.
@throws NullPointerException if iterable is null.
@throws IllegalArgumentException if iterable is empty.
geode-junit/src/main/java/org/apache/geode/test/junit/rules/RandomRule.java