java junit spring spring-boot spring-test

Spring Boot properties in ‘application.yml’ not loading from JUnit Test

What am I doing wrong? I’m using this little standalone App which runs and finds my src/main/resources/config/application.yml. The same configuration doesn’t work from JUnit, see below:

public class TestApplication {
public static void main(String[] args) {;
public class Bean{

The following doesn’t work, the same properties in application.yml are not loaded and Bean has only null values:

@ContextConfiguration(classes = TestApplication.class)
public class SomeTestClass {