code: public static <E> Matcher<Iterable<E>> hasSize(final int size) {
          checkArgument(size >= 0, "Size cannot be negative");
  
          return new IsIterableWithSize(size);
      }
docs: Creates a matcher for {@link Iterable}s that matches when the examined {@link Iterable} yields an item count
  equal to <code>size</code>.
  <p>
  <p>For example:
  <pre>assertThat(Arrays.asList("foo", "bar"), hasSize(2))</pre>
  
  returns <code>true</code>.