### Question:
HealthController { @ResponseBody @RequestMapping(value = "liveness", method = RequestMethod.GET) public ResponseEntity liveness() { return ResponseEntity.ok().body("OK"); } @Autowired  HealthController(PersistService persistService, ApiCommands apiCommands); @ResponseBody @RequestMapping(value = "liveness", method = RequestMethod.GET) ResponseEntity liveness(); @ResponseBody @RequestMapping(value = "readiness", method = RequestMethod.GET) ResponseEntity readiness(HttpServletRequest request);  }### Answer:
@Test public void testLiveness() throws Exception { String url = "/v1/console/health/liveness"; MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(url); Assert.assertEquals(200, mockmvc.perform(builder).andReturn().getResponse().getStatus()); }