public Set<MapperConfig> load(InputStream inputStream) throws IOException {
        final PrometheusMappingConfig config = ymlMapper.readValue(inputStream, PrometheusMappingConfig.class);

        return config.metricMappingConfigs()
                .stream()
                .flatMap(this::mapMetric)
                .collect(Collectors.toSet());
    }
@Test
    void loadBytes() throws Exception {

        final Map<String, ImmutableList<Serializable>> config = Collections.singletonMap("metric_mappings", ImmutableList.of(
                ImmutableMap.of(
                        "metric_name", "test1",
                        "match_pattern", "foo.*.bar",
                        "wildcard_extract_labels", ImmutableList.of("first"),
                        "additional_labels", ImmutableMap.of("another", "label")
                ),
                ImmutableMap.of(
                        "metric_name", "test2",
                        "match_pattern", "hello.world",
                        "additional_labels", ImmutableMap.of("another", "label")
                ),
                ImmutableMap.of(
                        "metric_name", "test3",
                        "match_pattern", "one.*.three",
                        "wildcard_extract_labels", ImmutableList.of("two")
                )
        ));

        assertThat(configLoader.load(new ByteArrayInputStream(objectMapper.writeValueAsBytes(config)))).containsExactlyInAnyOrder(
                new MapperConfig(
                        "foo.*.bar",
                        "gl_test1",
                        ImmutableMap.of(
                                "node", "5ca1ab1e-0000-4000-a000-000000000000",
                                "another", "label",
                                "first", "${0}"
                        )
                ),
                new MapperConfig(
                        "hello.world",
                        "gl_test2",
                        ImmutableMap.of(
                                "node", "5ca1ab1e-0000-4000-a000-000000000000",
                                "another", "label"
                        )
                ),
                new MapperConfig(
                        "one.*.three",
                        "gl_test3",
                        ImmutableMap.of(
                                "node", "5ca1ab1e-0000-4000-a000-000000000000",
                                "two", "${0}"
                        )
                )
        );
    }