PageImpl extends com.adobe.cq.wcm.core.components.internal.models.v1.PageImpl implements Page { @Override public boolean hasCloudconfigSupport() { if (hasCloudconfigSupport == null) { if (productInfoProvider == null || productInfoProvider.getProductInfo() == null || productInfoProvider.getProductInfo().getVersion() == null) { hasCloudconfigSupport = false; } else { hasCloudconfigSupport = productInfoProvider.getProductInfo().getVersion().compareTo(new Version("6.4.0")) >= 0; } } return hasCloudconfigSupport; }  @Override @JsonIgnore @Deprecated Map<String, String> getFavicons(); @Override @JsonIgnore String[] getClientLibCategoriesJsBody(); @Override @JsonIgnore String[] getClientLibCategoriesJsHead(); @Override String getAppResourcesPath(); @Override String getCssClassNames(); @NotNull @Override String[] getExportedItemsOrder(); @NotNull @Override Map<String, ? extends ComponentExporter> getExportedItems(); @Nullable @Override NavigationItem getRedirectTarget(); @Override boolean hasCloudconfigSupport(); @Override String getMainContentSelector(); static final String PN_REDIRECT_TARGET; static final String PN_MAIN_CONTENT_SELECTOR_PROP; }
@Test void testHasCloudconfigSupport() { Page page = new PageImpl(); assertFalse(page.hasCloudconfigSupport(), "Expected no cloudconfig support if product info provider missing"); mockProductInfoProvider.setVersion(new Version("6.3.1")); page = getPageUnderTest(PAGE); assertFalse(page.hasCloudconfigSupport(), "Expected no cloudconfig support if product version < 6.4.0"); Utils.setInternalState(page, "hasCloudconfigSupport", (Boolean)null); mockProductInfoProvider.setVersion(new Version("6.4.0")); assertTrue(page.hasCloudconfigSupport(), "Expected cloudconfig support if product version >= 6.4.0"); }