@bmizerany 
I want to keep the tests as the same as possible in this PR, and keep the existing APIs.
This PR has covered a lot of stuffs yet, and I think it may be worse to involve more stuffs.