### Question:
InsidePaymentController { @PostMapping(value = "/inside_payment/account") public HttpEntity createAccount(@RequestBody AccountInfo info, @RequestHeader HttpHeaders headers) { return ok(service.createAccount(info, headers)); }  @GetMapping(path = "/welcome") String home(); @PostMapping(value = "/inside_payment") HttpEntity pay(@RequestBody PaymentInfo info, @RequestHeader HttpHeaders headers); @PostMapping(value = "/inside_payment/account") HttpEntity createAccount(@RequestBody AccountInfo info, @RequestHeader HttpHeaders headers); @GetMapping(value = "/inside_payment/{userId}/{money}") HttpEntity addMoney(@PathVariable String userId, @PathVariable
            String money, @RequestHeader HttpHeaders headers); @GetMapping(value = "/inside_payment/payment") HttpEntity queryPayment(@RequestHeader HttpHeaders headers); @GetMapping(value = "/inside_payment/account") HttpEntity queryAccount(@RequestHeader HttpHeaders headers); @GetMapping(value = "/inside_payment/drawback/{userId}/{money}") HttpEntity drawBack(@PathVariable String userId, @PathVariable String money, @RequestHeader HttpHeaders headers); @PostMapping(value = "/inside_payment/difference") HttpEntity payDifference(@RequestBody PaymentInfo info, @RequestHeader HttpHeaders headers); @GetMapping(value = "/inside_payment/money") HttpEntity queryAddMoney(@RequestHeader HttpHeaders headers); @Autowired
    public InsidePaymentService service; }### Answer:
@Test public void testCreateAccount() throws Exception { AccountInfo info = new AccountInfo(); Mockito.when(service.createAccount(Mockito.any(AccountInfo.class), Mockito.any(HttpHeaders.class))).thenReturn(response); String requestJson = JSONObject.toJSONString(info); String result = mockMvc.perform(MockMvcRequestBuilders.post("/api/v1/inside_pay_service/inside_payment/account").contentType(MediaType.APPLICATION_JSON).content(requestJson)) .andExpect(MockMvcResultMatchers.status().isOk()) .andReturn().getResponse().getContentAsString(); Assert.assertEquals(response, JSONObject.parseObject(result, Response.class)); }