### Question:
CacheBuilderBase implements CacheBuilder { @Override public void rebuildAll() { try (final ResourceResolver resourceResolver = getServiceResourceResolver()) { Optional.ofNullable(getCacheContainerPath(SLASH)) .map(resourceResolver::getResource) .ifPresent(this::rebuildCacheInTree); resourceResolver.commit(); rebuildMandatoryContent(); } catch (final LoginException e) { logger.error(COULD_NOT_GET_SERVICE_RESOURCE_RESOLVER, e); } catch (final PersistenceException e) { logger.error(COULD_NOT_SAVE_CHANGES_TO_REPOSITORY, e); } }  final String getOriginalPath(final String cachePath); @Override final void rebuild(final String rootPagePath); @Override void rebuildAll();  }### Answer:
@Test public void rebuildAll_nothingCachedYet() { disableResolution(var); model.rebuildAll(); verifyCommits(1); assertTrue(rebuildImplCalled.isEmpty()); }
@Test public void rebuildAll() { model.rebuildAll(); verifyCommits(1); assertTrue(rebuildImplCalled.contains(resource.getPath())); assertTrue(rebuildImplCalled.contains(jcrContent.getPath())); assertTrue(rebuildImplCalled.contains(page.getPath())); assertTrue(rebuildImplCalled.contains(parent.getPath())); assertTrue(rebuildImplCalled.contains(contentRoot.getPath())); }