I have a bean in which I've injected an HttpServletRequest
using the @Autowired
annotation.
This injection works correctly when the application context is a web application Context. That's not the case for application contexts for JUnit tests with Spring.
How can I test this bean ? Maybe I can mock an http request, but then how to inject this mock in the bean ?
This is on Spring 3.0 and Junit 4.4