Skip to content

Commit d8f1d56

Browse files
committed
Fix broken test
1 parent 1be29d5 commit d8f1d56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-web/src/test/java/org/springframework/http/codec/EncoderHttpMessageWriterTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public void emptyBodyWritten() {
183183
public void isStreamingMediaType() throws InvocationTargetException, IllegalAccessException {
184184
HttpMessageWriter<String> writer = getWriter(TEXT_HTML);
185185
MediaType streamingMediaType = new MediaType(TEXT_PLAIN, Collections.singletonMap("streaming", "true"));
186-
when(this.encoder.getStreamingMediaTypes()).thenReturn(Arrays.asList(streamingMediaType));
186+
given(this.encoder.getStreamingMediaTypes()).willReturn(Arrays.asList(streamingMediaType));
187187
Method method = ReflectionUtils.findMethod(writer.getClass(), "isStreamingMediaType", MediaType.class);
188188
ReflectionUtils.makeAccessible(method);
189189
assertTrue((Boolean) method.invoke(writer, streamingMediaType));

0 commit comments

Comments
 (0)