title: @SpringBootTest not creating inner beans while loading the context
body: <p>I would like to learn why inner beans are not created while trying to test like below : </p>
  
  <pre><code>RunWith(SpringRunner.class)
  @SpringBootTest(classes=MyTest.class)
  public class MyTest {
  
       @SpyBean A a;
  
  
  
       @Test
       public  void  myTest() {   
         assertTrue(a.some());       
       }
  
  
      @Component
      class A {
        private B b;
        A(B dependency) {
          this.b = dependency;
        }
        boolean some() {
          return b.value();
        }
      }
  
      @Configuration
      class B {
  
  
        boolean value() { return true; }
      }
  
  }
  </code></pre>
  
  <p>Error:  <code>No qualifying bean of type 'com.example.MyTest$B' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations:</code></p>
  
  <p>Despite annotating the inner class with @Configuration it is not creating the bean while testing the method. </p>
  
  <p>please note it works when I add like below <code>@SpringBootTest(classes=MyTest.class,MyTest.B.class,MyTest.A.class})</code></p>