InputStream in = getTestResource("content.html");
assertNotNull("HTML content not found",in);
byte[] htmlData = IOUtils.toByteArray(in);
IOUtils.closeQuietly(in);
ci = ciFactory.createContentItem(contentItemId,
new ByteArraySource(htmlData, "text/html; charset=UTF-8"));
htmlContent = new String(htmlData, UTF8);
//create a Blob with the text content
in = getTestResource("content.txt");
byte[] textData = IOUtils.toByteArray(in);
IOUtils.closeQuietly(in);
assertNotNull("Plain text content not found",in);
ci.addPart(new UriRef(ci.getUri().getUnicodeString()+"_text"),
ciFactory.createBlob(new ByteArraySource(textData, "text/plain; charset=UTF-8")));
textContent = new String(textData, UTF8);
//add the metadata
ci.getMetadata().addAll(rdfData);
}