Only load the middleware in the test environment