ContentItem ci = new ContentItemImpl(ciUri,blob,new SimpleMGraph()){};
ci.removePart(12345);
}
@Test
public void removeRemoveByUri() {
ContentItem ci = new ContentItemImpl(ciUri,blob,new SimpleMGraph()){};
UriRef uri = new UriRef("urn:content.part:remove.test");
ci.addPart(uri, new Date());
try {
ci.getPart(uri, Date.class);
}catch (NoSuchPartException e) {
Assert.assertFalse("The part with the uri "+uri+" was not added correctly",
true);
}
ci.removePart(uri);
try {
ci.getPart(uri, Date.class);
Assert.assertFalse("The part with the uri "+uri+" was not removed correctly",
true);
}catch (NoSuchPartException e) {
// expected
}