LocalModel { Contains contains(Resource subject, IRI property, Value object, IRI context) { if (context != null) { if (addedStatements.contains(subject, property, object, context)) { return Contains.TRUE; } return removedStatements.contains(subject, property, object, context) ? Contains.FALSE : Contains.UNKNOWN; } else { if (addedStatements.contains(subject, property, object)) { return Contains.TRUE; } return removedStatements.contains(subject, property, object) ? Contains.FALSE : Contains.UNKNOWN; } } LocalModel();   }
@Test public void containsReturnsUnknownWhenStatementsIsNotInLocalModel() { final IRI subject = valueFactory.createIRI(Generator.generateUri().toString()); final IRI property = valueFactory.createIRI(Generator.generateUri().toString()); assertEquals(LocalModel.Contains.UNKNOWN, localModel.contains(subject, property, null, null)); }
@Test public void containsReturnsUnknownWhenStatementsIsNotInLocalModel_Context() { final IRI subject = valueFactory.createIRI(Generator.generateUri().toString()); final IRI property = valueFactory.createIRI(Generator.generateUri().toString()); final IRI context = valueFactory.createIRI(Generator.generateUri().toString()); assertEquals(LocalModel.Contains.UNKNOWN, localModel.contains(subject, property, null, context)); }