title: jdbcTemplate.getDataSource() is always null in my unit tests
body: <p>I am new in writing junit test for spring boot applications. Could anybody help me to understand the situation?</p>
  
  <p>I have a service I’d like to test:</p>
  
  <pre><code>@Service
  public class MyService {
      private final JdbcTemplate jdbcTemplate;
      …    
      @Autowired
      public MyService(JdbcTemplate jdbcTemplate){
          this.jdbcTemplate = jdbcTemplate;
          …
      }
      @Async
      public SomeType myMethod(SomeDTO request) {
          DataSource dataSource = this.jdbcTemplate.getDataSource();
          …
      }
      …
  }
  </code></pre>
  
  <p>When I start my application and call service through REST API then my dataSource is correct and based on parameters from application.yml.</p>
  
  <p>However, when I call it from my unit tests then <code>this.jdbcTemplate.getDataSource()</code> is always null.</p>
  
  <p>Here my test classes:</p>
  
  <p><strong>SpringBootTestApplication:</strong></p>
  
  <pre><code>@RunWith(SpringRunner.class)
  @SpringBootTest(
          classes = TestConfigurator.class
  )
  public abstract class SpringBootTestApplication {
  }
  </code></pre>
  
  <p><strong>MyServiceTest:</strong></p>
  
  <pre><code>    public class MyServiceTest  extends SpringBootTestApplication {
  
          @MockBean
          private JdbcTemplate jdbcTemplate;
  
  
          @Autowired
          @InjectMocks
          private MyService myService;
  
          @Test
          public void Test_1(){
              DataSource dataSource = this.jdbcTemplate.getDataSource();
  myService.getSomething(dataSource, ...)
               …
          }
  
  
      }
  </code></pre>
  
  <p>Should I add something special to my TestConfigurator.class?</p>