title: For @SpringBootTest @Import of @TestConfiguration class does nothing, while @ContextConfiguration overrides as expected
body: <p>Considering following integration test annotations:</p>
  
  <pre><code>@RunWith(SpringRunner.class)
  @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE,
                  properties = "spring.main.allow-bean-definition-overriding=true")
  @ContextConfiguration(classes = {WorkerTestConfig.class})
  //@Import(value = {WorkerTestConfig.class})
  @ActiveProfiles({"dev","test"})
  public class NumberServiceITest {
  </code></pre>
  
  <p>The role of WorkestTestConfig is to override real bean/set of beans during integration startup, whenever I use <code>@ContextConfiguration</code> the real bean is backing off and the one from the WorkerTestConfig is used, whenever I use <code>@Import</code> the real bean is still created and fails the test.</p>
  
  <p>The <code>WorkerTestConfig</code> itself is as trivial as possible:</p>
  
  <pre><code>@TestConfiguration
  public class WorkerTestConfig {
  
      @Primary
      @Bean
      public ScheduledExecutorService taskExecutor() {
          return DirectExecutorFactory.createSameThreadExecutor();
      }
  }
  </code></pre>
  
  <p>can anyone explain please yet another magical behavior of @SpringBootTest annotation? If you reproduce the same behaviour please confirm so I can go to issue tracker, as I've seen people using <code>@Import</code> with <code>@SpringBootTest</code> here on SO and nothing prohibits it in spring boot docs:
  <a href="https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-testing.html#boot-features-testing-spring-boot-applications-excluding-config" rel="nofollow noreferrer">https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-testing.html#boot-features-testing-spring-boot-applications-excluding-config</a></p>
  
  <p>Totally puzzled on what's going on.</p>
  
  <p>Version: 2.1.2.RELEASE</p>
  
  <p><strong>Update:</strong></p>
  
  <p>Also tried to remove the real bean to see if the issue is with just overriding, but <code>@Import</code> annotation is just dead in the water, does not work -> unable even to create a bean, @ContextConfiguration has additive/overriding behavior, import does nothing at all.
  Fully qualified import for the annotation is:
  import org.springframework.context.annotation.Import;</p>
  
  <p>Also tried to change from <code>@TestConfiguration</code> to <code>@Configuration</code> just for the sake of it, nothing at all. DEAD.</p>
  
  <p><strong>Update 2:</strong></p>
  
  <p>The <code>@Import</code> works with standard spring test though :</p>
  
  <pre><code>@RunWith(SpringRunner.class)
  @ContextConfiguration(classes = {Some.class,
                                   Some2WhichDependsOnWorkerTestConfig.class})
  
  @Import(WorkerTestConfig.class)
  @ActiveProfiles("test")
  public class SomeOtherTest {
  </code></pre>