agent: Fix the MockEventHandler interface