title: Spring Boot properties in 'application.yml' not loading from JUnit Test
body: <p>What am I doing wrong? I'm using this little standalone App which runs and finds my <code>src/main/resources/config/application.yml</code>. The same configuration doesn't work from JUnit, see below:</p>
  
  <pre><code>@Configuration
  @ComponentScan
  @EnableConfigurationProperties
  
  public class TestApplication {
  
      public static void main(String[] args) {
  
          SpringApplication.run(TestApplication.class);
      }
  }
  
  
  @Component
  @ConfigurationProperties
  
  public class Bean{
      ...
  }
  </code></pre>
  
  <p>The following doesn't work, the same properties in <code>application.yml</code> are not loaded and <code>Bean</code> has only <code>null</code> values:</p>
  
  <pre><code>@RunWith(SpringJUnit4ClassRunner.class)
  @ContextConfiguration(classes = TestApplication.class)
  
  public class SomeTestClass {
      ...
  }
  </code></pre>