fixed metrics unit tests