@Before
  public void before() throws Exception {
    validatedConfigCount = 0;

    // ensure that we use the real stacks
    InMemoryDefaultTestModule testModule = new InMemoryDefaultTestModule();
    testModule.getProperties().put(Configuration.METADATA_DIR_PATH.getKey(),
        "src/main/resources/stacks");

    injector = Guice.createInjector(testModule);
    injector.getInstance(GuiceJpaInitializer.class);

    ambariMetaInfo = injector.getInstance(AmbariMetaInfo.class);
    upgradeContextFactory = injector.getInstance(UpgradeContextFactory.class);
  }
Tests that for every upgrade pack found, that all referenced configuration
IDs exist in the {@code config-upgrade.xml} which will be used/created. Also
ensures that every XML file is valid against its XSD.
ambari-server/src/test/java/org/apache/ambari/server/state/stack/ConfigUpgradeValidityTest.java