docs: Object rewrapResult(RepresentationModel<?> newBody, @Nullable Object originalValue) {
  
  		if (!(originalValue instanceof HttpEntity)) {
  			return rootLinksAsHeaders ? HeaderLinksResponseEntity.wrap(newBody) : newBody;
  		}
  
  		HttpEntity<RepresentationModel<?>> entity = null;
  
  		if (originalValue instanceof ResponseEntity) {
  			ResponseEntity<?> source = (ResponseEntity<?>) originalValue;
  			entity = new ResponseEntity<>(newBody, source.getHeaders(), source.getStatusCode());
  		} else {
  			HttpEntity<?> source = (HttpEntity<?>) originalValue;
  			entity = new HttpEntity<>(newBody, source.getHeaders());
  		}
  
  		return rootLinksAsHeaders ? HeaderLinksResponseEntity.wrap(entity) : entity;
  	}