Skip to content

Commit 15e1cba

Browse files
Marcinclaude
andcommitted
test: relax unused stub in setUp to lenient
The PrintWriter stub is only used by tests that hit the prerender path; pass-through tests don't read it and Mockito strict mode flags it as UnnecessaryStubbing. Mark only that one line lenient. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent f70edde commit 15e1cba

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/test/java/io/prerender/PrerenderFilterTest.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class PrerenderFilterTest {
4646
void setUp() throws Exception {
4747
wireMock.resetAll();
4848
responseWriter = new StringWriter();
49-
when(response.getWriter()).thenReturn(new PrintWriter(responseWriter));
49+
lenient().when(response.getWriter()).thenReturn(new PrintWriter(responseWriter));
5050
PrerenderConfig config = new PrerenderConfig(null, "http://localhost:" + wireMock.getPort());
5151
filter = new PrerenderFilter(HttpClient.newHttpClient(), config);
5252
}

0 commit comments

Comments
 (0)