code: public static <T> Set<T> getRandomSubset(Set<T> set, int count) {
  		Set<T> result = new HashSet<>();
  		HashList<T> opSet = new HashList<>(set);
  		while (result.size() < count) {
  			int next = rand.nextInt(opSet.size());
  			if (!result.contains(opSet.get(next))) {
  				result.add(opSet.get(next));
  			}
  		}
  		return result;
  	}
docs: Generates a random subset of <code>set</code>, that contains exactly
  <code>maxCount</code> elements.
  
  @param <T>
  Type of set elements
  @param set
  Basic set for operation
  @param count
  Number of items
  @return A subset with exactly <code>count</code> elements