JenaTypes implements Types { @Override public Set<Axiom<URI>> getTypes(NamedResource individual, URI context, boolean includeInferred) throws OntoDriverException { Objects.requireNonNull(individual); beforeCallback.execute(); return adapter.typesHandler().getTypes(individual, context, includeInferred); } JenaTypes(JenaAdapter adapter, Procedure beforeCallback, Procedure afterCallback); @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 getTypesCallsBeforeHandlerBeforeGettingTypes() throws Exception { types.getTypes(SUBJECT, null, false); final InOrder inOrder = Mockito.inOrder(beforeMock, typesHandlerMock); inOrder.verify(beforeMock).execute(); inOrder.verify(typesHandlerMock).getTypes(SUBJECT, null, false); }