Histograph { @Override public String toString() { return read().toString(); } Histograph();  Histograph( Histograph<K> parent ); void incr(K key); void incr(K key, int delta); void incrAll(Histograph<K> histograph); Set<K> keySet(); int get( K key ); int getOrDefault(K key, int defaultValue); int size(); Map<K,AtomicInteger> read(); Map<K,AtomicInteger> read( int limit ); void merge( Histograph<K> source ); String format(); String format( int limit ); Histograph<K> toPerc(); @Override String toString();  }
@Test public void testEmpty() throws Exception { Histograph<String> histograph = new Histograph<>(); assertEquals( "{}", histograph.toString() ); }