### Question:
IpController { @GetMapping("/test") public String getIpAddress(@ClientIp String clientIp) { return String.format("ip address : %s", clientIp); }  @GetMapping("/test") String getIpAddress(@ClientIp String clientIp);  }### Answer:
@Test void getIpAddress() throws Exception { this.mockMvc.perform(get("/test")) .andDo(print()) .andExpect(status().isOk()) .andExpect(jsonPath("$", is("ip address : 127.0.0.1"))); }