AEMFormModel implements ComponentExporter { public Boolean getIsValidForm(){ ResourceResolver resourceResolver = resource.getResourceResolver(); String formPath = getFormPath(); if("".equals(formPath)) { return false; } if (resourceResolver == null){ return false; } Resource formResource = resourceResolver.getResource(formPath); if (formResource == null) { return false; } Resource jcrContent = formResource.getChild("jcr:content"); if (jcrContent == null) { return false; } ValueMap props = jcrContent.getValueMap(); if (props.get("guide", 0) != 1 && props.get("mcdocument", 0) != 1) { return false; } return true; }  @Nullable String getFormPath(); @Nullable String getGuidePath(); String getThemeRef(); Boolean getIsValidForm(); String getFormType(); @Nullable String getIcChannel(); String getWcmMode(); @Nonnull @Override String getExportedType();  }
@Test public void testGetIsValidForm(){ AEMFormModel aemFormModel = getFormUnderTest(AEMFormModel.class, ADAPTIVE_FORM); assertTrue(aemFormModel.getIsValidForm()); aemFormModel = getFormUnderTest(AEMFormModel.class, IC); assertTrue(aemFormModel.getIsValidForm()); }