Throttle middleware and tests