一个Spring框架的测试问题,总是调不通,求指教。

package com.chh;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.testng.AssertJUnit;
import org.testng.annotations.Test;
@Test
@ContextConfiguration("/beans.xml")
public class NewTest {

@Autowired
private ServiceImpl service;
@Test
public void getMessage(){
    String msg = service.getMessage("abc");
    AssertJUnit.assertEquals("abc", msg);

}

}

上面是我的测试代码,beans.xml放在src目录下。 service变量采用自动装配的方式引入。但是总是报错误。错误如下。
java.lang.NullPointerException
at com.chh.NewTest.getMessage(NewTest.java:15)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
说的是service引用时一个空指针,也就是说service对象在容器中就没有。
现在怀疑Spring容器就没有正常启动,也就是说@ContextConfiguration("/beans.xml") 就没有启动容器。
不过一直找不到关键点所在,请大神指教我错在哪了?

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:/applicationContext.xml"})
public class CustomerServiceTest {
@Autowired
private CustomerService customerService;
}