Add unit tests for metrics support functions
Merge pull request #218 from bobsilverberg/metrics_unit_tests

Add unit tests for metrics support functions