title: Spring xml + JUnit - xml context file not working in src/test/resources but works in src/main/resources
body: <p>I'm having a problem with junit test like this. For some reason spring context files only work if I put them in the src/main/resources folder of the maven project. Intellij doesn't give me any warning but both junit test runner from mvn and from ide bomb.</p>
  
  <p>Code and output in both cases included below:</p>
  
  <pre><code>@RunWith(SpringJUnit4ClassRunner.class)
  @ContextConfiguration({"classpath:/test-applicationContext.xml"})
  public class DataSharingTest {
  
      AuthTokenService authTokenService;
  
      @Autowired
      public void setAuthTokenService(AuthTokenService authTokenService) {
          this.authTokenService = authTokenService;
      }
  
      @Test
      public void MyTest(){
          System.out.println(authTokenService);
      }
  }
  </code></pre>
  
  <p>If the file is at src/test/resources/test-applicationContext.xml
  I get</p>
  
  <pre><code>2014-07-29 16:44:18,061 main      ERROR TestContextManager    Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@69e328e0] to prepare test instance [com.jg.datasharing.DataSharingTest@4090c06f]
  java.lang.IllegalStateException: Failed to load ApplicationContext
  Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [test-applicationContext.xml]; nested exception is java.io.FileNotFoundException: class path resource [test-applicationContext.xml] cannot be opened because it does not exist. If I try a wildcard in the path it will stop complaining about file not found but will compalain that the bean is missing.
  </code></pre>
  
  <p>If I move the file to src/main/resources/test-applicationContext.xml it passes</p>
  
  <pre><code>2014-07-29 16:46:53,564 main      INFO  lBeanDefinitionReader Loading XML bean definitions from class path resource [test-applicationContext.xml]
  2014-07-29 16:46:53,778 main      INFO  ricApplicationContext Refreshing org.springframework.context.support.GenericApplicationContext@7426dbec: startup date [Tue Jul 29 16:46:53 EDT 2014]; root of context hierarchy
  2014-07-29 16:46:53,904 main      INFO  ltListableBeanFactory Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@19202d69: defining beans [authTokenService,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy
  com.jg.security.token.auth.JwtAuthTokenService@1380cf2a
  2014-07-29 16:46:53,995 Thread-1  INFO  ricApplicationContext Closing org.springframework.context.support.GenericApplicationContext@7426dbec: startup date [Tue Jul 29 16:46:53 EDT 2014]; root of context hierarchy
  2014-07-29 16:46:53,996 Thread-1  INFO  ltListableBeanFactory Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@19202d69: defining beans [authTokenService,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy
  
  Process finished with exit code 0
  </code></pre>
  
  <p>Why would the file not be found in the test context classpath??</p>