### Question:
DumpCountsStore implements CountsVisitor, MetadataVisitor, UnknownKey.Visitor { @Override public void visitMetadata( File file, Headers headers, int entryCount ) { out.printf( "Counts Store:\t%s%n", file ); for ( HeaderField<?> headerField : headers.fields() ) { out.printf( "%s:\t%s%n", headerField.toString(), headers.get( headerField ) ); } out.printf( "\tentries:\t%d%n", entryCount ); out.println( "Entries:" ); } 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 dumpMetadata() { DumpCountsStore countsStore = getCountStore(); Headers headers = Headers.headersBuilder() .put( createNamedHeader( "header1" ), "value1" ) .put( createNamedHeader( "header2" ), "value2" ) .headers(); File file = mock( File.class ); when( file.toString() ).thenReturn( "Test File" ); countsStore.visitMetadata( file, headers, 100 ); assertThat( suppressOutput.getOutputVoice().toString(), allOf( containsString( "Counts Store:\tTest File" ), containsString( "header2:\tvalue2" ), containsString( "header1:\tvalue1" ), containsString( "entries:\t100" ) ) ); }