@Test public void testActionPerformed() throws Exception { // Verify behavior: calling actionPerformed sends an event AnActionEvent event = null; // Using null since I can't figure out how to create one of these String name = "myAction"; Map<String, String> properties = new HashMap<String, String>(); TestAction testAction = new TestAction(name); testAction.actionPerformed(event); assertLogged("sendEvent(myAction, {VSO.Plugin.Property.Name=myAction})"); // Verify behavior: exception in actionPerformed sends the start event and then logs the // exception name = "myAction2"; testAction = new TestAction(name); testAction.setThrowOnActionPerformed(true); testAction.actionPerformed(event); assertLogged( "sendEvent(myAction2, {VSO.Plugin.Property.Name=myAction2})sendException(throwOnActionPerformed, {VSO.Plugin.Property.Name=myAction2})"); }