private int substringCount(String source, String substring) {
    int count = 0;
    int i = -1;
    while ((i = source.indexOf(substring, i + 1)) != -1) {
      ++count;
    }
    return count;
  }
@return sample JSON data from repo_version data (no repositories defined) where 'OperatingSystems/ambari_managed_repositories' is missing
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog270Test.java