Batch b = rs.createBatch(si, root);
b.addNode(root, fileName, NameConstants.NT_FILE, null);
String filePath = testPath + "/" + fileName.getLocalName();
NodeId file = getNodeId(filePath);
b.addNode(file, NameConstants.JCR_CONTENT, NameConstants.NT_RESOURCE, null);
NodeId content = getNodeId(filePath + "/" + NameConstants.JCR_CONTENT);
b.addProperty(content, resolver.getQName(JcrConstants.JCR_LASTMODIFIED), lastModified);
b.addProperty(content, resolver.getQName(JcrConstants.JCR_MIMETYPE), mimeType);
b.addProperty(content, resolver.getQName(JcrConstants.JCR_ENCODING), enc);