Fix broken test

This commit is contained in:
Sam Brannen 2019-05-09 16:21:54 +02:00
parent 1be29d5933
commit d8f1d56100
1 changed files with 1 additions and 1 deletions

View File

@ -183,7 +183,7 @@ public class EncoderHttpMessageWriterTests {
public void isStreamingMediaType() throws InvocationTargetException, IllegalAccessException {
HttpMessageWriter<String> 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));