### Question:
RootController { @RequestMapping(value = {"/"}, method = RequestMethod.GET) public String rootRedirect() { return "index"; }  @RequestMapping(value = {"/"}, method = RequestMethod.GET) String rootRedirect();  }### Answer:
@Test public void rootRedirect() throws Exception { ResponseEntity<String> result = restTemplate.exchange("/", HttpMethod.GET, new HttpEntity(null), String.class); logger.info(result.toString()); assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK); }