title: Verify BiConsumer as method reference in Unit Test
body: <p>I have some logic quite similar to this, where i have unit and different fields that can be updated during request.  </p>
  
  <pre><code>public class Unit {
      int x;
      int y;
  
      public void updateX(int x) {
          this.x += x;
      }
  
      public void updateY(int y) {
          this.y += y;
      }
  }
  
  public class UpdateUnitService{
      public Unit update(int delta, BiConsumer&lt;Unit, Integer&gt; updater){
          Unit unit = getUnit(); //method that can`t be mocked
          updater.accept(unit, delta);
          // some save logic
  
          return unit;
      }
  }
  
  public class ActionHandler{
      private UpdateUnitService service;
  
      public Unit update(Request request){
          if (request.someFlag()){
              return service.update(request.data, Unit::updateX);
          }else {
              return service.update(request.data, Unit::updateY);
          }
      }
  }
  </code></pre>
  
  <p>And I need write some test for checking what function was called. Something like this.</p>
  
  <pre><code>verify(service).update(10, Unit::updateX);
  verify(service).update(10, Unit::updateY);
  </code></pre>
  
  <p>How to write test like this using ArgumentCaptor or something else?</p>