DefaultController { @GetMapping("/login") public Mono<Map> login() { return Mono.just(Map.of("greet", "Welcome Guest, its Basic Authentication")); }  @GetMapping("/") Mono<Map> guestHome(); @GetMapping("/login") Mono<Map> login();  }
@Test public void login() { webTestClient .get() .uri("/login") .exchange() .expectStatus().isOk() .expectBody().json("{\"greet\":\"Welcome Guest, its Basic Authentication\"}"); }