static List<Set<TaskId>> getRandomSubset(final Set<TaskId> taskIds, final int listSize) {
        final Random rand = getRandom();
        final List<TaskId> taskIdList = new ArrayList<>(taskIds);
        Collections.shuffle(taskIdList, rand);
        int start = 0;
        final List<Set<TaskId>> subSets = new ArrayList<>(listSize);
        for (int i = 0; i < listSize; i++) {
            final int remaining = taskIdList.size() - start;
            final Set<TaskId> subset = new HashSet<>();
            if (remaining != 0) {
                // In last round, get all tasks
                final int subSetSize = (i == listSize - 1) ? remaining : rand.nextInt(remaining) + 1;
                for (int j = 0; j < subSetSize; j++) {
                    subset.add(taskIdList.get(start + j));
                }
                start += subSetSize;
            }
            subSets.add(subset);
        }
        return subSets;
    }
Builds a ProcessId with a UUID by repeating the given number n. For valid n, it is guaranteed that the returned UUIDs satisfy
the same relation relative to others as their parameter n does: iff n < m, then uuidForInt(n) < uuidForInt(m)
streams/src/test/java/org/apache/kafka/streams/processor/internals/assignment/AssignmentTestUtils.java