title: Mockito matcher that compares items in Set, not the Set reference itself
body: <pre><code>when(validator.isValid(Sets.newHashSet("valid"))).thenReturn(true);
  </code></pre>
  
  <p>When <code>validator.isValid(set)</code> is invoked it returns <strong>false</strong>. It is because the validator implementation creates <strong>a new set</strong> that is different that the passed one (reference is different) - the items in both sets are same.</p>
  
  <p>I need to return <strong>true</strong> if sets contains same items regardless of sets instances.</p>
  
  <p>Something similar to <code>org.mockito.Matchers</code>:</p>
  
  <pre><code>public static &lt;T&gt; Set&lt;T&gt; anySetOf(Class&lt;T&gt; clazz) {
          return (Set) reportMatcher(Any.ANY).returnSet();
  }
  </code></pre>
  
  <p>except that I would pass instances not <code>Class&lt;T&gt;.class</code>.</p>
  
  <p>And same for <code>verify</code>:</p>
  
  <pre><code>verify(validator, times(1)).isValid(Sets.newHashSet("valid"));
  </code></pre>
  
  <p>Is there such a matcher?</p>