### Question:
SeatController { @CrossOrigin(origins = "*") @PostMapping(value = "/seats/left_tickets") public HttpEntity getLeftTicketOfInterval(@RequestBody Seat seatRequest, @RequestHeader HttpHeaders headers) { return ok(seatService.getLeftTicketOfInterval(seatRequest, headers)); }  @GetMapping(path = "/welcome") String home(); @CrossOrigin(origins = "*") @PostMapping(value = "/seats") HttpEntity create(@RequestBody Seat seatRequest, @RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @PostMapping(value = "/seats/left_tickets") HttpEntity getLeftTicketOfInterval(@RequestBody Seat seatRequest, @RequestHeader HttpHeaders headers);  }### Answer:
@Test public void testGetLeftTicketOfInterval() throws Exception { Seat seatRequest = new Seat(); Mockito.when(seatService.getLeftTicketOfInterval(Mockito.any(Seat.class), Mockito.any(HttpHeaders.class))).thenReturn(response); String requestJson = JSONObject.toJSONString(seatRequest); String result = mockMvc.perform(MockMvcRequestBuilders.post("/api/v1/seatservice/seats/left_tickets").contentType(MediaType.APPLICATION_JSON).content(requestJson)) .andExpect(MockMvcResultMatchers.status().isOk()) .andReturn().getResponse().getContentAsString(); Assert.assertEquals(response, JSONObject.parseObject(result, Response.class)); }