title: Dependency Injection not working in SpringBoot with Junit 5 Integration test
body: <p>I am working on setting up an Integration test with SpringBoot and Junit5 following this <a href="https://dzone.com/articles/spring-boot-2-with-junit-5-and-mockito-2-for-unit" rel="nofollow noreferrer">tutorial</a></p>
  
  <p>But when I run this test file without <code>@RunWith(SpringRunner.class)</code> annotation gives NullPointerException since RecordService is not being injected.</p>
  
  <pre><code>@ExtendWith(SpringExtension.class)
  @SpringBootTest
  @DefaultTestAnnotations // This is my meta-annotations
  public class RecordServiceImplTest {
  
      @Autowired
      private RecordService recordService; // This is null.
  
      @Test
      public void whenSearchParametersAreProvided_ItShouldGetTheGoldenRecord() throws MdmMatchServiceException {
          GoldenRecordDTO searchParams = new GoldenRecordDTO();
          searchParams.setCountryCode("CN");
          searchParams.setName("neeraj");
          assertNotNull(recordService.getGoldenRecord(searchParams));
      }
  }
  </code></pre>
  
  <p>Is it mandatory to have <code>@RunWith(SpringRunner.class)</code> for running Integration tests?</p>