title: resttemplate.exchange throws null pointer exception
body: <pre><code>restTemplate.postForEntity(url,entity, String.class);
  ResponseEntity&lt;String&gt; response = restTemplate.exchange(url, HttpMethod.POST, entity, String.class);
  </code></pre>
  
  <p>Throws null pointer exception when trying to create an object.</p>
  
  <p>I checked entity and url, it is getting printed in Logger message. But at this line it throws null pointer exception, but the object is still getting created..</p>
  
  <p>If the object is getting created how can this throw null pointer exception..</p>
  
  <p>I am using kubernetes, when i check command line in kubernetes it says object got created..but in logs it shows null pointer exception</p>