private AnalysisCollectorAction deselectPluginAndBuild(AnalysisPlugin plugin, Job job) {
   job.configure();
   AnalysisCollectorSettings publisher = job.getPublisher(AnalysisCollectorSettings.class);
   publisher.checkCollectedPlugin(plugin, false);
   job.save();
   Build build = buildSuccessfulJob(job);
   AnalysisCollectorAction action = new AnalysisCollectorAction(build);
   action.open();
   return action;
 }
  public static BatchTaskDeclaration add(Job job, String name) {
    WebElement checkbox = job.find(by.path(PREFIX));
    if (!checkbox.isSelected()) {
      checkbox.click();
    } else {
      job.clickButton("Add another task...");
      job.sleep(1000);
    }

    String p = job.last(by.input("batch-task.name")).getAttribute("path");
    String path_prefix = p.substring(0, p.length() - 5); // trim off '/name'

    BatchTaskDeclaration b = new BatchTaskDeclaration(job, path_prefix);
    b.setName(name);
    return b;
  }