This is what happens when I run my junit tests...
Another CacheManager with same name \'cacheManager\' already exists in the same VM. Please
provide unique
Your problem is the context loading optimization built in the Spring test framework. Spring (per default) does not destroy the context once the test class is done, in hope that another test class might reuse it (instead of creating it from scratch).
You can override this default using @DirtiesContext, or if you use maven you can set surefire forkMode to "always" and create a new VM per test class.