Restrict the dependencies for spring-test to a version prior to 4, like spring-test-3.2.
I was not aware that Spring-4 dropped support to Servlet-2.5. 3.9 Testing Improvements says:
As of Spring 4.0, the set of mocks in the org.springframework.mock.web package is now compatible with Servlet 3.0.
I don't understand that "compatible with servlet-3" means a dropped servlet-2.5 support. If it was intentionally it should at least go into the reference documentation. So it might even be worth filing a bug (SPR-11292) about it.
But wait there is 3.4 Java EE 6 and 7:
Java EE version 6 or above is now considered the baseline for Spring Framework 4, with the JPA 2.0 and Servlet 3.0 specifications being of particular relevance.[..] it is possible to deploy a Spring application into a Servlet 2.5 environment; however, Servlet 3.0+ is recommended when at all possible.
So I think that qualifies as mentioned in the documentation.
Update: The Spring 4.0.1 reference documentation is now more clear about the Mocks:
Servlet 3.0+ is strongly recommended and a prerequisite in Spring's test and mock packages for test setups in development environments.