GroupEditorWorkflow implements IsWidget { public void show(final String name) { doShow(name); } @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 testShow() { final String name = "group1"; tested.show(name); verify(view, times(1)).setCancelButtonVisible(false); 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)).showNotification(anyString()); verify(view, times(1)).clearNotifications(); verify(groupEditorDriver, times(1)).edit(group, groupEditor); verify(groupEditor, times(1)).clear(); }