### Question:
DumpCountsStore implements CountsVisitor, MetadataVisitor, UnknownKey.Visitor { @Override public void visitIndexSample( long indexId, long unique, long size ) { SchemaDescriptor schema = indexes.get( indexId ).schema(); String tokenIds; switch ( schema.entityType() ) { case NODE: tokenIds = labels( schema.getEntityTokenIds() ); break; case RELATIONSHIP: tokenIds = relationshipTypes( schema.getEntityTokenIds() ); break; default: throw new IllegalStateException( "Indexing is not supported for EntityType: " + schema.entityType() ); } out.printf( "\tIndexSample[(%s {%s})]:\tunique=%d, size=%d%n", tokenIds, propertyKeys( schema.getPropertyIds() ), unique, size ); } DumpCountsStore( PrintStream out );   DumpCountsStore( PrintStream out, NeoStores neoStores, SchemaStorage schemaStorage ); private  DumpCountsStore( PrintStream out, Map<Long,IndexDescriptor> indexes, List<NamedToken> labels,
                             List<NamedToken> relationshipTypes, List<NamedToken> propertyKeys ); static void main( String... args ); static void dumpCountsStore( FileSystemAbstraction fs, File path, PrintStream out ); @Override void visitMetadata( File file, Headers headers, int entryCount ); @Override void visitNodeCount( int labelId, long count ); @Override void visitRelationshipCount( int startLabelId, int typeId, int endLabelId, long count ); @Override void visitIndexStatistics( long indexId, long updates, long size ); @Override void visitIndexSample( long indexId, long unique, long size ); @Override boolean visitUnknownKey( ReadableBuffer key, ReadableBuffer value );  }### Answer:
@Test public void dumpIndexSample() { DumpCountsStore countsStore = getCountStore(); countsStore.visitIndexSample( indexId, 1, 2 ); assertThat( suppressOutput.getOutputVoice().toString(), containsString( "IndexSample[(:indexLabel [labelId=3] {indexProperty [keyId=1]})]:\tunique=1, size=2" )); }