import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.hasItem;
import static org.hamcrest.Matchers.equalTo;
assertThat(actual, hasItem(hasProperty("id", equalTo(1L))));
where actual is a POJO with id as Long.
I get,
The method assertThat(T, Matcher<? super T>) in the type MatcherAssert is not applicable for the arguments (List, Matcher<Iterable<? super Object>>)
From various documentation and other stackoverflow pages, it should be valid, but I get the above error.