Refactored, 3 tests for AgentManager