public static void testRollbackRetriableFailure(
    final ProcedureExecutor<MasterProcedureEnv> procExec, final long procId, final int lastStep)
    throws Exception {
    // Execute up to last step
    testRecoveryAndDoubleExecution(procExec, procId, lastStep, false);

    // execute the rollback
    testRestartWithAbort(procExec, procId);

    assertEquals(true, procExec.isRunning());
    ProcedureTestingUtility.assertIsAbortException(procExec.getResult(procId));
  }
Execute the procedure up to "lastStep" and then the ProcedureExecutor is restarted and an
abort() is injected. If the procedure implement abort() this should result in rollback being
triggered. At the end of this call the procedure should be finished and rolledback. This method
assert on the procedure being terminated with an AbortException.
hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/MasterProcedureTestingUtility.java