In my specific test case, I need to over-ride the dependencies of my test case to inject more dependencies like servlet request and response.
It is not possible to mock these as my API requires an actual servlet container to compile and run JSP's.
How can I get a handle to the test instance using JUnit 4?
I have tried over-riding createTest()
in BlockJUnit4Runner
(which works), but then the same behavior cannot be extended to Parameterized
tests, because the runner used by such tests are internal and not visible in the hierarchy.