GroupEditorWorkflow implements IsWidget { void showError(final Throwable throwable) { errorEvent.fire(new OnErrorEvent(GroupEditorWorkflow.this, throwable)); } @Inject  GroupEditorWorkflow(final ClientUserSystemManager userSystemManager,
                               final Caller<AuthorizationService> authorizationService,
                               final PermissionManager permissionManager,
                               final Event<OnErrorEvent> errorEvent,
                               final ConfirmBox confirmBox,
                               final LoadingBox loadingBox,
                               final Event<NotificationEvent> workbenchNotification,
                               final Event<SaveGroupEvent> saveGroupEvent,
                               final Event<DeleteGroupEvent> deleteGroupEvent,
                               final GroupEditor groupEditor,
                               final GroupEditorDriver groupEditorDriver,
                               final EntityWorkflowView view); @PostConstruct void setup(); @Override Widget asWidget(); GroupEditor getGroupEditor(); void show(final String name); void clear(); boolean isDirty(); public EntityWorkflowView view; }
@Test public void testShowError() { Throwable error = mock(Throwable.class); when(error.getMessage()).thenReturn("error1"); tested.showError(error); verify(errorEvent, times(1)).fire(any(OnErrorEvent.class)); }