@Override
    public void run() {
      remoteCallFailed(master.getMasterProcedureExecutor().getEnvironment(),
        new RegionServerStoppedException("Server " + getServerName() + " is not online"));
    }
Test implementation of RSProcedureDispatcher that throws desired errors for testing purpose.
hbase-server/src/test/java/org/apache/hadoop/hbase/util/RSProcDispatcher.java