PrometheusLabeler implements Labeler { @Override public Map<String, String> generateLabels() { return labels; } PrometheusLabeler(); @Override Map<String, String> generateLabels();  }
@Test void testGenerateLabels() { final Labeler labeler = new PrometheusLabeler(); final Map<String, String> labels = labeler.generateLabels(); assertThat(labels).size().isEqualTo(4); assertThat(labels).containsEntry(PrometheusLabeler.LABEL_PATH, PrometheusLabeler.DEFAULT_PATH); assertThat(labels).containsEntry(PrometheusLabeler.LABEL_PORT, PrometheusLabeler.DEFAULT_PORT); assertThat(labels).containsEntry(PrometheusLabeler.LABEL_SCHEME, PrometheusLabeler.DEFAULT_SCHEME); assertThat(labels).containsEntry(PrometheusLabeler.LABEL_SCRAPE, PrometheusLabeler.DEFAULT_SCRAPE); }