### Question:
SiteMapConfigurationImpl implements SiteMapConfiguration { @Override public PageRecognizer getPageRecognizer() { final List<PageRecognizer> recognizers = getServices(SiteMapConfigurationImplConfig::pageRecognizers, PageRecognizer.class); return new PageRecognizersAndChain(recognizers); }  @Activate void activate(final SiteMapConfigurationImplConfig config); @Deactivate void deactivate(); @Override Pattern getPagePathPattern(); @Override PageRecognizer getPageRecognizer(); @Override UrlExternalizer getUrlExternalizer(); @Override Map<String, String> getXmlNamespaces(); @Override Collection<PropertyProvider> getPropertyProviders(); @Override Set<String> getMandatoryCachedPaths();  }### Answer:
@Test public void getPageRecognizer() { when(config.pageRecognizers()).thenReturn(new String[] {X, Y}); PageRecognizer pageRecognizer = model.getPageRecognizer(); assertNotNull(pageRecognizer); final Page page = new Page(this.page); assertTrue(pageRecognizer.isPage(page)); pageRecognizer = mock(PageRecognizer.class); when(pageRecognizer.isPage(page)).thenReturn(false); when(serviceRetriever.getNamedService(PageRecognizer.class, X)).thenReturn(pageRecognizer); pageRecognizer = model.getPageRecognizer(); assertFalse(pageRecognizer.isPage(page)); }