Let's say we have the following piece of the web security configuration:
http
.and().formLogin()
.loginProcessingUrl("/api/authentication")
.successHandler(authenticationSuccessHandler)
.failureHandler(authenticationFailureHandler)
.usernameParameter("j_username")
.passwordParameter("j_password")
.permitAll()
How should I pass the authentication process using the TestRestTemplate in my integration tests?