### Question:
EquiDepthStreamHistogram { public void addValue(byte[] value) { Bar bar = getBar(value); bar.incrementCount(); totalCount++; if (bar.getSize() > getMaxBarSize()) { splitBar(bar); } } EquiDepthStreamHistogram(int numBuckets);  EquiDepthStreamHistogram(int numBuckets, int expansionFactor); void addValue(byte[] value); List<Bucket> computeBuckets(); long getTotalCount();  }### Answer:
@Test public void testAddValues() { EquiDepthStreamHistogram histo = new EquiDepthStreamHistogram(3); for (int i = 0; i < 100; i++) { histo.addValue(Bytes.toBytes(i + "")); } assertEquals(21, histo.bars.size()); long total = 0; for (Bar b : histo.bars) { total += b.getSize(); } assertEquals(100, total); }