In order to use Spring Security with Spring MVC Test it is necessary to add the Spring Security `FilterChainProxy` as a `Filter`.
It is also necessary to add Spring Security's `TestSecurityContextHolderPostProcessor` to support xref:servlet/test/mockmvc/setup.adoc#test-mockmvc-withmockuser[Running as a User in Spring MVC Test with Annotations].
This can be done using Spring Security's `SecurityMockMvcConfigurers.springSecurity()`.
For example:
NOTE: Spring Security's testing support requires spring-test-4.1.3.RELEASE or greater.