Neo4jPreparedStatement extends Neo4jStatement implements PreparedStatement { @Override public void addBatch() throws SQLException { this.checkClosed(); this.batchParameters.add(new HashMap<>(this.parameters)); this.parameters.clear(); } protected  Neo4jPreparedStatement(Neo4jConnection connection, String rawStatement); @Override void setNull(int parameterIndex, int sqlType); @Override void setBoolean(int parameterIndex, boolean x); @Override void setShort(int parameterIndex, short x); @Override void setInt(int parameterIndex, int x); @Override void setLong(int parameterIndex, long x); @Override void setFloat(int parameterIndex, float x); @Override void setDouble(int parameterIndex, double x); @Override void setString(int parameterIndex, String x); @Override void setObject(int parameterIndex, Object x); @Override void clearParameters(); @Override void addBatch(); @Override void clearBatch(); @Override boolean execute(String sql, int autoGeneratedKeys); @Override boolean execute(String sql); @Override boolean execute(String sql, int[] columnIndexes); @Override boolean execute(String sql, String[] columnNames); @Override ResultSet executeQuery(String sql); @Override int executeUpdate(String sql); @Override int executeUpdate(String sql, int autoGeneratedKeys); @Override int executeUpdate(String sql, int[] columnIndexes); @Override int executeUpdate(String sql, String[] columnNames); @Override void setByte(int parameterIndex, byte x); @Override void setBigDecimal(int parameterIndex, BigDecimal x); @Override void setBytes(int parameterIndex, byte[] x); @Override void setDate(int parameterIndex, Date x); @Override void setTime(int parameterIndex, Time x); @Override void setTimestamp(int parameterIndex, Timestamp x); @Override void setAsciiStream(int parameterIndex, InputStream x, int length); @Override void setUnicodeStream(int parameterIndex, InputStream x, int length); @Override void setBinaryStream(int parameterIndex, InputStream x, int length); @Override void setObject(int parameterIndex, Object x, int targetSqlType); @Override void setCharacterStream(int parameterIndex, Reader reader, int length); @Override void setRef(int parameterIndex, Ref x); @Override void setBlob(int parameterIndex, Blob x); @Override void setClob(int parameterIndex, Clob x); @Override void setArray(int parameterIndex, java.sql.Array x); @Override void setDate(int parameterIndex, Date x, Calendar cal); @Override void setTime(int parameterIndex, Time x, Calendar cal); @Override void setTimestamp(int parameterIndex, Timestamp x, Calendar cal); @Override void setNull(int parameterIndex, int sqlType, String typeName); @Override void setURL(int parameterIndex, URL x); @Override void setRowId(int parameterIndex, RowId x); @Override void setNString(int parameterIndex, String value); @Override void setNCharacterStream(int parameterIndex, Reader value, long length); @Override void setNClob(int parameterIndex, NClob value); @Override void setClob(int parameterIndex, Reader reader, long length); @Override void setBlob(int parameterIndex, InputStream inputStream, long length); @Override void setNClob(int parameterIndex, Reader reader, long length); @Override void setSQLXML(int parameterIndex, SQLXML xmlObject); @Override void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength); @Override void setAsciiStream(int parameterIndex, InputStream x, long length); @Override void setBinaryStream(int parameterIndex, InputStream x, long length); @Override void setCharacterStream(int parameterIndex, Reader reader, long length); @Override void setAsciiStream(int parameterIndex, InputStream x); @Override void setBinaryStream(int parameterIndex, InputStream x); @Override void setCharacterStream(int parameterIndex, Reader reader); @Override void setNCharacterStream(int parameterIndex, Reader value); @Override void setClob(int parameterIndex, Reader reader); @Override void setBlob(int parameterIndex, InputStream inputStream); @Override void setNClob(int parameterIndex, Reader reader); @Override void addBatch(String sql);  }
@Test public void addBatchShouldThrowException() throws SQLException { expectedEx.expect(SQLException.class); Neo4jPreparedStatement stmt = Mockito.mock(Neo4jPreparedStatement.class, Mockito.CALLS_REAL_METHODS); stmt.addBatch(""); }