Added a test for generating metrics