Added unit test for block database.