title: Hamcrest Matcher for an item in an array of a certain class
body: <p>I have a List&lt;Object> and want to verify in jUnit that the list has an object of a certain type.  I tried this:</p>
  
  <pre><code>assertThat(myList,hasItem(isA(ExpectedClass.class)));
  </code></pre>
  
  <p>But, I get this:</p>
  
  <pre>
  java.lang.AssertionError: 
  Expected: a collection containing null
       but: 
      at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
      at org.junit.Assert.assertThat(Assert.java:865)
      at org.junit.Assert.assertThat(Assert.java:832)
  </pre>
  
  <p>Could someone tell me how to build the appropriate matcher?</p>