private void validateActionAtEnd(Artifact actionArt) throws OseeCoreException {
    resultData.log("\nValidating End...");
    // Ensure event service is connected
    if (!OseeEventManager.isEventManagerConnected()) {
      resultData.logError("Remote Event Service is not connected");
      return;
    }
    resultData.log("Remote Event Service connected");

    // Validate values
    TeamWorkFlowArtifact teamArt = ActionManager.getFirstTeam(actionArt);
    testEquals(
        "Description",
        "description 4",
        teamArt.getSoleAttributeValue(AtsAttributeTypes.Description, null));
    testEquals("Change Type", ChangeType.Support, ChangeTypeUtil.getChangeType(teamArt));
    testEquals(
        "Priority", "3", teamArt.getSoleAttributeValue(AtsAttributeTypes.PriorityType, null));
    testEquals(
        "Validation Required",
        "false",
        String.valueOf(teamArt.getSoleAttributeValue(AtsAttributeTypes.ValidationRequired, null)));

    IAtsVersion verArt = AtsVersionService.get().getTargetedVersion(teamArt);
    String expectedTargetedVersion;
    if (verArt != null) {
      expectedTargetedVersion = verArt.toString();
    } else {
      expectedTargetedVersion = "not set";
    }
    testEquals("Targeted Version", expectedTargetedVersion, "2.5.7");
    testEquals("State", TeamState.Analyze.getName(), teamArt.getStateMgr().getCurrentStateName());
  }
  public static Collection<IAtsUser> getValidateReviewFollowupUsers(TeamWorkFlowArtifact teamArt)
      throws OseeCoreException {
    Collection<IAtsUser> users = new HashSet<IAtsUser>();
    users.addAll(teamArt.getStateMgr().getAssignees(TeamState.Implement));
    if (users.size() > 0) {
      return users;
    }

    // Else if Team Workflow , return it to the leads of this team
    users.addAll(teamArt.getTeamDefinition().getLeads());
    return users;
  }
  private void runClientTest() throws OseeCoreException {
    String title = getName() + " - Destination Client Test";
    resultData.log("Running " + title);
    NewActionJob job = null;
    job =
        new NewActionJob(
            "tt",
            "description",
            ChangeType.Improvement,
            "1",
            null,
            false,
            getActionableItemsByToken(Arrays.asList(atsActionableItem)),
            null,
            null);
    job.setUser(true);
    job.setPriority(Job.LONG);
    job.schedule();
    try {
      job.join();
    } catch (InterruptedException ex) {
      OseeLog.log(Activator.class, Level.SEVERE, ex);
    }

    Artifact actionArt = job.getActionArt();
    resultData.log("Created Action " + actionArt);
    TeamWorkFlowArtifact teamArt = ActionManager.getFirstTeam(actionArt);

    // Make current user assignee for convenience to developer
    teamArt.getStateMgr().addAssignee(AtsClientService.get().getUserAdmin().getCurrentUser());
    teamArt.persist(getClass().getSimpleName());

    validateActionAtStart(actionArt);

    // Wait for destination client to start
    if (!MessageDialog.openConfirm(
        Displays.getActiveShell(),
        getName(),
        "Launch \"Destination Client - Start\" test, enter \""
            + actionArt.getName().replaceFirst("tt ", "")
            + "\" and press Ok")) {
      return;
    }

    int sleepTime = 250;
    makeChanges1(teamArt);
    sleep(sleepTime);
    makeChanges2(teamArt);
    sleep(sleepTime);
    makeChanges3(teamArt);
    sleep(sleepTime);
    makeChanges4(teamArt);
    sleep(sleepTime);
    makeChanges5(teamArt);
    sleep(sleepTime);
    makeChanges6(teamArt);
    sleep(sleepTime);
    makeChanges7(teamArt);
    sleep(sleepTime);

    validateActionAtEnd(actionArt);

    // Wait for destination client to end
    if (!MessageDialog.openConfirm(
        Displays.getActiveShell(),
        getName(),
        "Launch \"Destination Client - End\" test, enter \""
            + actionArt.getName().replaceFirst("tt ", "")
            + "\" and press Ok")) {
      return;
    }

    XResultDataUI.report(resultData, title);
  }