This code can be summarized as follows:
@WithMockUser: This user has ROLE_USER.
It performs the same POST /new-video with the same values and CSRF tokens, yet we get a different set of response codes.
status().is3xxRedirection(): Verifies that we get something in the 300 series of HTTP response signals. This makes our test case less brittle if, say, someone switches from soft redirects to hard redirects in the future.
redirectedUrl("/"): Lets us verify that the redirected path is /.
https://developer.okta.com/blog/2021/05/19/spring-security-testing