public JmxCollector register() {
        return register(PrometheusRegistry.defaultRegistry);
    }
@Test
    public void stopsOnEmptyName() throws Exception {
        new JmxCollector(
                        "\n---\nrules:\n- pattern: `.*`\n  name: ''\n- pattern: `.*`\n  name: foo"
                                .replace('`', '"'))
                .register(prometheusRegistry);
        assertNull(getSampleValue("foo", new String[] {}, new String[] {}));
    }