@Test
  public void testCoreRegionCoprocessor() throws IOException {
    MasterCoprocessorEnvironment env =
      this.mch.load(null, NotCoreMasterCoprocessor.class.getName(), 0, HTU.getConfiguration());
    assertFalse(env instanceof HasMasterServices);
    env = this.mch.load(null, CoreMasterCoprocessor.class.getName(), 1, HTU.getConfiguration());
    assertTrue(env instanceof HasMasterServices);
    assertEquals(this.ms, ((HasMasterServices) env).getMasterServices());
  }
Assert that when a Coprocessor is annotated with CoreCoprocessor, then it is possible to access
a MasterServices instance. Assert the opposite too. Do it to MasterCoprocessors.
hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoreMasterCoprocessor.java