### Question:
MetricsSupport implements Service { static String toPrometheusData(Registry... registries) { return Arrays.stream(registries) .filter(r -> !r.empty()) .map(MetricsSupport::toPrometheusData) .collect(Collectors.joining()); } private  MetricsSupport(Builder builder); static MetricsSupport create(); static MetricsSupport create(Config config); static Builder builder(); static String toPrometheusData(MetricID metricID, Metric metric, boolean withHelpType); static String toPrometheusData(String name, Metric metric, boolean withHelpType); void configureVendorMetrics(String routingName,
            Routing.Rules rules); void configureEndpoint(Routing.Rules rules); @Override void update(Routing.Rules rules);  }### Answer:
@Test void testPrometheusDataAll() { String data = MetricsSupport.toPrometheusData(app); System.out.println(data); }
@Test void testPrometheusDataMultiple() { String data = MetricsSupport.toPrometheusData(app, base); System.out.println(data); }
@Test void testPrometheusDataNoTypeDups() throws Exception { Set<String> found = new HashSet<>(); String data = MetricsSupport.toPrometheusData(app, base); try (BufferedReader reader = new BufferedReader(new StringReader(data))) { String line; while ((line = reader.readLine()) != null) { String[] tokens = line.split(" "); if (tokens.length > 3 && tokens[1].equals("TYPE")) { String metric = tokens[2]; assertFalse(found.contains(metric)); found.add(metric); } } } }