title: RestTemplate in Java - Not enough variable values available with RestTemplate
body: <p>I've got the following:</p>
  
  <pre><code>final String notification = "{\"DATA\"}";
  final String url = "http://{DATA}/create";
  ResponseEntity&lt;String&gt; auth = create(address, name, psswd, url);
  </code></pre>
  
  <p>Attacking this method:</p>
  
  <pre><code>private ResponseEntity&lt;String&gt; create(final String address, final String name,
                                                            final String newPassword, final String url) {
          final Map&lt;String, Object&gt; param = new HashMap&lt;&gt;();
          param.put("name", name);
          param.put("password", newPassword);
          param.put("email", address);
  
          final HttpHeaders header = new HttpHeaders();
  
          final HttpEntity&lt;?&gt; entity = new HttpEntity&lt;Object&gt;(param, header);
  
          RestTemplate restTemplate = new RestTemplate();
          return restTemplate.postForEntity(url, entity, String.class);
      }
  </code></pre>
  
  <p>I think it should work, but it's throwing me a </p>
  
  <pre><code>org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalArgumentException: Not enough variable values available to expand 'notification'
  </code></pre>
  
  <p>Why?</p>