@Test
  public void testStopOverrideFromCoprocessor() throws Exception {
    Admin admin = testUtil.getAdmin();
    HRegionServer regionserver = cluster.getRegionServer(0);
    admin.stopRegionServer(regionserver.getServerName().getAddress().toString());

    // regionserver should have failed to stop due to coprocessor
    assertFalse(cluster.getRegionServer(0).isAborted());
    assertFalse(cluster.getRegionServer(0).isStopped());
  }
Test that a coprocessor is able to override a normal regionserver stop request.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerAbort.java