Refactor static server middleware test