### Question:
PageRecognizerBase implements PageRecognizer { public final boolean isPage(final Page candidate) { if (!isPropertyEqual(candidate, JCR_PRIMARY_TYPE, pagePrimaryType)) { return false; } if (!candidate.hasContent()) { return false; } if (!isPropertyEqual(candidate.getContent(), JCR_PRIMARY_TYPE, pageContentPrimaryType)) { return false; } if (!candidate.containsProperty(SLING_RESOURCE_TYPE)) { return false; } if (candidate.containsProperty(excludeFromSiteMapPropertyName)) { Object excludeFromSiteMapProperty = candidate.getProperty(excludeFromSiteMapPropertyName); if (excludeFromSiteMapProperty instanceof String) { if (((String) excludeFromSiteMapProperty).equalsIgnoreCase("true")) { return false; } } else if (excludeFromSiteMapProperty instanceof Boolean) { if (candidate.getProperty(excludeFromSiteMapPropertyName, false)) { return false; } } } return isPageImpl(candidate); } protected  PageRecognizerBase(
            final String pagePrimaryType,
            final String pageContentPrimaryType,
            final String excludeFromSiteMapPropertyName); final boolean isPage(final Page candidate); String getPagePrimaryType(); String getPageContentPrimaryType(); String getExcludeFromSiteMapPropertyName();  }### Answer:
@Test public void isPage() { assertFalse(model.isPage(candidate)); parent.putProperty(JCR_PRIMARY_TYPE, model.getPagePrimaryType()); assertFalse(model.isPage(new Page(parent))); page.putProperty(JCR_PRIMARY_TYPE, model.getPagePrimaryType()); assertFalse(model.isPage(candidate)); jcrContent.setPrimaryType(model.getPageContentPrimaryType()); assertFalse(model.isPage(candidate)); page.putProperty(SLING_RESOURCE_TYPE, RESOURCE_TYPE); assertTrue(model.isPage(candidate)); page.putProperty(model.getExcludeFromSiteMapPropertyName(), true); assertFalse(model.isPage(candidate)); }