Add test case for block1.

Also split test cases into different functions so that it is easy to debug.