ResponseEntity provides static "badRequest()" convenience method as well
Issue: SPR-12112
This commit is contained in:
@@ -101,6 +101,15 @@ public class ResponseEntityTests {
|
||||
assertNull(responseEntity.getBody());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void badRequest() throws URISyntaxException {
|
||||
ResponseEntity<Void> responseEntity = ResponseEntity.badRequest().build();
|
||||
|
||||
assertNotNull(responseEntity);
|
||||
assertEquals(HttpStatus.BAD_REQUEST, responseEntity.getStatusCode());
|
||||
assertNull(responseEntity.getBody());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void notFound() throws URISyntaxException {
|
||||
ResponseEntity<Void> responseEntity = ResponseEntity.notFound().build();
|
||||
|
||||
Reference in New Issue
Block a user