@Test
public void testPostByJson() throws Exception{

    mockMvc.perform(post("/mock/postByJson")
            .param("method", "getPost")
            .content(objectMapper.writeValueAsString(new Role(2, "ROLE_USER"))).contentType(MediaType.APPLICATION_JSON))
            .andExpect(status().is(200))
            .andExpect(content().string("success"));
}