@Test
public void executeMITKDCOption() throws Exception {

  String clusterName = "c1";
  Injector injector = setup(clusterName);
  File dataDirectory = createDataDirectory();
  Map<String, String> commandParams = new HashMap<>();
  commandParams.put(KerberosServerAction.KDC_TYPE, KDCType.MIT_KDC.name());
  commandParams.put(KerberosServerAction.DATA_DIRECTORY, dataDirectory.getAbsolutePath());
  ExecutionCommand executionCommand = createMockExecutionCommand(clusterName, commandParams);
  HostRoleCommand hostRoleCommand = createMockHostRoleCommand();
  PrincipalKeyCredential principleKeyCredential = createMock(PrincipalKeyCredential.class);
  KerberosHelper kerberosHelper = injector.getInstance(KerberosHelper.class);
  expect(kerberosHelper.getKDCAdministratorCredentials(clusterName)).andReturn(principleKeyCredential).anyTimes();
  replayAll();
  ConcurrentMap<String, Object> requestSharedDataContext = new ConcurrentHashMap<String, Object>();
  FinalizeKerberosServerAction action = injector.getInstance(FinalizeKerberosServerAction.class);
  action.setExecutionCommand(executionCommand);
  action.setHostRoleCommand(hostRoleCommand);
  Assert.assertTrue(dataDirectory.exists());
  CommandReport commandReport = action.execute(requestSharedDataContext);
  assertSuccess(commandReport);
  Assert.assertTrue(!dataDirectory.exists());
  verifyAll();
}