SesameTypes implements Types { @Override public void removeTypes(NamedResource individual, URI context, Set<URI> types) throws OntoDriverException { verifyValidity(individual, types); if (!types.isEmpty()) { adapter.getTypesHandler().removeTypes(individual, context, types); } afterChangeCallback.execute(); } SesameTypes(SesameAdapter adapter, Procedure beforeCallback, Procedure afterChangeCallback); @Override Set<Axiom<URI>> getTypes(NamedResource individual, URI context, boolean includeInferred); @Override void addTypes(NamedResource individual, URI context, Set<URI> types); @Override void removeTypes(NamedResource individual, URI context, Set<URI> types);  }
@Test public void testRemoveTypes() throws Exception { final Set<URI> toRemove = Collections.singleton(INDIVIDUAL.getIdentifier()); types.removeTypes(INDIVIDUAL, null, toRemove); verify(handlerMock).removeTypes(INDIVIDUAL, null, toRemove); }
@Test public void testRemoveEmpty() throws Exception { final Set<URI> toRemove = Collections.emptySet(); types.removeTypes(INDIVIDUAL, null, toRemove); verify(adapterMock, never()).getTypesHandler(); }