objects and even with
logical matchers to combine matchers. It is also possible to create your own matchers which fit your domain language.
We can use static import to reduce the amount of code you have to write. Specifically, we can add the following lines to the import section:
import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.*;
In this chapter you will find some examples on how to use the matchers and more importantly you must know beforehand and specify what the expected output is.