title: Mockito with functions in Dart
body: <p>I have a method that I would like to mock, however when I am trying to verify calls of this method. I get an error that says:</p>
  
  <pre><code>Used on a non-mockito object
  </code></pre>
  
  <p>Here is the simplified code:</p>
  
  <pre><code>test('test',() {
    MockReducer reducer = new MockReducer();
    verify(reducer).called(0);
  });
  
  class MockReducer extends Mock {
    call(state, action) =&gt; state;
  }
  </code></pre>
  
  <p>Why can't I do something like this?</p>