fixed and refactored test for Metrics and users