I want to use a Hamcrest matcher inside a TestNG test and with a soft assert specifically. How can I do this? I know that I can use Hamcrest's assertions inside a test like:
assertThat(actual, containsInAnyOrder(expected));
But I can't understand how can I use TestNG soft assert method like this one:
SoftAssert softAssert = new SoftAssert();
together with a Hamcrest matcher.
Because I can't invoke the Hamcrest's assertThat on TestNG's softAssert like softAssert.assertThat(...)
So, what is the correct way to use a Hamcrest matcher together with TestNG?