@Override
    public Map<String, String> getAllVariables() {
        return internalGetAllVariables(0, Collections.emptySet());
    }
@Test
    void testGetAllVariablesWithExclusionsForReporters() {
        MetricRegistry registry = TestingMetricRegistry.builder().setNumberReporters(2).build();

        AbstractMetricGroup<?> group =
                new GenericMetricGroup(registry, null, "test") {
                    @Override
                    protected void putVariables(Map<String, String> variables) {
                        variables.put("k1", "v1");
                        variables.put("k2", "v2");
                    }
                };

        group.getAllVariables(-1, Collections.emptySet());

        assertThat(group.getAllVariables(0, Collections.singleton("k1"))).doesNotContainKey("k1");
        assertThat(group.getAllVariables(0, Collections.singleton("k1"))).containsKey("k2");
        assertThat(group.getAllVariables(1, Collections.singleton("k2"))).containsKey("k1");
        assertThat(group.getAllVariables(1, Collections.singleton("k2"))).doesNotContainKey("k2");
    }