### Question:
HealthController { @GetMapping("/liveness") public ResponseEntity liveness() { return ResponseEntity.ok().body("OK"); } @Autowired  HealthController(PersistService persistService, OperatorController apiCommands); @GetMapping("/liveness") ResponseEntity liveness(); @GetMapping("/readiness") 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()); }