title: Using RestTemplateBuilder with @ContextConfiguration in IT tests
body: <p>I am running into problems while using RestTemplateBuilder with @ContextConfiguration in a Spring boot application (I have tried to add @SpringBootTest, @RunWith(SpringRunner.class) annotation without any luck). </p>
  
  <p>Any help is appreciated. Here is the background:</p>
  
  <p>I have annotated my class like the following:</p>
  
  <pre><code>@ContextConfiguration(classes = {
      JsonNodeList.class,
      JsonNodeUtils.class,
      MyService.class,
      RestClient.class,
      RestTemplateBuilder.class}, loader = SpringBootContextLoader.class)
   public class StepsDefinition {
  </code></pre>
  
  <p>The RestClient class has RestTemplateBuilder autowired as:</p>
  
  <pre><code> @Autowired
    public RestClient(final RestTemplateBuilder restTemplateBuilder) {
      this.restTemplate = configureRestTemplate(restTemplateBuilder);
    }
  </code></pre>
  
  <p>MyService class autowires the RestClient. When i try to load the application using <code>@ContextConfiguration</code> with <code>SpringBootContextLoader</code>, i am getting the following error:</p>
  
  <pre><code>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'restTemplateBuilder': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.client.RestTemplateBuilder]: No default constructor found; nested exception is java.lang.NoSuchMethodException: org.springframework.boot.web.client.RestTemplateBuilder.&lt;init&gt;()
  </code></pre>