title: SpringBoot @WebMvcTest, autowiring RestTemplateBuilder
body: <p>I've got a problem while testing a Spring Controller.
  I'm using the annotation @WebMvcTest in my test class.
  When I run the test, I get this error:
  No qualifying bean of type 'org.springframework.boot.web.client.RestTemplateBuilder' available</p>
  
  <p>I'm using RestTemplate for other classes in my project so I've defined a bean in my main class:</p>
  
  <pre><code>@Bean
  public RestTemplate restTemplate(RestTemplateBuilder builder) {
      return builder.build();
  }
  </code></pre>
  
  <p>To make it work, I have to define my restTemplate bean this way:</p>
  
  <pre><code>@Bean
  public RestTemplate restTemplate() {
      return new RestTemplate();
  }
  </code></pre>
  
  <p>Is it a problem with the annotation @WebMvcTest or did I miss something?</p>
  
  <p>Thanks</p>