@Test
    public void validMetrics_WithClientId() throws IOException {
        @SuppressWarnings("serial")
        final Set<String> expected = new LinkedHashSet<String>(){{
            add("apiman_request_duration_milliseconds_count{method=\"GET\",responseCode=\"200\",api=\"apiId\",apiVersion=\"apiVersion\",client=\"clientId\",} 1.0");
            add("apiman_request_duration_milliseconds_sum{method=\"GET\",responseCode=\"200\",api=\"apiId\",apiVersion=\"apiVersion\",client=\"clientId\",} 644.0");
            add("apiman_requests_total{method=\"GET\",responseCode=\"200\",api=\"apiId\",apiVersion=\"apiVersion\",client=\"clientId\",} 1.0");
        }};

        final RequestMetric requestMetric = buildRequestMetric("clientId", false, 200, "hamsters are cool");
        prometheusMetrics.record(requestMetric);

        final Request request = new Request.Builder().url("http://localhost:9876/").get().build();
        final Response response = client.newCall(request).execute();
        final String rString = response.body().string();
        assertTrue(equals(expected, rString));
    }
Prometheus scrape metrics tests.

@author Marc Savy {@literal <msavy@redhat.com>}
gateway/engine/prometheus/src/test/java/io/apiman/gateway/engine/prometheus/BasicMetricsTest.java