@Override
    public void prePut(ObserverContext<? extends RegionCoprocessorEnvironment> c, Put put,
      WALEdit edit, Durability durability) throws IOException {
      if (put.getAttribute(DO_ABORT) != null) {
        // TODO: Change this so it throws a CP Abort Exception instead.
        RegionServerServices rss =
          ((HasRegionServerServices) c.getEnvironment()).getRegionServerServices();
        String str = "Aborting for test";
        LOG.info(str + " " + rss.getServerName());
        rss.abort(str, new Throwable(str));
      }
    }
Tests that only a single abort is processed when multiple aborts are requested.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerAbort.java