OwlapiConnection implements Connection { @Override public Collection<Axiom<?>> find(AxiomDescriptor descriptor) throws OntoDriverException { ensureOpen(); Objects.requireNonNull(descriptor); try { return adapter.find(descriptor); } catch (RuntimeException e) { throw new OwlapiDriverException(e); } } OwlapiConnection(OwlapiAdapter adapter); @Override boolean isOpen(); @Override void commit(); void ensureOpen(); @Override void rollback(); @Override void setAutoCommit(boolean autoCommit); @Override boolean isAutoCommit(); @Override Statement createStatement(); @Override PreparedStatement prepareStatement(String sparql); @Override boolean isConsistent(URI context); @Override List<URI> getContexts(); @Override boolean contains(Axiom<?> axiom, URI context); @Override Collection<Axiom<?>> find(AxiomDescriptor descriptor); @Override void persist(AxiomValueDescriptor descriptor); @Override URI generateIdentifier(URI classUri); @Override void update(AxiomValueDescriptor descriptor); @Override void remove(AxiomDescriptor descriptor); @Override Lists lists(); @Override Types types(); @Override Properties properties(); @Override void close(); void commitIfAuto(); @Override T unwrap(Class<T> cls);  }
@Test public void testFind() throws Exception { final AxiomDescriptor descriptor = new AxiomDescriptor( NamedResource.create("http: final Collection<Axiom<?>> axioms = Collections.emptyList(); when(adapterMock.find(descriptor)).thenReturn(axioms); final Collection<Axiom<?>> res = connection.find(descriptor); assertSame(axioms, res); verify(adapterMock).find(descriptor); }