title: How can I unit test Eclipse Command Handlers?
body: <p>I have an Eclipse 3.x-based application which uses commands and handlers.</p>
  
  <p>I'm in the process of upping the code coverage and want to test as much as I can. The simple cases (POJOs) I've learned how to test. However, there are cases where I can't find a good starting point, especially when creating a fixture.</p>
  
  <p>For example: Eclipse Command Handlers. I have a handler class <code>MyHandler</code> extending <code>org.eclipse.core.commands.AbstractHandler</code>. It has a single method <code>public Object execute(ExecutionEvent event) throws ExecutionException</code>. Usually, <code>event</code> is passed in from a user action in the GUI, e.g., clicking a menu item.</p>
  
  <p>How can I unit test this? Would I need to <strong>mock</strong> the <code>ExecutionEvent</code> with the help of a mocking framework?</p>