GroupCreationWorkflow implements IsWidget { protected void showUsersAssignment(final String name) { assert group != null; view.setWidget(groupUsersAssignment.asWidget()) .setSaveButtonVisible(false) .setSaveButtonEnabled(false) .setSaveButtonText("") .setCancelButtonVisible(true) .setCallback(new EntityWorkflowView.Callback() { @Override public void onSave() { } @Override public void onCancel() { create(); } }); groupUsersAssignment.show(UsersManagementWidgetsConstants.INSTANCE.assignUsersToGroupName() + " " + name); } @Inject  GroupCreationWorkflow(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 CreateEntity createEntity,
                                 final GroupUsersAssignment groupUsersAssignment,
                                 final Event<CreateGroupEvent> onCreateGroupEvent,
                                 final EntityWorkflowView view); @PostConstruct void init(); void create(); void clear(); @Override Widget asWidget();  }
@Test public void testShowUsersAssignment() { tested.group = group; tested.showUsersAssignment(group.getName()); verify(groupUsersAssignment, times(1)).show(anyString()); verify(view, times(1)).setCancelButtonVisible(true); verify(view, times(1)).setCallback(any(EntityWorkflowView.Callback.class)); verify(view, times(1)).setSaveButtonText(anyString()); verify(view, times(1)).setWidget(any(IsWidget.class)); verify(view, times(1)).setSaveButtonVisible(false); verify(view, times(1)).setSaveButtonEnabled(false); verify(view, times(0)).clearNotifications(); }