HttpMiddleware tests