Added tests for MetricsResource. One function is missing test, and other function is missing one test.