title: Check if method was called on EasyMock
body: <p>Using EasyMock 3.2. In order to unit test an UI, I have to mock some dependencies. One of them is <code>Page</code>. Base class for UI tests looks like this:</p>
  
  <pre><code>abstract class AbstractUiTest {
      @Before
      public function setUpUiDependencies() {
          Page page = createNiceMock(Page.class);
          Ui.setCurrentPage(page);
      }
  }
  </code></pre>
  
  <p>Most of the time I don't use the page explicity, it's just there not to throw NullPointerException when e.g. Ui calls <code>getPage().setTitle("sth")</code> etc.</p>
  
  <p>However, in a few tests I want to explicity check if something has happend with the page, e.g.:</p>
  
  <pre><code>public class SomeTest extends AbstractUiTest {
      @Test
      public void testNotification() {
          // do something with UI that should cause notification
          assertNotificationHasBeenShown();
      }
  
      private void assertNotificationHasBeenShown() {
          Page page = Ui.getCurrentPage(); // this is my nice mock
          // HERE: verify somehow, that page.showNotification() has been called
      }
  }
  </code></pre>
  
  <p>How to implement the assertion method? I would really want to implement it without recording behavior to the page, replaying and verifying it. My problem is a bit more complicated, but you should get the point.</p>