content: package com.makao.bank.controllers;
  
  
  import org.junit.jupiter.api.Test;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
  import org.springframework.test.web.servlet.MockMvc;
  import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
  
  import static org.assertj.core.api.Assertions.assertThat;
  import static org.hamcrest.Matchers.containsString;
  import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
  import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
  
  @WebMvcTest(HomeController.class)
  class HomeControllerTest {
      @Autowired
      private MockMvc mockMvc;
  
      @Test
      void home() {
          HomeController controller = new HomeController();
  
          String html = controller.home();
  
          assertThat(html).contains("Hello, world!");
      }
  
      @Test
      void mockMvcHome() throws Exception {
          mockMvc.perform(MockMvcRequestBuilders.get("/"))
                  .andExpect(status().isOk())
                  .andExpect(content().string(
                          containsString("Hello, world!")
                  ));
      }
  }
  