public static short valueOrThrow(String key, Map<String, Short> versionRangeMap) {
        final Short value = versionRangeMap.get(key);
        if (value == null) {
            throw new IllegalArgumentException(String.format("%s absent in [%s]", key, mapToString(versionRangeMap)));
        }
        return value;
    }
Raises an exception unless the following condition is met:
minValue >= 0 and maxValue >= 0 and maxValue >= minValue.

@param minKeyLabel   Label for the min version key, that's used only to convert to/from a map.
@param minValue      The minimum version value.
@param maxKeyLabel   Label for the max version key, that's used only to convert to/from a map.
@param maxValue      The maximum version value.

@throws IllegalArgumentException   If any of the following conditions are true:
                                    - (minValue < 0) OR (maxValue < 0) OR (maxValue < minValue).
                                    - minKeyLabel is empty, OR, minKeyLabel is empty.
clients/src/main/java/org/apache/kafka/common/feature/BaseVersionRange.java