@Override
    public void run(DiagnosticsLogWriter writer) {
        metricCollector.writer = writer;
        // we set the time explicitly so that for this particular rendering of the probes, all metrics have exactly
        // the same timestamp
        metricCollector.timeMillis = System.currentTimeMillis();
        metricsRegistry.collect(metricCollector);
        metricCollector.writer = null;
    }
@Test
    public void testRun() {
        plugin.run(logWriter);

        // we just test a few to make sure the metrics are written
        assertContains("[unit=count,metric=client.endpoint.count]=0");
        assertContains("[unit=count,metric=operation.responseQueueSize]=0");
    }