unit tests for metricsForString