title: Mockito and jdbc procedure call
body: <p>I am trying to write a unit test for some jdbc procedure calls with mockito.
  It is my first time to write tests with mock objects (mockito).</p>
  
  <p>The method i am trying to test looks some thing like this...</p>
  
  <pre><code> public void deleteData(final Connection connection, final AnObject ) {
       CallableStatement statement = null;
  
       statement = connection.prepareCall("{call DEL_DATA(?)}");
       statement.setInt(1, object.getId());
  
       statement.executeUpdate();
  
       connection.commit();
  
       DatabaseSql.close(statement);
  }
  </code></pre>
  
  <p>How can I test methods like this with mockito and junit?</p>
  
  <p>Thanks in advance.</p>