title: How to negate an ArgumentMatcher in Mockito?
body: <p>I have created a <code>ArgumentMatcher</code>,</p>
  
  <pre><code>private class IsListOf2Elements implements ArgumentMatcher&lt;List&lt;String&gt;&gt;{
      @Override
      public boolean matches(List&lt;String&gt; argument) {
          return ((List&lt;String&gt;)argument).size()==2;
      }
  }
  </code></pre>
  
  <p>I want to negate this match, so match when size is not 2,</p>
  
  <pre><code>Mockito.doReturn(false).when(mock).addAll(Mockito.argThat(AdditionalMatchers.not(new IsListOf2Elements())));
  </code></pre>
  
  <p>But this is not correct. I get,</p>
  
  <pre><code>org.mockito.exceptions.misusing.InvalidUseOfMatchersException: 
  No matchers found for additional matcher Not(?)
  -&gt; at my.test.own.Mockito_aTest.test4e(Mockito_aTest.java:136)
  </code></pre>