Fixed unit tests for MetricCollector.