OwlapiConnection implements Connection { @Override public boolean contains(Axiom<?> axiom, URI context) { ensureOpen(); Objects.requireNonNull(axiom, getNPXMessageSupplier("axiom")); return adapter.containsAxiom(axiom, context); } 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 testContainsWithContext() { final Axiom<URI> axiom = new AxiomImpl<>(NamedResource.create("http: Assertion.createClassAssertion(false), new Value<>(URI.create("http: final URI context = URI.create("http: connection.contains(axiom, context); verify(adapterMock).containsAxiom(axiom, context); }
@Test public void testContainsWithoutContext() { final Axiom<URI> axiom = new AxiomImpl<>(NamedResource.create("http: Assertion.createClassAssertion(false), new Value<>(URI.create("http: connection.contains(axiom, null); verify(adapterMock).containsAxiom(axiom, null); }