add test and container middleware
add test and container middleware