@Test
public void testStandardDeviation() {

    LOG.info("testStandardDeviation");
    final MetricsCollector metricsCollector =
            new MetricsCollector(Duration.millis(METRIC_DURATION_MSECS), METRIC_NR_ENTRIES);
    verifyCollectorCountMinMaxSumAvgStdDev(metricsCollector, 0, Float.NaN, Float.NaN, 0.0f, Float.NaN, Float.NaN);
    metricsCollector.addValueNow(2);
    verifyCollectorCountMinMaxSumAvgStdDev(metricsCollector, 1, 2, 2, 2, 2, 0.0f);
    metricsCollector.addValueNow(4);
    metricsCollector.addValueNow(6);
    metricsCollector.addValueNow(7);
    verifyCollectorCountMinMaxSumAvgStdDev(metricsCollector, 4, 2.0f, 7.0f, 19.0f, 4.75f, 2.217355783f);
}