@Test public void mapsLoginFailureToUnauthorized() throws Exception { ResponseEntity<?> responseEntity = underTest.mapToResponseEntity(new LoginFailure("error")); assertThat(responseEntity, hasStatusCode(equalTo(401))); }
public ResponseEntity<?> mapToResponseEntity(Exception exception) { HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_JSON); return mapToResponseEntity(exception, headers); }
RestErrorHandler { public ResponseEntity<?> mapToResponseEntity(Exception exception) { HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_JSON); return mapToResponseEntity(exception, headers); } }
RestErrorHandler { public ResponseEntity<?> mapToResponseEntity(Exception exception) { HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_JSON); return mapToResponseEntity(exception, headers); }  }
RestErrorHandler { public ResponseEntity<?> mapToResponseEntity(Exception exception) { HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_JSON); return mapToResponseEntity(exception, headers); }  ResponseEntity<?> mapToResponseEntity(Exception exception); ResponseEntity<?> mapToResponseEntity(Exception exception, HttpHeaders headers); }
RestErrorHandler { public ResponseEntity<?> mapToResponseEntity(Exception exception) { HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_JSON); return mapToResponseEntity(exception, headers); }  ResponseEntity<?> mapToResponseEntity(Exception exception); ResponseEntity<?> mapToResponseEntity(Exception exception, HttpHeaders headers);  }