add init middleware test
add authorize middleware test