assertEquals(0.5, counter.get(path, "Nom", "Div", AvgRateCounter.AVG1), 0.01);
}
@Test
public void testOneObjectTwoAverages() throws Exception {
TestJmx tj = makeTestJmx("test:name=bean1,type=TestJmx", 0, 0);
List<Object> path = counter.list("test", "test:name=bean1,type=TestJmx");
tj.setNom(5);
tj.setDiv(5);
assertEquals(0.0, counter.get(path, "Nom", "Div", AvgRateCounter.AVG1), 0.01);
tj.setNom(10);
tj.setDiv(20);
assertEquals(0.0, counter.get(path, "Nom", "Div", AvgRateCounter.AVG5), 0.01);
tj.setNom(10);
tj.setDiv(20);
assertEquals(0.33, counter.get(path, "Nom", "Div", AvgRateCounter.AVG1), 0.01);
tj.setNom(10);
tj.setDiv(20);
assertEquals(0.0, counter.get(path, "Nom", "Div", AvgRateCounter.AVG5), 0.01);
}