@Test
public void testUpdate() throws Exception {

    String id = "{}";
    User user = new User();
    String content = objectMapper.writeValueAsString(user);
    String result = mockMvc.perform(put("/sys/user/" + id)
            .header(HttpHeaders.AUTHORIZATION, String.join(" ", accessToken.getTokenType(), accessToken.getValue()))
            .content(content) // @RequestBody 解析
            .contentType(MediaType.APPLICATION_JSON_UTF8)
            .accept(MediaType.APPLICATION_JSON_UTF8)) // 响应类型
            .andExpect(status().isOk())
            .andExpect(jsonPath("$.data.id").isNotEmpty())
            .andReturn().getResponse().getContentAsString();
    log.info("{}",result);
}