### Question:
OAuthConsumerDAO extends AbstractSearcherDAO implements IOAuthConsumerDAO { @Override public void deleteConsumer(String clientId) { Connection conn = null; try { conn = this.getConnection(); conn.setAutoCommit(false); super.executeQueryWithoutResultset(conn, DELETE_CONSUMER_TOKENS, clientId); super.executeQueryWithoutResultset(conn, DELETE_CONSUMER, clientId); conn.commit(); } catch (SQLException | ApsSystemException t) { this.executeRollback(conn); logger.error("Error while deleting consumer '{}' and its tokens", clientId, t); throw new RuntimeException("Error while deleting a consumer and its tokens", t); } finally { this.closeConnection(conn); } }  @Override List<String> getConsumerKeys(FieldSearchFilter<?>[] filters); @Override ConsumerRecordVO getConsumer(String clientId); @Override List<ConsumerRecordVO> getConsumers(FieldSearchFilter<?>[] filters); @Override ConsumerRecordVO addConsumer(ConsumerRecordVO consumer); @Override ConsumerRecordVO updateConsumer(ConsumerRecordVO consumer); @Override void deleteConsumer(String clientId);  }### Answer:
@Test public void deleteConsumer() throws Exception { this.consumerDAO.deleteConsumer("key_4"); Mockito.verify(stat, Mockito.times(2)).setObject(Mockito.anyInt(), Mockito.anyString()); Mockito.verify(conn, Mockito.times(2)).prepareStatement(Mockito.anyString()); Mockito.verify(stat, Mockito.times(2)).executeUpdate(); Mockito.verify(stat, Mockito.times(2)).close(); Mockito.verify(conn, Mockito.times(1)).close(); }