Middleware test