metrics unit tests.