private static Set<TaskId> decodeTasks(final ByteBuffer data, final int version) {
        final Set<TaskId> prevTasks = new HashSet<>();
        final int numPrevTasks = data.getInt();
        for (int i = 0; i < numPrevTasks; i++) {
            prevTasks.add(readTaskIdFrom(data, version));
        }
        return prevTasks;
    }
@throws TaskAssignmentException if method fails to decode the data
streams/src/test/java/org/apache/kafka/streams/processor/internals/assignment/LegacySubscriptionInfoSerde.java