Add tests for metrics