UPD: use more advanced hamcrest matchers where possible.