added tests for the agent class