private List<ComponentInfo> createComponentInfo(int count){
    List<ComponentInfo> result = new ArrayList<>();
    if(count > 0) {
      for(int i = 0; i < count; i++){
        result.add(new ComponentInfo());
      }
    }
    return result;
  }
Test that versionAdvertised is resolved correctly.
ambari-server/src/test/java/org/apache/ambari/server/stack/ComponentModuleTest.java