title: WIthMockUser doesn't work
body: <p>I can't use @WithMockUser, no matter what I do it doesn't provide authorized user in spring test. Maybe it's because its resource server but..</p>
  
  <p>Config:</p>
  
  <pre><code>@Configuration
  @EnableResourceServer
  class ResourceServerConfig extends ResourceServerConfigurerAdapter 
  ...
      @Override
      public void configure(HttpSecurity http) throws Exception {
      http
              .anonymous().and().authorizeRequests().antMatchers("/**").hasRole("USER");
  }
  ...
  }
  </code></pre>
  
  <p>And test class</p>
  
  <pre><code>@BeforeClass
  public void setup(){
      mockMvc = MockMvcBuilders
                  .webAppContextSetup(wac)
                  .apply(springSecurity())
                  .build();
  }
  
  
  @Test
  @WithMockUser()
  public void shouldAddValueToStore() throws Exception {
  ResultActions response = mockMvc.perform(post("/bucket/key")
              .content("value"));
  ...
  }
  </code></pre>
  
  <p>I keep getting 401 <code>Access is denied (user is anonymous); redirecting to authentication entry point</code>. I've tried with setting usernames, roles in annotation parameters, passing <code>with(user..)</code> to mockMvc, nothing helps. It's spring security 4.0.4.RELEASE.</p>