public void testAddRemoveStatementObjectURIString() throws Exception {
BlankNode blankNode = this.model.createBlankNode();
this.model.addStatement(blankNode, predicate, "Test");
ClosableIterator<? extends Statement> sit = this.model
.findStatements(new TriplePatternImpl(blankNode, predicate, "Test"));
assertTrue(sit.hasNext());
while(sit.hasNext()) {
// should be just one
Statement s = sit.next();
assertEquals("blank node equality", blankNode, s.getSubject());
assertEquals(predicate, s.getPredicate());
assertEquals(s.getObject(), "Test");
}
sit.close();
this.model.removeStatement(blankNode, predicate, "Test");
ClosableIterator<? extends Statement> it = this.model.findStatements(new TriplePatternImpl(
blankNode, predicate, "Test"));
assertFalse(it.hasNext());
it.close();
}