concept Hamcrest matcher in category java

This is an excerpt from Manning's book JUnit in Action MEAP V06.
JUnit 5 provides a lot of overloaded assertion methods. It takes many assertion methods from JUnit 4 and adds a few that can use Java 8 lambdas. All JUnit Jupiter assertions belong to the org.junit.jupiter.api.Assertions class and are static methods. The assertThat() method that works with Hamcrest matchers has been removed. The recommended approach in such a case is to use the Hamcrest MatcherAssert.assertThat() overloaded methods, which are more flexible and in the spirit of the Java 8 capabilities.

This is an excerpt from Manning's book Java Testing with Spock.
Spock supports Hamcrest matchers natively, as shown in the following listing.

This is an excerpt from Manning's book JUnit in Action, Second Edition.
Here we reuse listing 3.17 and add another test method to it. This time we import the needed matchers and the assertThat method
, and after that we construct a test method. In the test method we use one of the most powerful features of the matchers—they can nest within each other
. Whether you prefer assertion code with or without Hamcrest matchers is a personal preference. What Hamcrest gives you that standard assertions don’t provide is a human-readable description of an assertion failure.