this.notifyingModel.open();
ModelChangedListener listener = new AbstractModelChangeListener() {
@Override
public void addedStatement(Statement statement) {
System.out.println(statement.getObject().getClass());
assertEquals(new PlainLiteralImpl("Sebastian"), statement
.getObject());
assertEquals(predicate, statement.getPredicate());
}
};
this.notifyingModel.addModelChangedListener(listener,
new TriplePatternImpl(Variable.ANY, predicate,
new PlainLiteralImpl("Sebastian")));
this.notifyingModel.addStatement(subject, predicate, "Sebastian Gerke");
this.notifyingModel.addStatement(subject, predicate, "Sebastian");
this.notifyingModel.addStatement(predicate, object, "Sebastian");
this.notifyingModel.close();
}