protected static void validateParamsPresence(Map params, String... keys) {
        for (String name : keys) {
            if (!params.containsKey(name)) {
                throw new IllegalArgumentException("parameter: '" + name + "' is missing");
            }
        }
    }
protected static void validateParamsPresence ( Map params , String ... keys ) { for ( String name : keys ) { if ( ! params . containsKey ( name ) ) { throw new IllegalArgumentException ( "parameter: '" + name + "' is missing" ) ; } } }
Will throw {@link IllegalArgumentException} if a key in the map is missing.
If a map does nto have all the passed in keys in it, this method will throw exception.

@param params map with values
@param keys  list of keys to check