private ScanResponse scan(ScanRequest req) throws IOException {
    BlockingRpcCallback<ScanResponse> callback = new BlockingRpcCallback<>();
    STUB.scan(new HBaseRpcControllerImpl(), req, callback);
    return callback.get();
  }
Testcase to make sure that we always set scanner id in ScanResponse. See HBASE-18000.
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAlwaysSetScannerId.java