@Test
public void testSearchForm() {

    MockHttpServletRequestBuilder getRequest = MockMvcRequestBuilders.get(
            "/tours").param("form", "");
    try {
        ResultActions results = mockMvc.perform(getRequest);
        results.andExpect(status().isOk());
        results.andExpect(view().name("searchtour/searchForm"));
        // Check the default data set in setupForm method
        // this will test the @ModelAttribute annotation
        DateTime dateTime = dateFactory.newDateTime();
        DateTime nextWeekDate = dateTime.plusWeeks(1);
        results.andExpect(model().attribute("searchTourForm", hasProperty(
                "depYear", is(nextWeekDate.getYear()))));
        results.andExpect(model().attribute("searchTourForm", hasProperty(
                "depMonth", is(nextWeekDate.getMonthOfYear()))));
        results.andExpect(model().attribute("searchTourForm", hasProperty(
                "depDay", is(nextWeekDate.getDayOfMonth()))));
        return;
    } catch (Exception e) {
        e.printStackTrace();
    }
    fail(); // FAIL when exception is thrown
}