private void createTasksForProcess(Process process, int count) {
    for (long i = 1; i <= count; i++) {
      Task task = new Task("Task " + i);
      final TaskDTO taskDTO =
          client
              .target("http://localhost:" + RULE.getLocalPort() + "/tasks")
              .request()
              .post(Entity.entity(task, APPLICATION_JSON_TYPE))
              .readEntity(TaskDTO.class);

      ProcessTask assoc = new ProcessTask();
      task.setId(taskDTO.getId());
      assoc.setTask(task);
      assoc.setPosition(i);
      process.getTaskAssoc().add(assoc);
    }
  }