@Test
public void testExponentialMovingAverage() throws Exception {
RichGaugeRepository gs = createService();
gs.setAlpha("test", 0.1);
gs.setValue("test", 71.0);
RichGauge g = gs.findOne("test");
assertEquals(71.0, g.getAverage(), 1E-6);
gs.setValue("test", 70.0);
g = gs.findOne("test");
assertEquals(71.0, g.getAverage(), 1E-6);
gs.setValue("test", 69.0);
g = gs.findOne("test");
assertEquals(70.9, g.getAverage(), 1E-6);
gs.setValue("test", 68.0);
g = gs.findOne("test");
assertEquals(70.71, g.getAverage(), 1E-6);
}