/** Tests whether the observer is correctly notified on the event dispatch thread. */ @Test public void testPerformGUIUpdate() { final Throwable err = new RuntimeException(); observer.commandCompletedUI(RESULT, err); EasyMock.replay(observer); ObservableCommandTestImpl cmd = new ObservableCommandTestImpl(init, observer) { @Override String getResult() { return RESULT; } }; cmd.setException(err); cmd.performGUIUpdate(); EasyMock.verify(observer); }