GroupCreationWorkflow implements IsWidget { public void clear() { view.clearNotifications(); createEntity.clear(); groupUsersAssignment.clear(); group = null; } @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 testClear() { tested.group = group; tested.clear(); assertNull(tested.group); verify(createEntity, times(1)).clear(); verify(groupUsersAssignment, times(1)).clear(); verify(view, times(1)).clearNotifications(); verify(view, times(0)).setCancelButtonVisible(anyBoolean()); verify(view, times(0)).setCallback(any(EntityWorkflowView.Callback.class)); verify(view, times(0)).setSaveButtonText(anyString()); verify(view, times(0)).setWidget(any(IsWidget.class)); verify(view, times(0)).setSaveButtonVisible(anyBoolean()); verify(view, times(0)).setSaveButtonEnabled(anyBoolean()); verify(view, times(0)).showNotification(anyString()); }