@WebFluxTest used for a Spring WebFlux test that focuses only on Spring WebFlux components. It desables full auto-configuration and instead apply only configuration relevant to WebFlux tests (i.e. @Controller, @ControllerAdvice, @JsonComponent, Converter and WebFluxConfigurer beans but NOT @Component, @Service or @Repository beans). @WebFluxTest will auto-configures WebTestClient to quickly test WebFlux controllers without starting a full HTTP server.
@MockBean used to add mock objects to the Spring application context. The mock will replace any existing bean of the same type in the application context.
@MockUser annotation to test spring security with mock user at server side. The attributes of this annotation are given below.
username: Assign any username, not necessary that user exits. Default is user.
roles: Assign the role to test. Default is USER. ROLE_ is automatically added.
password: Assign any password to test. Default is password.