SesameProperties implements Properties { @Override public Collection<Axiom<?>> getProperties(NamedResource individual, URI context, boolean includeInferred) throws SesameDriverException { beforeCallback.execute(); return new AxiomLoader(connector, valueFactory, config).loadAxioms(individual, includeInferred, context); } SesameProperties(SesameAdapter adapter, Procedure beforeCallback, Procedure afterChangeCallback); @Override Collection<Axiom<?>> getProperties(NamedResource individual, URI context, boolean includeInferred); @Override void addProperties(NamedResource individual, URI context, Map<Assertion, Set<Value<?>>> properties); @Override void removeProperties(NamedResource individual, URI context, Map<Assertion, Set<Value<?>>> properties);  }
@Test void testGetProperties() throws Exception { final Collection<Statement> statements = statementsForProperties(initProperties()); when(connectorMock.findStatements(subject, null, null, false, null)).thenReturn(statements); final Collection<Axiom<?>> result = properties.getProperties(SUBJECT, null, false); assertEquals(statements.size(), result.size()); for (Axiom<?> ax : result) { assertEquals(SUBJECT, ax.getSubject()); final Statement stmt = vf .createStatement(subject, vf.createIRI(ax.getAssertion().getIdentifier().toString()), SesameUtils .createDataPropertyLiteral(ax.getValue().getValue(), Constants.DEFAULT_LANG, vf)); assertTrue(statements.contains(stmt)); } }