Added tests to Agent