I18NText text1 = new I18NText("en-UK", "tarea1");
names1.add(text1);
task.setNames(names1);
TaskData taskData = new TaskData();
taskData.setStatus(Status.Created);
taskData.setCreatedBy(new User("usr0"));
taskData.setActualOwner(new User("usr0"));
task.setTaskData(taskData);
ContentData data = new ContentData();
BlockingAddTaskResponseHandler addTaskHandler = new BlockingAddTaskResponseHandler();
client.addTask(task, data, addTaskHandler);
long taskId = addTaskHandler.getTaskId();
client.disconnect();
client.connect();
assertTrue("taskId debe ser un valor mayor a cero", taskId > 0);
Task task2 = new Task();
List<I18NText> names2 = new ArrayList<I18NText>();
I18NText text2 = new I18NText("en-UK", "tarea1");
names2.add(text2);
task2.setNames(names2);
TaskData taskData2 = new TaskData();
taskData2.setStatus(Status.Created);
taskData2.setCreatedBy(new User("usr0"));
taskData2.setActualOwner(new User("usr0"));
task2.setTaskData(taskData2);
ContentData data2 = new ContentData();
BlockingAddTaskResponseHandler addTaskHandler2 = new BlockingAddTaskResponseHandler();
client.addTask(task2, data2, addTaskHandler2);