Added some unit tests for metric