Adding unit tests for metricManager