### Question:
PageCacheWarmer implements NeoStoreFileListing.StoreFileProvider { synchronized OptionalLong reheat() throws IOException { if ( stopped ) { return OptionalLong.empty(); } long pagesLoaded = 0; List<PagedFile> files = pageCache.listExistingMappings(); Profile[] existingProfiles = findExistingProfiles( files ); for ( PagedFile file : files ) { try { pagesLoaded += reheat( file, existingProfiles ); } catch ( FileIsNotMappedException ignore ) { } } return OptionalLong.of( pagesLoaded ); } PageCacheWarmer( FileSystemAbstraction fs, PageCache pageCache, JobScheduler scheduler, File databaseDirectory ); @Override synchronized Resource addFilesTo( Collection<StoreFileMetadata> coll ); synchronized void start(); void stop(); synchronized OptionalLong profile(); static final String SUFFIX_CACHEPROF; }### Answer:
@Test public void mustDoNothingWhenReheatingUnprofiledPageCache() throws Exception { try ( PageCache pageCache = pageCacheRule.getPageCache( fs, cfg ); PagedFile ignore = pageCache.map( file, pageCache.pageSize(), StandardOpenOption.CREATE ) ) { PageCacheWarmer warmer = new PageCacheWarmer( fs, pageCache, scheduler, testDirectory.databaseDir() ); warmer.reheat(); } cursorTracer.get().reportEvents(); assertThat( cacheTracer.faults(), is( 0L ) ); }