SQLResultSet implements IPentahoResultSet, IPeekable { public void dispose() { closeConnection(); } SQLResultSet( final ResultSet nativeResultSet, final SQLConnection nativeConnection ); void setMetaData( final IPentahoMetaData metadata ); IPentahoMetaData getMetaData(); Object[] peek(); Object[] next(); void closeConnection(); void close(); void dispose(); boolean isScrollable(); int getColumnCount(); int getRowCount(); Object getValueAt( final int row, final int column ); IPentahoResultSet memoryCopy(); void beforeFirst(); Object[] getDataColumn( final int column ); Object[] getDataRow( final int row );  }
@Test public void testDispose() throws SQLException { SQLResultSet resultSet = new SQLResultSet( nativeResultSet, nativeConnection ); resultSet.dispose(); verify( nativeResultSet, times( 1 ) ).close(); verify( nativeConnection, times( 1 ) ).close(); }