title: Can Mockito verify an argument has certain properties/fields?
body: <p>Say I am mocking this class <code>Foo</code></p>
  
  <pre><code>class Foo {
    public void doThing(Bar bar) {
      // ...
    }
  }
  </code></pre>
  
  <p>and this is <code>Bar</code></p>
  
  <pre><code>class Bar {
    private int i;
    public int getI() { return i; }
    public void setI(int i) { this.i = i; }
  }
  </code></pre>
  
  <p>I know I can use Mockito's verify functionality to see if <code>Foo#doThing(Bar)</code> was called on the mock with a specific instance of <code>Bar</code> or any  <code>Bar</code> with <code>Mockito.any(Bar.class)</code>, <strong>but is there some way to ensure it was called by any <code>Bar</code> but with a specific value for <code>i</code> or <code>Bar#getI()</code>?</strong></p>
  
  <p>What I know is possible:</p>
  
  <pre><code>Foo mockedFoo = mock(Foo.class);
  Bar someBar = mock(Bar.class);
  ...
  verify(mockedFoo).doThing(someBar);
  verify(mockedFoo).doThing(any(Bar.class);
  </code></pre>
  
  <p>What I want to know is if there is a way to verify that a <code>Bar</code> with particular things true about it was passed as an argument.</p>