Mockito mocks on HttpServletRequest/Response don't exercise the real
servlet container: filter chain wiring, URL/query construction, status
and header propagation, static-asset pass-through are all simulated.
Boot Jetty on a free port, register PrerenderFilter via FilterHolder
with init params, mount a tiny servlet for the pass-through case, and
hit the whole thing with a real HttpClient. Upstream Prerender service
remains faked with the already-present WireMock.
Jetty pinned to 11.0.20 to match WireMock 3.5.4's transitive version
and avoid a classpath conflict with Jetty 12.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Stacked on top of #1 (add-prerender-java). Will auto-retarget to main once #1 merges.
What
Replace Mockito-on-servlet-objects with embedded Jetty + a real HttpClient so the filter is exercised through a real servlet container. Upstream Prerender service remains faked with the already-present WireMock.
Why
Mocked HttpServletRequest/HttpServletResponse don't exercise:
Closes the "java is the only repo without real-framework testing" gap, alongside the matching django change.
Notes
🤖 Generated with Claude Code