String task1ID = nextRandom();
PATask task1 = new PATask(task1ID, new URI("http://localhost/1"), "processID", "urn:completeSOAPAction", Utils.createXMLDocument());
task1.getUserOwners().add("test.system-test");
task1.getUserOwners().add("intalio\\admin");
Attachment attachment1 = new Attachment(new AttachmentMetadata(), new URL("http://localhost/a1"));
task1.addAttachment(attachment1);
Attachment attachment2 = new Attachment(new AttachmentMetadata(), new URL("http://localhost/a2"));
task1.addAttachment(attachment2);
tms.create(task1);
PATask task2 = (PATask) tms.getTask(task1.getID());