### Question:
SiteMapStructureCacheImpl extends CacheBuilderBase implements SiteMapStructureCache, Callback<String>, SiteMapEntry.Visitor<Resource> { @Override public Resource visit(final String childName, final Map<String, String> properties, final Resource resource) { try { final Map<String, Object> props = transformToJcrNames(properties); props.put(JCR_PRIMARY_TYPE, SLING_FOLDER); final ResourceResolver resourceResolver = resource.getResourceResolver(); return resourceResolver.create(resource, jcrNameToFileName(childName), props); } catch (final PersistenceException e) { logger.error(COULD_NOT_SAVE_SITE_MAP_CACHE, e); } return null; }  @Activate void activate(final SiteMapStructureCacheImplConfig config); @Deactivate void deactivate(); @Override List<SiteMapEntry> get(final Resource rootPage); @Override void call(final String rootPagePath); @Override Resource visit(final String childName, final Map<String, String> properties, final Resource resource); @Override Resource visit(final String propertyName, final String propertyValue, final Resource resource); @Override Resource endVisit(final String mapName, final Resource resource); @Override void addRefreshListener(final RefreshListener listener); @Override void removeRefreshListener(final RefreshListener listener); static final String NN_FIRST_CACHE_NODE; }### Answer:
@SuppressWarnings("unchecked") @Test public void visit() throws PersistenceException { when(resourceResolver.create(any(), anyString(), any())).thenThrow(PersistenceException.class); assertNull(model.visit("0", new HashMap<>(), cache)); }