public void testCheckIfMetricObjectsAreRegisteredAndHaveIds() throws Exception {
TraceOutputJmxScanner scanner = perfmon.scanner("TEST",
new QueryDef("test", "test:type=TestJmx,*", "name").get("Nom")
.metric(perfmon.metric("test", "test")));
ObjectInspector.setField(scanner, "output", out);
scanner.runCycle(100);
List<PerfSample> samples = ((PerfRecord) results.get(0)).getSamples();
Assert.assertNotNull(samples);
Assert.assertEquals(2, samples.size());