public static void ensureInRange(String argumentDescription, int from, int to, int argument) {
        if (argument < from || argument > to) {
            throw new IllegalArgumentException(argumentDescription + " is " + argument +
                                               " but must be between " + from + " and " + to);
        }
    }
Throws an IllegalArgumentException if the given argument is not
in the given range

@param argumentDescription a description of the argument
@param from the range start, inclusive
@param to the range end, inclusive
@param argument the argument value to check
vespajlib/src/main/java/com/yahoo/protect/Validator.java