void collectMetrics() {
        MetricsPublisher[] publishersArr = publishers.toArray(new MetricsPublisher[0]);
        PublisherMetricsCollector publisherCollector = new PublisherMetricsCollector(publishersArr);
        collectMetrics(publisherCollector);
        publisherCollector.publishCollectedMetrics();
    }
@Test
    public void testUpdatesRenderedInOrder() {
        MetricsService metricsService = prepareMetricsService();

        testProbeSource.update(1, 1.5D);
        metricsService.collectMetrics(metricsCollectorMock);

        testProbeSource.update(2, 5.5D);
        metricsService.collectMetrics(metricsCollectorMock);

        InOrder inOrderLong = inOrder(metricsCollectorMock);
        InOrder inOrderDouble = inOrder(metricsCollectorMock);

        MetricDescriptor descRoot = metricsRegistry.newMetricDescriptor()
                                                   .withPrefix("test")
                                                   .withUnit(COUNT);
        MetricDescriptor descLongValue = descRoot.copy().withMetric("longValue");
        inOrderLong.verify(metricsCollectorMock).collectLong(descLongValue, 1);
        inOrderLong.verify(metricsCollectorMock).collectLong(descLongValue, 2);
        inOrderLong.verify(metricsCollectorMock, never()).collectLong(eq(descLongValue), anyLong());

        MetricDescriptor descDoubleValue = descRoot.copy().withMetric("doubleValue");
        inOrderDouble.verify(metricsCollectorMock).collectDouble(descDoubleValue, 1.5D);
        inOrderDouble.verify(metricsCollectorMock).collectDouble(descDoubleValue, 5.5D);
        inOrderDouble.verify(metricsCollectorMock, never()).collectDouble(eq(descDoubleValue), anyDouble());
    }