private void setupTempAmbariMetaInfoDirs(String buildDir) throws Exception {
    File stackRootTmp = getStackRootTmp(buildDir);
    File stackRoot = new File("src/test/resources/stacks");

    if (System.getProperty("os.name").contains("Windows")) {
      stackRoot = new File(ClassLoader.getSystemClassLoader().getResource("stacks").getPath());
    }

    stackRootTmp.mkdir();
    FileUtils.copyDirectory(stackRoot, stackRootTmp);
  }
Test scenario when service were removed and not mapped alerts need to be disabled

@throws Exception
ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java