### Question:
SiteMapExtractorsContainerImpl implements SiteMapExtractorsContainer { @Override public SiteMapExtractor findFirstFor(final Resource resource) { for (final SiteMapExtractor extractor : items.values()) { if (extractor.appliesTo(resource)) { return extractor; } } return Optional.ofNullable(defaultSiteMapExtractor) .filter(e -> e.appliesTo(resource)) .orElse(null); }  boolean add(final SiteMapConfiguration config); boolean remove(final SiteMapConfiguration config); @Override SiteMapExtractor findFirstFor(final Resource resource);  }### Answer:
@Test public void findFirstFor() { when(configuration.getPagePathPattern()).thenReturn(pattern); model.add(configuration); assertNull(model.findFirstFor(parent)); assertNotNull(model.findFirstFor(page)); }