ManageCustomerController { @RequestMapping(value = "create", method = RequestMethod.GET, params = "form") public String createForm() { return "managecustomer/createForm"; }  @InitBinder("customerForm") void initBinder(WebDataBinder webDataBinder); @ModelAttribute CustomerForm setUpCustomerForm(); @RequestMapping(value = "create", method = RequestMethod.GET, params = "form") String createForm(); @RequestMapping(value = "create", method = RequestMethod.POST, params = "redo") String createRedo(CustomerForm form); @TransactionTokenCheck(value = "create", type = TransactionTokenType.BEGIN) @RequestMapping(value = "create", method = RequestMethod.POST, params = "confirm") String createConfirm(@Validated CustomerForm form,
            BindingResult result); @TransactionTokenCheck(value = "create", type = TransactionTokenType.IN) @RequestMapping(value = "create", method = RequestMethod.POST) String create(@Validated CustomerForm form, BindingResult result,
            RedirectAttributes redirectAttr); @RequestMapping(value = "create", method = RequestMethod.GET, params = "complete") String createComplete();  }
@Test public void testCreateForm() { MockHttpServletRequestBuilder getRequest = MockMvcRequestBuilders.get( "/customers/create").param("form", ""); try { ResultActions results = mockMvc.perform(getRequest); results.andExpect(status().isOk()); results.andExpect(view().name("managecustomer/createForm")); results.andExpect(model().attribute("customerForm", hasProperty( "customerBirthYear", is(2000)))); results.andExpect(model().attribute("customerForm", hasProperty( "customerBirthMonth", is(1)))); results.andExpect(model().attribute("customerForm", hasProperty( "customerBirthDay", is(1)))); return; } catch (Exception e) { e.printStackTrace(); } fail(); }