ResponseEntity provides static "unprocessableEntity()" convenience method as well
Issue: SPR-12515
This commit is contained in:
@@ -26,6 +26,7 @@ import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* @author Arjen Poutsma
|
||||
* @author Marcel Overdijk
|
||||
*/
|
||||
public class ResponseEntityTests {
|
||||
|
||||
@@ -119,6 +120,15 @@ public class ResponseEntityTests {
|
||||
assertNull(responseEntity.getBody());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void unprocessableEntity() throws URISyntaxException {
|
||||
ResponseEntity<Void> responseEntity = ResponseEntity.unprocessableEntity().build();
|
||||
|
||||
assertNotNull(responseEntity);
|
||||
assertEquals(HttpStatus.UNPROCESSABLE_ENTITY, responseEntity.getStatusCode());
|
||||
assertNull(responseEntity.getBody());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void headers() throws URISyntaxException {
|
||||
String eTag = "\"foo\"";
|
||||
|
||||
Reference in New Issue
Block a user