JenaPreparedStatement extends JenaStatement implements PreparedStatement { @Override public void executeUpdate() throws JenaDriverException { ensureOpen(); executeUpdate(holder.assembleStatement()); } JenaPreparedStatement(StatementExecutor executor, String sparql); @Override ResultSet executeQuery(); @Override void executeUpdate(); @Override void setObject(String binding, Object value); @Override void clearParameters();  }
@Test public void executeUpdateThrowsIllegalStateForClosedStatement() throws Exception { thrown.expect(IllegalStateException.class); thrown.expectMessage(containsString("Statement is closed")); final String update = "INSERT DATA { _:a1 a ?type . }"; this.statement = new JenaPreparedStatement(executor, update); statement.close(); statement.executeUpdate(); }