UserCreationWorkflow extends BaseUserEditorWorkflow { void onOnRemoveUserGroupEvent(@Observes final OnRemoveUserGroupEvent onRemoveUserGroupEvent) { if (checkEventContext(onRemoveUserGroupEvent, getUserEditor().groupsExplorer())) { setDirty(true); } } @Inject  UserCreationWorkflow(final ClientUserSystemManager userSystemManager,
                                final Event<OnErrorEvent> errorEvent,
                                final Event<NotificationEvent> workbenchNotification,
                                final Event<DeleteUserEvent> deleteUserEvent,
                                final Event<SaveUserEvent> saveUserEvent,
                                final Event<CreateUserEvent> createUserEvent,
                                final ConfirmBox confirmBox,
                                final CreateEntity createEntity,
                                final UserEditor userEditor,
                                final UserEditorDriver userEditorDriver,
                                final ChangePassword changePassword,
                                final LoadingBox loadingBox,
                                final EntityWorkflowView view); @PostConstruct void init(); void create(); @Override void clear();  }
@Test public void testOnRemoveUserGroupEvent() { final OnRemoveUserGroupEvent onRemoveUserGroupEvent = mock(OnRemoveUserGroupEvent.class); when(onRemoveUserGroupEvent.getContext()).thenReturn(userAssignedGroupsExplorer); tested.user = user; tested.onOnRemoveUserGroupEvent(onRemoveUserGroupEvent); assertSetDirty(); }