title: Spring: JUnit-Test: applicationContext is not loaded
body: <p>I've got the following Test-class, but it doesn't matter what I set as "ContextConfiguration-locations" - it never set my UserService. And it doesn't throw any error when I set a non-existing file in the locations-property... what am I doing wrong?</p>
  
  <pre><code>@RunWith(SpringJUnit4ClassRunner.class)
  @ContextConfiguration(locations = { "classpath:applicationContextTest.xml" })
  public class BasicPersistenceTest {
  
  @Autowired
  private UserService userService;
  
  @Test
  public void testUserLogin() throws Exception {
  
      User result = userService.getUser("stefan", "walkner");
  
      Assert.assertNotNull(result);
  }
  
  @Test
  public void testLogin() {
      User user = userService.getUser("stefan", "walkner");
      Assert.assertNull(user);
  }
  
  public UserService getUserService() {
      return userService;
  }
  
  public void setUserService(UserService userService) {
      this.userService = userService;
  }
  }
  </code></pre>
  
  <p>Spring-Version: 2.5.6.SEC01</p>
  
  <p>JUnit-Version: 4.5</p>
  
  <p>JDK: 1.5</p>