You need spring-test.jar
Works on the idea of Test Context, which is an application context prepared to run only tests.
Use @ContextConfiguration to create this application context. You can then pass configuration files (classes or xml) that will be used to create this context.