@Test
  public void testRegenerateKeytabsWithRetryAllowed() throws Exception {
    Capture<ActionExecutionContext> captureContext = Capture.newInstance();
    customCommandExecutionHelperMock.addExecutionCommandsToStage(capture(captureContext),
        anyObject(Stage.class), anyObject(), eq(null));

    expectLastCall().atLeastOnce();

    Map<String, String> requestMap = new HashMap<>();
    requestMap.put(KerberosHelper.DIRECTIVE_REGENERATE_KEYTABS, "true");
    requestMap.put(KerberosHelper.ALLOW_RETRY, "true");

    RequestStageContainer requestStageContainer = testRegenerateKeytabs(
        new PrincipalKeyCredential("principal", "password"), requestMap, false, false);

    assertNotNull(requestStageContainer);

    ActionExecutionContext capturedContext = captureContext.getValue();
    assertTrue(capturedContext.isRetryAllowed());
  }
Tests that when regenerating keytabs for an upgrade, that the retry allowed
boolean is set on the tasks created.

@throws Exception
ambari-server/src/test/java/org/apache/ambari/server/controller/KerberosHelperTest.java