Fix broken test
This commit is contained in:
parent
1be29d5933
commit
d8f1d56100
|
@ -183,7 +183,7 @@ public class EncoderHttpMessageWriterTests {
|
||||||
public void isStreamingMediaType() throws InvocationTargetException, IllegalAccessException {
|
public void isStreamingMediaType() throws InvocationTargetException, IllegalAccessException {
|
||||||
HttpMessageWriter<String> writer = getWriter(TEXT_HTML);
|
HttpMessageWriter<String> writer = getWriter(TEXT_HTML);
|
||||||
MediaType streamingMediaType = new MediaType(TEXT_PLAIN, Collections.singletonMap("streaming", "true"));
|
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);
|
Method method = ReflectionUtils.findMethod(writer.getClass(), "isStreamingMediaType", MediaType.class);
|
||||||
ReflectionUtils.makeAccessible(method);
|
ReflectionUtils.makeAccessible(method);
|
||||||
assertTrue((Boolean) method.invoke(writer, streamingMediaType));
|
assertTrue((Boolean) method.invoke(writer, streamingMediaType));
|
||||||
|
|
Loading…
Reference in New Issue