added new test for middleware
Merge branch 't3_middleware'