BoltNeo4jStatement extends Neo4jStatement { @Override public ResultSet executeQuery(String sql) throws SQLException { StatementResult result = executeInternal(sql); this.currentResultSet = BoltNeo4jResultSet.newInstance(this.hasDebug(), this, result, this.resultSetParams); this.currentUpdateCount = -1; return this.currentResultSet; } private  BoltNeo4jStatement(BoltNeo4jConnectionImpl connection, int... rsParams); static Statement newInstance(boolean debug, BoltNeo4jConnectionImpl connection, int... rsParams); @Override ResultSet executeQuery(String sql); @Override int executeUpdate(String sql); @Override boolean execute(String sql); @Override int[] executeBatch();  }
@Test public void executeQueryShouldThrowExceptionOnPreparedStatement() throws SQLException { expectedEx.expect(SQLException.class); Connection connection = new BoltNeo4jConnectionImpl(mockSessionOpen()); Statement statement = connection.prepareStatement(""); statement.executeQuery(StatementData.STATEMENT_MATCH_ALL); }
@Ignore @Test public void executeQueryShouldThrowExceptionOnCallableStatement() throws SQLException { expectedEx.expect(SQLException.class); Connection connection = new BoltNeo4jConnectionImpl(mockSessionOpen()); Statement statement = connection.prepareCall(""); statement.executeQuery(StatementData.STATEMENT_MATCH_ALL); }