@Test
public void testTreeBuilding()
{

    QuantileDigest digest = new QuantileDigest(1);
    List<Integer> values = asList(0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 5, 6, 7);
    addAll(digest, values);
    assertEquals(digest.getCount(), (double) values.size());
}