@Override
    public void throwOnScan(FakeRSRpcServices rpcServices, ClientProtos.ScanRequest request)
      throws ServiceException {
      if (!request.hasScannerId()) {
        // only handle initial scan requests
        throwSomeExceptions(rpcServices, request.getRegion());
      }
    }
Rotates through the possible cache clearing and non-cache clearing exceptions for requests.
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaCache.java