title: Beans not injected into jUnit test
body: <p>I have a problem with proper Spring Beans configuration. My whole app works properly with Spring and I wanted to add jUnit tests. Unfortunately, beans are not injected properly. 
  I have two directories inside same module. 
  My whole app is inside:</p>
  
  <p>/src/main/java/main/</p>
  
  <p>which works correctly and I added RestTest.java and BeanTestConfiguration.java
  inside:</p>
  
  <p>/src/test/java/main/</p>
  
  <pre><code>@SpringBootTest
  @RunWith(Spring.Runner.class)
  @ContextConfiguration(classes=BeanTestConfiguration.class)
  class RestTest {
  
      @Autowired
      public String testString;
  
  
      @Test
      public void send() {
          System.out.println(testString);
          Assert.assertNotNull(testString);
      }
  }
  </code></pre>
  
  <p>And config BeanTestConfiguration</p>
  
  <pre><code>@Configuration
  public class BeanTestConfiguration {
      @Bean
      public String testString() { return new String("Hello"); }
  }
  </code></pre>
  
  <p>Unfortunately, when I run test on send method System out prints null, and Assert throws fail. 
  I added Spring Application Context to Project Structure inside IntelliJ</p>