title: hamcrest hasItem and hasProperty, assert if a object with property value exists
body: <pre><code>import static org.hamcrest.MatcherAssert.assertThat;
  import static org.hamcrest.Matchers.hasItem;
  import static org.hamcrest.Matchers.equalTo;
  
  assertThat(actual, hasItem(hasProperty(&quot;id&quot;, equalTo(1L))));
  </code></pre>
  <p>where actual is a POJO with id as Long.</p>
  <p>I get,</p>
  <blockquote>
  <p>The method assertThat(T, Matcher&lt;? super T&gt;) in the type
  MatcherAssert is not applicable for the arguments (List,
  Matcher&lt;Iterable&lt;? super Object&gt;&gt;)</p>
  </blockquote>
  <p>From various documentation and other stackoverflow pages, it should be valid, but I get the above error.</p>