package hello.controllers;

import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.MediaType;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;

import hello.configuration.Application;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = Application.class)
@AutoConfigureMockMvc
public class RootControllerTest {

	@Autowired
	private MockMvc mvc;

	@Test
	public void getRoot() throws Exception {
		mvc.perform(MockMvcRequestBuilders.get("/").accept(MediaType.TEXT_HTML)).andExpect(status().isOk());
	}

}

@@ -972,10 +972,188 @@
 ));%0A%09%7D%0A%0A
+%09@Test%0A%09public void getJsonRoot() throws Exception %7B%0A%09%09mvc.perform(MockMvcRequestBuilders.get(%22/%22).accept(MediaType.APPLICATION_JSON))%0A%09%09%09%09.andExpect(status().isNotFound());%0A%09%7D%0A%0A
 %7D%0A

Add a test to show JSON at the root.