HornetQServerControl serverControl = ManagementControlHelper.createHornetQServerControl(mbeanServer);
serverControl.enableMessageCounters();
serverControl.setMessageCounterSamplePeriod(counterPeriod);
String jsonString = queueControl.listMessageCounterHistory();
DayCounterInfo[] infos = DayCounterInfo.fromJSON(jsonString);
Assert.assertEquals(1, infos.length);
session.deleteQueue(queue);
}