Added tests for agent.