title: Rest template doesn't return response entity after exception handler
body: <p>I have the following controller method</p>
  
  <pre><code>@PostMapping(consumes = "application/json",
               produces = "application/json")
  public ResponseEntity&lt;Board&gt; createBoard(@Valid @RequestBody 
  BoardRequestDTO boardRequestDTO) {
      Board board = new Board();
      board.setName(boardRequestDTO.getName());
      board.setCompanyId(Integer.valueOf(boardRequestDTO.getCompanyId()));
      board.setCode(boardRequestDTO.getCode());
      Board dbBoard = boardRepository.save(board);
      return new ResponseEntity&lt;&gt;(dbBoard, HttpStatus.CREATED);
  } 
  </code></pre>
  
  <p>And have the following exception heandler for it that handle validation error</p>
  
  <pre><code>@ControllerAdvice
  public class ExceptionHandlerConfig extends ResponseEntityExceptionHandler   {
      @Override
      protected ResponseEntity&lt;Object&gt;       
      handleMethodArgumentNotValid(MethodArgumentNotValidException ex, 
         HttpHeaders headers, HttpStatus status, WebRequest request) {
         ValidationErrorResponses validationErrorResponses = new 
         ValidationErrorResponses();
         for (FieldError fieldError : ex.getBindingResult().getFieldErrors())
         validationErrorResponses.addError(new ValidationError(fieldError.getField(),fieldError.getDefaultMessage()));
  
         ResponseEntity&lt;Object&gt; responseEntity = new ResponseEntity&lt;Object&gt; 
         (validationErrorResponses, HttpStatus.UNPROCESSABLE_ENTITY);
         return responseEntity;
      }
  
   }
  </code></pre>
  
  <p>When I send fail request via Postman I get the predictable response:</p>
  
  <pre><code>{
      "errors": [
           {
              "field": "companyId",
              "message": "Must be digit"
           }
      ]
  }
  </code></pre>
  
  <p>But when I try to implement the following unit test to this endpoint I get the org.springframework.web.client.HttpClientErrorException$UnprocessableEntity: 422 null</p>
  
  <p>:</p>
  
  <pre><code>boardDTO.setCompanyId("");
  HttpHeaders headers = new HttpHeaders();
  headers.set("Content-Type", "application/json");
  headers.set("Accept", "application/json");
  HttpEntity&lt;ValidationErrorResponses&gt; httpEntity = new HttpEntity(boardDTO, headers);
  
  ResponseEntity&lt;ValidationErrorResponses&gt; responseEntity = 
  restTemplate.postForEntity(url, httpEntity, ValidationErrorResponses.class);
  
  ValidationErrorResponses responseBody = responseEntity.getBody();
  assertEquals(422, responseEntity.getStatusCode());
  assertEquals("companyId", responseBody.getErrors().get(0).getField());
  assertEquals("Must be digit", responseBody.getErrors().get(0).getMessage()); 
  </code></pre>
  
  <p>What should I do that my test work correctly?</p>