@BeforeClass
  public static void setupBeforeClass() throws Exception {
    Configuration conf = UTIL.getConfiguration();

    conf.set(CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY, FooCoprocessor.class.getName());
    conf.set(CoprocessorHost.REGIONSERVER_COPROCESSOR_CONF_KEY, FooCoprocessor.class.getName());

    UTIL.startMiniCluster();
  }
Tests for master and regionserver coprocessor stop method
hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorStop.java