@Test
  public void skipsRemovingIdentityWhenClusterIsUpgrading() throws Exception {
    installComponent(OOZIE, OOZIE_SERVER, HOST);
    reset(cluster);
    expect(cluster.getSecurityType()).andReturn(SecurityType.KERBEROS).once();
    expect(cluster.getUpgradeInProgress()).andReturn(createNiceMock(UpgradeEntity.class)).once();

    replayAll();
    uninstallComponent(OOZIE, OOZIE_SERVER, HOST);
    verifyAll();
  }
Ensures that when an upgrade is in progress, new requests are not created
to remove identities since it would interfere with the long running
upgrade.

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