public void run() {
        // Initialize the metrics and set queue sizes for the main job queue, first retry queue and
        // second retry queue.
        MetricsController.init();
        MetricsController.setQueueSize(6);
        MetricsController.setRetryQueueSize(4);
        MetricsController.setSecondRetryQueueSize(2);

        // Initiate a request to metrics endpoint and verify the response.
        JsonNode jsonResponse = getMetricsEndpointResponse();
        JsonNode metricsNode = getAndVerifyJsonNode(jsonResponse, "metrics");
        assertMetricsIntValue(
            metricsNode, "AnalyticJob.jobQueue.size", 6);
        assertMetricsIntValue(
            metricsNode, "AnalyticJob.retryQueue.size", 4);
        assertMetricsIntValue(
            metricsNode, "AnalyticJob.secondRetryQueue.size", 2);
      }
Test fetching metrics for queue sizes from Dr.Elephant's "/metrics" endpoint.
test/controllers/MetricsControllerTest.java