@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
/ *
* Copyright 2002 - 2015 the original author or authors .
* Copyright 2002 - 2017 the original author or authors .
*
* Licensed under the Apache License , Version 2 . 0 ( the "License" ) ;
* you may not use this file except in compliance with the License .
@ -32,7 +32,6 @@ import org.springframework.http.MediaType;
@@ -32,7 +32,6 @@ import org.springframework.http.MediaType;
import org.springframework.http.MockHttpInputMessage ;
import org.springframework.http.MockHttpOutputMessage ;
import org.springframework.http.converter.AbstractHttpMessageConverter ;
import org.springframework.http.converter.HttpMessageNotReadableException ;
import org.springframework.http.converter.json.MappingJacksonValue ;
import static org.hamcrest.CoreMatchers.* ;
@ -103,7 +102,7 @@ public class MappingJackson2XmlHttpMessageConverterTests {
@@ -103,7 +102,7 @@ public class MappingJackson2XmlHttpMessageConverterTests {
outputMessage . getHeaders ( ) . getContentType ( ) ) ;
}
@Test ( expected = HttpMessageNotReadable Exception. class )
@Test ( expected = IO Exception. class )
public void readInvalidXml ( ) throws IOException {
String body = "FooBar" ;
MockHttpInputMessage inputMessage = new MockHttpInputMessage ( body . getBytes ( "UTF-8" ) ) ;
@ -155,7 +154,7 @@ public class MappingJackson2XmlHttpMessageConverterTests {
@@ -155,7 +154,7 @@ public class MappingJackson2XmlHttpMessageConverterTests {
MockHttpInputMessage inputMessage = new MockHttpInputMessage ( body . getBytes ( "UTF-8" ) ) ;
inputMessage . getHeaders ( ) . setContentType ( new MediaType ( "application" , "xml" ) ) ;
this . thrown . expect ( HttpMessageNotReadable Exception. class ) ;
this . thrown . expect ( IO Exception. class ) ;
this . converter . read ( MyBean . class , inputMessage ) ;
}
@ -182,7 +181,7 @@ public class MappingJackson2XmlHttpMessageConverterTests {
@@ -182,7 +181,7 @@ public class MappingJackson2XmlHttpMessageConverterTests {
MockHttpInputMessage inputMessage = new MockHttpInputMessage ( body . getBytes ( "UTF-8" ) ) ;
inputMessage . getHeaders ( ) . setContentType ( new MediaType ( "application" , "xml" ) ) ;
this . thrown . expect ( HttpMessageNotReadable Exception. class ) ;
this . thrown . expect ( IO Exception. class ) ;
this . converter . read ( MyBean . class , inputMessage ) ;
}