web appications and JUnit

Hi,

I'm building a filter (well it's a complicated one) and need to test it with JUnit in eclipse. I need to mock request and response.

Does anyone know how? I heard about easyMock, is it any good ?

I need something simple as I'm not building this whole web application with million of screens and objects.

 

Comments

Are you using JSF?

In case of myfaces impl easyMock is ready to use.
http://myfaces.apache.org/core12/myfaces-api/dependencies.html

Knowledge about JSF testing - covering the unit testing out there.
http://www.infoq.com/news/2007/12/jsf-testing-tools

that's the thing, I'm just building a filter which will be used by all kinds of applications (build in struts or jsf or what ever)
this is why I thought there is something simple which I can use that will stimulate HttpServletRequest\HttpServletResponce.

I haven't use easyMock so I cannot tell you how good it is.

Take a look at this one: http://jwebunit.sourceforge.net/