private void closeScanner(int scannerId, ThriftHBaseServiceHandler handler) throws Exception {
    handler.scannerGet(scannerId);
    handler.scannerClose(scannerId);
  }
Asserts that the passed scanner is exhausted, and then closes the scanner.
@param scannerId the scanner to close
@param handler   the HBaseServiceHandler interfacing to HBase
hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java