I was thinking of something like: 
```java
    public static enum TestQueryType {
        MATCH_ALL {
            @Override
            public QueryBuilder buildQuery() {
                return QueryBuilders.matchAllQuery();
            }
        },
        MATCH {
            @Override
            public QueryBuilder buildQuery() {
                return QueryBuilders.matchQuery(TestIndexField.STRING_FIELD.toString(),
                        randomAsciiOfLengthBetween(MIN_SMALL_INTERVAL, MAX_SMALL_INTERVAL));
            }
        },
        TERM {
            @Override
            public QueryBuilder buildQuery() {
                return QueryBuilders.termQuery(TestIndexField.STRING_FIELD.toString(),
                        randomAsciiOfLengthBetween(MIN_SMALL_INTERVAL, MAX_SMALL_INTERVAL));
            }
        },
        QUERY_STRING {
            @Override
            public QueryBuilder buildQuery() {
                return QueryBuilders.wildcardQuery(TestIndexField.STRING_FIELD.toString(),
                        randomBoolean() ? "*" : "?");
            }
        },
        WILDCARD {
            @Override
            public QueryBuilder buildQuery() {
                return QueryBuilders.wildcardQuery(TestIndexField.STRING_FIELD.toString(),
                        randomBoolean() ? "*" : "?");
            }
        };

        public abstract QueryBuilder buildQuery();
    }
```

Then to build a random query, you could do:
```java
randomFrom(TestQueryType.values()).buildQuery();
```