Missing Context file location in configuration can cause this, one approach to solve this:
like:
@ContextConfiguration(locations = { "classpath:META-INF/your-spring-context.xml" })
More details
@RunWith( SpringJUnit4ClassRunner.class )
@ContextConfiguration(locations = { "classpath:META-INF/your-spring-context.xml" })
public class UserServiceTest extends AbstractJUnit4SpringContextTests {}
Reference:Thanks to @Xstian