title: Build Response Entity without sending it
body: <p>I have the following situation: In my spring application I make a request to another web service. This web service sends me a ResponseEntity back. Now I have modified the ResponseEntity this worked perfectly, except that I cannot build a new ResponseEntity, I don't know why. Can someone tell me how to build a new ResponseEntity?</p>
  
  <p>Thats my code:</p>
  
  <pre><code> JsonNode modifiedBody = //body
   HttpHeaders modifiedHeader = //header
   HttpEntity&lt;Object&gt; newResponse = new HttpEntity&lt;&gt;(modifiedBody, modifiedHeader);
  
   //until this point everything works perfect now I want to create a new ResponseEntity without calling a webservice
   ResponseEntity&lt;Object&gt; entity = //MAKE NEW RESPONSE ENTITY
  </code></pre>
  
  <p>Can someone please tell me how to make a new response entity without sending it?
  Thanks in advance.</p>
  
  <p>Edit:
  Disappearing value:</p>
  
  <p><a href="https://i.stack.imgur.com/YqQio.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YqQio.png" alt="enter image description here"></a></p>
  
  <p>If I look in the debugger I find the value. But in the next step its gone.</p>
  
  <p><a href="https://i.stack.imgur.com/yFYdx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yFYdx.png" alt="enter image description here"></a></p>