### Question:
StoreProcessorTask extends ConsistencyCheckerTask { @Override @SuppressWarnings( "unchecked" ) public void run() { statistics.reset(); beforeProcessing( processor ); try { if ( processor.getStage().getCacheSlotSizes().length > 0 ) { cacheAccess.setCacheSlotSizes( processor.getStage().getCacheSlotSizes() ); } cacheAccess.setForward( processor.getStage().isForward() ); if ( processor.getStage().isParallel() ) { long highId; if ( processor.getStage() == CheckStage.Stage1_NS_PropsLabels ) { highId = storeAccess.getNodeStore().getHighId(); } else if ( processor.getStage() == CheckStage.Stage8_PS_Props ) { highId = storeAccess.getPropertyStore().getHighId(); } else { highId = storeAccess.getNodeStore().getHighId(); } long recordsPerCPU = RecordDistributor.calculateRecordsPerCpu( highId, numberOfThreads ); QueueDistributor<R> distributor = distribution.distributor( recordsPerCPU, numberOfThreads ); processor.applyFilteredParallel( store, progressListener, numberOfThreads, recordsPerCPU, distributor ); } else { processor.applyFiltered( store, progressListener ); } cacheAccess.setForward( true ); } catch ( Throwable e ) { progressListener.failed( e ); throw new RuntimeException( e ); } finally { afterProcessing( processor ); } statistics.print( name ); } StoreProcessorTask( String name, Statistics statistics, int threads, RecordStore<R> store, StoreAccess storeAccess,
            String builderPrefix, ProgressMonitorFactory.MultiPartBuilder builder, CacheAccess cacheAccess,
            StoreProcessor processor, QueueDistribution distribution ); @Override @SuppressWarnings( "unchecked" ) void run(); @Override String toString();  }### Answer:
@Test void singlePassShouldOnlyProcessTheStoreOnce() { StoreProcessor singlePassProcessor = mock( StoreProcessor.class ); when( singlePassProcessor.getStage() ).thenReturn( Stage.SEQUENTIAL_FORWARD ); NodeStore store = mock( NodeStore.class ); when( store.getStorageFile() ).thenReturn( new File( "node-store" ) ); StoreProcessorTask<NodeRecord> task = new StoreProcessorTask<>( "nodes", Statistics.NONE, 1, store, null, "nodes", ProgressMonitorFactory.NONE.multipleParts( "check" ), CacheAccess.EMPTY, singlePassProcessor, QueueDistribution.ROUND_ROBIN ); task.run(); verify( singlePassProcessor ).applyFiltered( same( store ), any( ProgressListener.class ) ); }