If you got used to JUnit 4’s assertThat with various matchers (of course you will need junit-dep.jar and hamcrest.jar to get the full set instead of the small subset integrated in junit.jar), make sure you don’t overlook the matcher hasProperty. It is very useful if you have non-trivial objects and cannot use some more flexibleContinue reading “hasProperty, the Hidden Gem of Hamcrest (and assertThat)”