add tests for Request.createAgent, fix #28