Buggy code:
public class RestTemplate extends HttpAccessor implements RestOperations { private static final boolean jaxb2Present = ClassUtils . isPresent ( "javax.xml.bind.Binder" , RestTemplate . class . getClassLoader ( ) ) ; private static final boolean jacksonPresent = ( ClassUtils . isPresent ( "org.codehaus.jackson.map.ObjectMapper" , RestTemplate . class . getClassLoader ( ) ) ) && ( ClassUtils . isPresent ( "org.codehaus.jackson.JsonGenerator" , RestTemplate . class . getClassLoader ( ) ) ) ; private static boolean romePresent = ClassUtils . isPresent ( "com.sun.syndication.feed.WireFeed" , RestTemplate . class . getClassLoader ( ) ) ; private final ResponseExtractor < HttpHeaders > headersExtractor = new RestTemplate . HeadersExtractor ( ) ; private List < HttpMessageConverter < ? > > messageConverters = new ArrayList < HttpMessageConverter < ? > > ( ) ; private ResponseErrorHandler errorHandler = new DefaultResponseErrorHandler ( ) ; public RestTemplate ( ) { } public RestTemplate ( ClientHttpRequestFactory requestFactory ) { } public void setMessageConverters ( List < HttpMessageConverter < ? > > messageConverters ) { } public List < HttpMessageConverter < ? > > getMessageConverters ( ) { } public void setErrorHandler ( ResponseErrorHandler errorHandler ) { } public ResponseErrorHandler getErrorHandler ( ) { } public < T > T getForObject ( String url , Class < T > responseType , Object ... urlVariables ) throws RestClientException { } public < T > T getForObject ( String url , Class < T > responseType , Map < String , ? > urlVariables ) throws RestClientException { } public < T > T getForObject ( URI url , Class < T > responseType ) throws RestClientException { } public < T > ResponseEntity < T > getForEntity ( String url , Class < T > responseType , Object ... urlVariables ) throws RestClientException { } public < T > ResponseEntity < T > getForEntity ( String url , Class < T > responseType , Map < String , ? > urlVariables ) throws RestClientException { } public < T > ResponseEntity < T > getForEntity ( URI url , Class < T > responseType ) throws RestClientException { } public HttpHeaders headForHeaders ( String url , Object ... urlVariables ) throws RestClientException { } public HttpHeaders headForHeaders ( String url , Map < String , ? > urlVariables ) throws RestClientException { } public HttpHeaders headForHeaders ( URI url ) throws RestClientException { } public URI postForLocation ( String url , Object request , Object ... urlVariables ) throws RestClientException { } public URI postForLocation ( String url , Object request , Map < String , ? > urlVariables ) throws RestClientException { } public URI postForLocation ( URI url , Object request ) throws RestClientException { } public < T > T postForObject ( String url , Object request , Class < T > responseType , Object ... uriVariables ) throws RestClientException { } public < T > T postForObject ( String url , Object request , Class < T > responseType , Map < String , ? > uriVariables ) throws RestClientException { } public < T > T postForObject ( URI url , Object request , Class < T > responseType ) throws RestClientException { } public < T > ResponseEntity < T > postForEntity ( String url , Object request , Class < T > responseType , Object ... uriVariables ) throws RestClientException { } <START_BUG> public < T > HttpEntity < T > postForEntity ( String url , Object request , Class < T > responseType , Map < String , ? > uriVariables ) throws RestClientException { <END_BUG> RestTemplate . HttpEntityRequestCallback requestCallback = new RestTemplate . HttpEntityRequestCallback ( request , responseType ) ; RestTemplate . ResponseEntityResponseExtractor < T > responseExtractor = new RestTemplate . ResponseEntityResponseExtractor < T > ( responseType ) ; return execute ( url , POST , requestCallback , responseExtractor , uriVariables ) ; } public < T > ResponseEntity < T > postForEntity ( URI url , Object request , Class < T > responseType ) throws RestClientException { } public void put ( String url , Object request , Object ... urlVariables ) throws RestClientException { } public void put ( String url , Object request , Map < String , ? > urlVariables ) throws RestClientException { } public void put ( URI url , Object request ) throws RestClientException { } public void delete ( String url , Object ... urlVariables ) throws RestClientException { } public void delete ( String url , Map < String , ? > urlVariables ) throws RestClientException { } public void delete ( URI url ) throws RestClientException { } public Set < HttpMethod > optionsForAllow ( String url , Object ... urlVariables ) throws RestClientException { } public Set < HttpMethod > optionsForAllow ( String url , Map < String , ? > urlVariables ) throws RestClientException { } public Set < HttpMethod > optionsForAllow ( URI url ) throws RestClientException { } public < T > ResponseEntity < T > exchange ( String url , HttpMethod method , HttpEntity < ? > requestEntity , Class < T > responseType , Object ... uriVariables ) throws RestClientException { } public < T > ResponseEntity < T > exchange ( String url , HttpMethod method , HttpEntity < ? > requestEntity , Class < T > responseType , Map < String , ? > uriVariables ) throws RestClientException { } public < T > ResponseEntity < T > exchange ( URI url , HttpMethod method , HttpEntity < ? > requestEntity , Class < T > responseType ) throws RestClientException { } public < T > T execute ( String url , HttpMethod method , RequestCallback requestCallback , ResponseExtractor < T > responseExtractor , Object ... urlVariables ) throws RestClientException { } public < T > T execute ( String url , HttpMethod method , RequestCallback requestCallback , ResponseExtractor < T > responseExtractor , Map < String , ? > urlVariables ) throws RestClientException { }

Fix:
public < T > ResponseEntity < T > postForEntity ( String url , Object request , Class < T > responseType , Map < String , ? > uriVariables ) throws RestClientException {