public Object currentMetricValue(MetricName metricName) {
            KafkaMetric metric = metricsByName.get(metricName);
            return metric != null ? metric.metricValue() : null;
        }
Get the current value of the metric.

@param metricName the name of the metric that was registered most recently
@return the current value of the metric
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/MockConnectMetrics.java