Spring MVC Test Integration
Spring Security provides comprehensive integration with Spring MVC Test
To begin using Spring Security’s MockMvc integration, you’ll first need to configure MockMvc, and then you’ll be able to use Security’s RequestPostProcessors and other MockMvc test support.