public static Field randomClassNamesField(final String name,
                                              final int minCount,
                                              final int maxCount) {
        try {
            final List<String> classNames;
            try {
                classNames = ClassNamesListHolder.getClassNames();
            } catch (final RuntimeException e) {
                throw new RuntimeException(String.format("Error getting class names list", e.getMessage()), e);
            }

            Preconditions.checkNotNull(classNames);
            Preconditions.checkArgument(!classNames.isEmpty(),
                    "classNames cannot be empty, something has gone wrong finding the class names");

            return randomWordsField(name, minCount, maxCount, classNames);
        } catch (final RuntimeException e) {
            throw new RuntimeException(String.format("Error building randomClassNamesField, %s, %s",
                    name,
                    e.getMessage()), e);
        }
    }
A field populated with a random number (between minCount and maxCount) of
words separated by ' '. The words are picked at random from all the class
names in the 'java' package on the classpath
stroom-test-common/src/main/java/stroom/test/common/data/DataGenerator.java