@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"));
        // Also check the default data set in setupForm method
        // this will test the @ModelAttribute annotation
        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(); // FAIL when exception is thrown
}