Added a test for the Middleware.