ChangePassword implements IsWidget { void showError(final Throwable throwable) { errorEvent.fire(new OnErrorEvent(ChangePassword.this, throwable)); } @Inject  ChangePassword(final ClientUserSystemManager userSystemManager,
                          final Event<NotificationEvent> workbenchNotification,
                          final Event<OnErrorEvent> errorEvent,
                          final Event<ChangePasswordEvent> changePasswordEvent,
                          final View view); @PostConstruct void init(); void show(final String username); void show(final String username,
                     final ChangePasswordCallback callback); void clear(); @Override Widget asWidget(); public View view; }
@Test public void testShowError() throws Exception { String error = "error1"; presenter.showErrorMessage(error); verify(view, times(0)).clear(); verify(view, times(0)).show(anyString()); verify(view, times(0)).hide(); verify(onErrorEvent, times(1)).fire(any(OnErrorEvent.class)); }