@Test
public void postUser() throws Exception {

    User user = createUser();
    assertNotNull(user);
    MultiValueMap parameters = new LinkedMultiValueMap<String, String>();
    Map<String, String> maps = objectMapper.convertValue(user, new TypeReference<Map<String, String>>() {
    });
    parameters.setAll(maps);
    mockMvc.perform(post("/users/create").params(parameters))
            .andDo(print())
            .andExpect(status().is(HttpServletResponse.SC_FOUND))
            .andDo(print())
            .andExpect(view().name("redirect:/users/"))
            .andDo(print())
            .andReturn();
}