title: How to check for size AND presence of some items in collections in hamcrest
body: <p>I'm using Hamcrest 1.3 and trying to achieve the following in a more compact way.</p>
  
  <p>Consider following test case:</p>
  
  <pre><code>@Test
  public void testCase() throws Exception {
  
      Collection&lt;String&gt; strings = Arrays.asList(
          "string one",
          "string two",
          "string three"
      );
  
      // variant 1:
      assertThat(strings, hasSize(greaterThan(2)));
      assertThat(strings, hasItem(is("string two")));
  
      // variant 2:
      assertThat(strings, allOf(
          hasSize(greaterThan(2)),
          hasItem(is("string two"))
      ));
  }
  </code></pre>
  
  <p>the goal here is to check for both size of collection AND some specific items to be included.</p>
  
  <p>Where first variation is possible and accepted, it is not always that easy to do it, because maybe the collection is itself a result of some other operations and therefore it makes more sense to do all the operations on it using an <code>allOf</code> operation. Which is done in second variation above.</p>
  
  <p>However containing the code of second variation will result in following compile time error:</p>
  
  <pre><code>error: no suitable method found for allOf(Matcher&lt;Collection&lt;? extends Object&gt;&gt;,Matcher&lt;Iterable&lt;? extends String&gt;&gt;)
  </code></pre>
  
  <p>Is there actually any specific way of testing for size AND items of a collection in Hamcrest using a single shot operation (like <code>allOf</code>)?</p>