3 import org.junit.jupiter.api.Test;
4 import org.springframework.beans.factory.annotation.Autowired;
5 import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
6 import org.springframework.boot.test.context.SpringBootTest;
7 import org.springframework.test.web.servlet.MockMvc;
9 import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
10 import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
15 class DemoApplicationTests {
23 void getWelcomeResponseIsOk(@Autowired MockMvc mvc) throws Exception
25 mvc.perform(get("/")).andExpect(status().isOk());