OwlapiStatement implements Statement { @Override public void executeUpdate(String sparql) throws OntoDriverException { ensureOpen(); Objects.requireNonNull(sparql); closeExistingResultSet(); getExecutor().executeUpdate(sparql); connection.commitIfAuto(); } OwlapiStatement(StatementExecutorFactory executorFactory, OwlapiConnection connection); @Override ResultSet executeQuery(String sparql); @Override void executeUpdate(String sparql); @Override void useOntology(StatementOntology ontology); @Override StatementOntology getStatementOntology(); @Override boolean isOpen(); @Override void close();  }
@Test public void executeUpdateCommitsConnectionIfSetToAutoCommit() throws Exception { statement.executeUpdate(UPDATE); verify(connectionMock).commitIfAuto(); }