public JmxCollector register() {
        return register(PrometheusRegistry.defaultRegistry);
    }
@Test
    public void testValueCaptureGroup() throws Exception {
        JmxCollector jc =
                new JmxCollector(
                                "\n---\nrules:\n- pattern: `^hadoop<.+-500(10)>`\n  name: foo\n  value: $1"
                                        .replace('`', '"'))
                        .register(prometheusRegistry);
        assertEquals(10.0, getSampleValue("foo", new String[] {}, new String[] {}), .001);
    }