how to test with SecurityMockMvcRequest for locked accounts?

My user implements the UserDetails interface and after 5 tries I lock its account.The login form works as expected

enter image description here

How would you test with SecurityMockMvcRequest if user’s account is locked or not ?
The code below would seem reasonable

  this.mvc.perform(formLogin().user(username).password(password))
            .andExpect(status().isLocked());

but it fails so I write

this.mvc.perform(formLogin().user(username).password(password))
        .andExpect(unauthenticated());

and this passes the test but I would need to see the server to return that the account is locked. Must I return a special error code ?