Added the MIDDLEWARE for the tests.