Use Hamcrest style in all test cases

Hamcrest (http://hamcrest.org/) is a framework for creating matchers, and these matchers are largely used in unit testings. Lately, new unit testing frameworks absorb this idea and natively support matchers . There are some advantages to use Hamcrest style in test cases:

* it's easier to know which object is the one comparing with
* more diagnostic error messages
* unit testing becomes more flexible and powerful by extending the matchers
* matchers are reusable
* test code is more readable and cleaner

By taking these advantage, this patch rewrites all existing test cases into Hamcrest style.