@Override
    public void start(CoprocessorEnvironment env) throws IOException {
      String where = null;

      if (env instanceof MasterCoprocessorEnvironment) {
        // if running on HMaster
        where = "master";
      } else if (env instanceof RegionServerCoprocessorEnvironment) {
        where = "regionserver";
      } else if (env instanceof RegionCoprocessorEnvironment) {
        LOG.error("on RegionCoprocessorEnvironment!!");
      }
      LOG.info("start coprocessor on " + where);
    }
Tests for master and regionserver coprocessor stop method
hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorStop.java