### Question:
SiteMapExtractorBase implements SiteMapExtractor { @Override public String buildSiteMapUrl(final Resource siteMapRoot, final int index) { final String url = getUrlBuilder().buildSiteMapUrl(siteMapRoot, index); return externalize(siteMapRoot.getResourceResolver(), url); }  @Override final boolean appliesTo(final Resource root); @Override List<SiteMapEntry> extract(final Resource root); @Override String buildSiteMapUrl(final Resource siteMapRoot, final int index); @Override int getIndex(final SlingHttpServletRequest request);  }### Answer:
@Test public void buildSiteMapUrl() { for (int i = 0; i < 10; i++) { final String expected = map(resourceResolver, buildSiteMapUrl(resource, i)); assertEquals(expected, model.buildSiteMapUrl(resource, i)); } when(config.getUrlExternalizer()).thenReturn(null); for (int i = 0; i < 10; i++) { final String expected = buildSiteMapUrl(resource, i); assertEquals(expected, model.buildSiteMapUrl(resource, i)); } }