JenaProperties implements Properties { @Override public void removeProperties(NamedResource individual, URI context, Map<Assertion, Set<Value<?>>> properties) throws JenaDriverException { Objects.requireNonNull(individual); Objects.requireNonNull(properties); beforeCallback.execute(); adapter.propertiesHandler().removeProperties(individual, context, properties); afterChangeCallback.execute(); } JenaProperties(JenaAdapter 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 public void removePropertiesInvokesPropertiesHandler() throws Exception { final Map<Assertion, Set<Value<?>>> props = initValues(); properties.removeProperties(SUBJECT, null, props); verify(propertiesHandler).removeProperties(SUBJECT, null, props); }
@Test public void removePropertiesInvokesCallbacks() throws Exception { final Map<Assertion, Set<Value<?>>> props = initValues(); properties.removeProperties(SUBJECT, null, props); final InOrder inOrder = Mockito.inOrder(beforeMock, propertiesHandler, afterMock); inOrder.verify(beforeMock).execute(); inOrder.verify(propertiesHandler).removeProperties(SUBJECT, null, props); inOrder.verify(afterMock).execute(); }