Skip to content

Commit 84da773

Browse files
committed
refactor: Drop redundant eq() matchers in ClasspathResourceHandlerTest
SonarQube java:S6068 — when every verify() argument is wrapped in eq(), pass raw values instead. The eq() import is retained for the one call that mixes eq() with longThat(), where matchers must be used uniformly.
1 parent d7186f7 commit 84da773

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/test/java/com/retailsvc/http/internal/ClasspathResourceHandlerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ void getServesBytesVerbatim() throws IOException {
2626

2727
new ClasspathResourceHandler("/sample.txt").handle(ex);
2828

29-
verify(ex).sendResponseHeaders(eq(200), eq((long) expected.length));
29+
verify(ex).sendResponseHeaders(200, expected.length);
3030
assertThat(body.toByteArray()).isEqualTo(expected);
3131
}
3232

@@ -39,7 +39,7 @@ void headSendsContentLengthHeaderWithoutBody() throws IOException {
3939

4040
new ClasspathResourceHandler("/sample.txt").handle(ex);
4141

42-
verify(ex).sendResponseHeaders(eq(200), eq(-1L));
42+
verify(ex).sendResponseHeaders(200, -1);
4343
assertThat(responseHeaders.getFirst("Content-Length"))
4444
.isEqualTo(String.valueOf(expected.length));
4545
}

0 commit comments

Comments
 (0)