### Question:
SimpleIndexReader extends AbstractIndexReader { @Override public IndexSampler createSampler() { TaskControl taskControl = taskCoordinator.newInstance(); if ( descriptor.type() == UNIQUE ) { return new UniqueLuceneIndexSampler( getIndexSearcher(), taskControl ); } else { return new NonUniqueLuceneIndexSampler( getIndexSearcher(), taskControl, samplingConfig ); } } SimpleIndexReader( PartitionSearcher partitionSearcher,
            IndexDescriptor descriptor,
            IndexSamplingConfig samplingConfig,
            TaskCoordinator taskCoordinator ); @Override IndexSampler createSampler(); @Override void query( IndexProgressor.NodeValueClient client, IndexOrder indexOrder, boolean needsValues, IndexQuery... predicates ); @Override PrimitiveLongResourceIterator query( IndexQuery... predicates ); @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 void close();  }### Answer:
@Test void uniqueIndexSamplerForUniqueIndex() { SimpleIndexReader uniqueSimpleReader = getUniqueSimpleReader(); assertThat( uniqueSimpleReader.createSampler(), instanceOf( UniqueLuceneIndexSampler.class ) ); }
@Test void nonUniqueIndexSamplerForNonUniqueIndex() { SimpleIndexReader uniqueSimpleReader = getNonUniqueSimpleReader(); assertThat( uniqueSimpleReader.createSampler(), instanceOf( NonUniqueLuceneIndexSampler.class ) ); }