Mockmvc Set Authorization Header, Use a valid JWT token that your Spring Security configuration accepts.