@Override
  protected void remoteDispatch(final ServerName serverName,
    final Set<RemoteProcedure> remoteProcedures) {
    if (!master.getServerManager().isServerOnline(serverName)) {
      // fail fast
      submitTask(new DeadRSRemoteCall(serverName, remoteProcedures));
    } else {
      submitTask(new TestExecuteProceduresRemoteCall(serverName, remoteProcedures));
    }
  }
Test implementation of RSProcedureDispatcher that throws desired errors for testing purpose.
hbase-server/src/test/java/org/apache/hadoop/hbase/util/RSProcDispatcher.java