ticket:3 fix test for middleware