Issue #2296641 by eshta: Fixed testing issues for invalid test agents and cleans up agent verification.