Added test case for subcontroller middlewares