carbonContext.setTenantDomain(tenantDomain, true);
Resource sampleFile = (Resource) carbonContext.getRegistry(RegistryType.SYSTEM_GOVERNANCE).
get(getSamplePath(sampleName));
UploadedFileItem[] fileItems = new UploadedFileItem[1];
fileItems[0] = new UploadedFileItem();
fileItems[0].setDataHandler(
new DataHandler(new ByteArrayDataSource((byte[]) sampleFile.getContent(),
"application/octet-stream")));
fileItems[0].setFileName(sampleName + APP_ARCHIVE_EXTENSION);
fileItems[0].setFileType("jar");