@Test
public void testUpdate() {

    PercentileTracker pt = new PercentileTracker(5000);
    for (int i = 0; i < 11; i++) {
        pt.update((double)i);
        try {
            sleep(10);
        } catch (InterruptedException e) {
            fail();
        }
    }
    double value = pt.getPercentile(95);
    Assert.assertEquals(9.5d, value, 0);
}