public static Field randomWordsField(final String name,
                                         final int minCount,
                                         final int maxCount,
                                         final List<String> wordList) {
        try {
            Utils.checkArgument(minCount >= 0, "minCount must be >= 0");
            Utils.checkArgument(maxCount >= minCount, "maxCount must be >= minCount");
            Objects.requireNonNull(wordList);
            Utils.checkArgument(!wordList.isEmpty(),
                    () -> Utils.message(
                            "wordList must have size greater than zero, size {}",
                            wordList.size()));

            final ValueFunction supplier = (random, ignoredFaker) -> {
                int wordCount = random.nextInt(maxCount - minCount + 1) + minCount;
                return IntStream.rangeClosed(0, wordCount)
                        .boxed()
                        .map(i -> wordList.get(random.nextInt(wordList.size())))
                        .collect(Collectors.joining(" "))
                        .replaceAll("(^\\s+|\\s+$)", "") //remove leading/trailing spaces
                        .replaceAll("\\s\\s+", " "); //replace multiple spaces with one
            };

            return new Field(name, supplier);
        } catch (Exception e) {
            throw new RuntimeException(Utils.message("Error building randomWordsField, {}, {}", name, e.getMessage()),
                    e);
        }
    }
A field populated with a random number (between minCount and maxCount) of
words separated by ' ' as picked randomly from wordList

@param name     Field name for use in the header
@param minCount The minimum number of words to use when generation values
@param maxCount The maximum number of words to use when generation values
@param wordList The list of words to choose from when building values
@return A complete {@link Field}
stroom-test-common/src/main/java/stroom/test/common/data/DataGenerator.java