added unit test for AgentOffer and implemented parsing incoming offers