ScrapeConfig { public Map<String, String> getFilter() { return filter; } ScrapeConfig(@JsonProperty("filter") Map<String, String> filter); Map<String, String> getFilter(); boolean filter(RawResource resource); @Override String toString();  }
@Test public void testReadConfigYaml() throws Exception { ScrapeConfig config = JsonUtil.getYamlMapper().readValue(ScrapeConfigTest.class.getResourceAsStream("/hawkular-inventory-prometheus-scrape-config.yaml"), ScrapeConfig.class); assertEquals(1, config.getFilter().size()); assertTrue(config.getFilter().containsKey("Hawkular Java Agent")); assertEquals("Metrics Endpoints", config.getFilter().get("Hawkular Java Agent")); }