private void setPrivateField(Object o, String field, Object value) throws Exception{
    Class<?> c = o.getClass();
    Field f = c.getDeclaredField(field);
    f.setAccessible(true);
    f.set(o, value);
  }
Test that versionAdvertised is resolved correctly.
ambari-server/src/test/java/org/apache/ambari/server/stack/ComponentModuleTest.java