private void assertIdDefinitionExists(String id, ConfigUpgradePack configUpgradePack,
      UpgradePack upgradePack, StackId sourceStackId) {
    Assert.assertNotNull(id);

    if (configUpgradePack.enumerateConfigChangesByID().containsKey(id)) {
      validatedConfigCount++;

      LOG.info("Validated {} from upgrade pack {} for {}", id, upgradePack.getTargetStack(),
          sourceStackId);

      return;
    }

    Assert.fail(String.format("Missing %s in upgrade from %s to %s (%s)", id, sourceStackId,
        upgradePack.getTargetStack(), upgradePack.getType()));
  }
Asserts that an ID exists in a {@link ConfigUpgradePack}, throwing an
informative message if it does not.

@param id
@param configUpgradePack
@param upgradePack
@param sourceStackId
ambari-server/src/test/java/org/apache/ambari/server/state/stack/ConfigUpgradeValidityTest.java