CreateBatchOperation taskCreator = Task
.create(mediaProcessorId, taskBody)
.setConfiguration(configuration).setName(name);
jobCreator.addTaskCreator(taskCreator);
JobInfo jobInfo = service.create(jobCreator);
// Act
service.action(Job.cancel(jobInfo.getId()));
JobInfo cancellingJobInfo = service.get(Job.get(jobInfo.getId()));
while (cancellingJobInfo.getState() == JobState.Canceling) {
Thread.sleep(2000);
cancellingJobInfo = service.get(Job.get(jobInfo.getId()));
}
// Assert
List<TaskInfo> taskInfos = service.list(Task.list(cancellingJobInfo
.getTasksLink()));
for (TaskInfo taskInfo : taskInfos) {
verifyTaskPropertiesNoEncryption("canceled task", mediaProcessorId,
TaskOption.None, taskBody, configuration, name, 3,
null, null, 0.0, 0.0, null, TaskState.Canceled,