### Question:
PartitionedIndexReader extends AbstractIndexReader { @Override public IndexSampler createSampler() { List<IndexSampler> indexSamplers = indexReaders.parallelStream() .map( SimpleIndexReader::createSampler ) .collect( Collectors.toList() ); return new AggregatingIndexSampler( indexSamplers ); } PartitionedIndexReader( List<PartitionSearcher> partitionSearchers,
            IndexDescriptor descriptor,
            IndexSamplingConfig samplingConfig,
            TaskCoordinator taskCoordinator );   PartitionedIndexReader( IndexDescriptor descriptor, List<SimpleIndexReader> readers ); @Override PrimitiveLongResourceIterator query( IndexQuery... predicates ); @Override void query( IndexProgressor.NodeValueClient client, IndexOrder indexOrder, boolean needsValues, IndexQuery... query ); @Override boolean hasFullValuePrecision( IndexQuery... predicates ); @Override void distinctValues( IndexProgressor.NodeValueClient client, NodePropertyAccessor propertyAccessor, boolean needsValues ); @Override long countIndexedNodes( long nodeId, int[] propertyKeyIds, Value... propertyValues ); @Override IndexSampler createSampler(); @Override void close();  }### Answer:
@Test public void samplingOverPartitions() throws IndexNotFoundKernelException { PartitionedIndexReader indexReader = createPartitionedReaderFromReaders(); when( indexReader1.createSampler() ).thenReturn( new SimpleSampler( 1 ) ); when( indexReader2.createSampler() ).thenReturn( new SimpleSampler( 2 ) ); when( indexReader3.createSampler() ).thenReturn( new SimpleSampler( 3 ) ); IndexSampler sampler = indexReader.createSampler(); assertEquals( new IndexSample( 6, 6, 6 ), sampler.sampleIndex() ); }