@Test
public void testCreateRedo() {

    MockHttpServletRequestBuilder postRequest = MockMvcRequestBuilders.post(
            "/customers/create").param("redo", "");
    // Set form to the request to simulate correct back button behaviour
    // Since the control will be on confirmation screen, form values may be different from the default
    // Prepare form and set to POST request
    CustomerForm form = prepareNewForm();
    setFormForPost(form, postRequest);
    try {
        ResultActions results = mockMvc.perform(postRequest);
        results.andExpect(status().isOk());
        results.andExpect(view().name("managecustomer/createForm"));
        // TODO Ideally this should work but somehow not working !!!
        // This will reduce the effort of checking the form for each property
        // results.andExpect(model().attribute("customerForm", form));
        CustomerForm backForm = (CustomerForm) results.andReturn()
                .getRequest().getAttribute("customerForm");
        assertEquals(form.toString(), backForm.toString());
        return;
    } catch (Exception e) {
        e.printStackTrace();
    }
    fail(); // FAIL when exception is thrown
}