@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));
    }
}