From d8f1d561001372f1aadcfab62d5f7187073f9dcb Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Thu, 9 May 2019 16:21:54 +0200 Subject: [PATCH] Fix broken test --- .../http/codec/EncoderHttpMessageWriterTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-web/src/test/java/org/springframework/http/codec/EncoderHttpMessageWriterTests.java b/spring-web/src/test/java/org/springframework/http/codec/EncoderHttpMessageWriterTests.java index 952bdd0161..095016237d 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/EncoderHttpMessageWriterTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/EncoderHttpMessageWriterTests.java @@ -183,7 +183,7 @@ public class EncoderHttpMessageWriterTests { public void isStreamingMediaType() throws InvocationTargetException, IllegalAccessException { HttpMessageWriter writer = getWriter(TEXT_HTML); MediaType streamingMediaType = new MediaType(TEXT_PLAIN, Collections.singletonMap("streaming", "true")); - when(this.encoder.getStreamingMediaTypes()).thenReturn(Arrays.asList(streamingMediaType)); + given(this.encoder.getStreamingMediaTypes()).willReturn(Arrays.asList(streamingMediaType)); Method method = ReflectionUtils.findMethod(writer.getClass(), "isStreamingMediaType", MediaType.class); ReflectionUtils.makeAccessible(method); assertTrue((Boolean) method.invoke(writer, streamingMediaType));