@Override
    public Optional<RegionObserver> getRegionObserver() {
      return Optional.of(this);
    }
Coprocessor that returns null when preCompact or preFlush is called.
hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverPreFlushAndPreCompact.java