ticket:3 tests: remove debug
ticket:3 add middleware