code: public void checkInvalidParameters() {
      	for(String key: map.keySet()) {
      		boolean wasRequested = requestedKeys != null && requestedKeys.contains(key);
      		if(!wasRequested) throw new IllegalArgumentException("Unknown parameter " + key);
      		
      	}
      }
docs: Checks that there are no more parameters than those that have ever been requested.
  Call this after you processed all parameters you need if you want
  an IllegalArgumentException to be thrown if there are more parameters