@Test
public void testProcessIdentitiesSuccess() throws Exception {

  KerberosHelper kerberosHelper = injector.getInstance(KerberosHelper.class);
  expect(kerberosHelper.getKDCAdministratorCredentials(EasyMock.anyObject(String.class)))
      .andReturn(new PrincipalKeyCredential("principal", "password"))
      .anyTimes();
  replay(kerberosHelper);
  ConcurrentMap<String, Object> sharedMap = new ConcurrentHashMap<String, Object>();
  CommandReport report = action.processIdentities(sharedMap);
  Assert.assertNotNull(report);
  Assert.assertEquals(HostRoleStatus.COMPLETED.toString(), report.getStatus());
  for (Map.Entry<String, Object> entry : sharedMap.entrySet()) {
    Assert.assertEquals(entry.getValue(),
        entry.getKey().replace("_HOST", "hostName").replace("_REALM", "REALM.COM"));
  }
  verify(kerberosHelper);
}