Details
Description
The ServletTester is already quite usefull to unit test your servlets. The only disadvantage with this class IMHO it that it links the way you have to test with the setup of the servlet tester, i.e., you're forces to use the getResponses(...) methods. Personally I prefer commons-httpclient over the getResponses(...) methods. Thus a getLocation() method that returns a string like "http://localhost:12345" could be very handy to allow developers to use other 3th party http clients.
I added createSocketConnector method so you can now do stuff like:
String base_url=tester.createSocketConnector(true);
URL url = new URL(base_url+"/context/hello/info");
String result = IO.toString(url.openStream());
assertEquals("<h1>Hello Servlet</h1>",result);