@ExceptionHandler({HttpMessageNotReadableException.class})
  @ResponseStatus(HttpStatus.BAD_REQUEST)
  protected ResponseEntity<RestError> handleHttpMessageNotReadableException(HttpMessageNotReadableException httpMessageNotReadableException) {
    String exceptionMessage = getExceptionMessage(httpMessageNotReadableException);
    return new ResponseEntity<>(new RestError(exceptionMessage), HttpStatus.BAD_REQUEST);
  }
@Test
  public void handleHttpMessageNotReadableException_whenCauseIsNotInvalidFormatExceptionAndMessageIsNull_shouldUseEmptyStringAsMessage() {

    HttpMessageNotReadableException exception = new HttpMessageNotReadableException(null, (Exception) null);

    ResponseEntity<RestError> responseEntity = underTest.handleHttpMessageNotReadableException(exception);

    assertThat(responseEntity.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
    assertThat(responseEntity.getBody().message()).isEmpty();
  }