Refactored ActorMetrics test to use FlatSpec