@Test
public void testManageReservationUpdateSuccess() {

    // Prepare post request
    MockHttpServletRequestBuilder postRequest = MockMvcRequestBuilders.post(
            "/reservations/123/update");
    // Set mock behavior for helper method
    when(reserveService.update(any(ReservationUpdateInput.class)))
            .thenReturn(new ReservationUpdateOutput());
    // Set form data to pass @Validated check
    postRequest.param("reserveNo", "123");
    postRequest.param("adultCount", "1");
    postRequest.param("childCount", "2");
    try {
        ResultActions results = mockMvc.perform(postRequest);
        // check redirect success
        results.andExpect(status().isFound());
        results.andExpect(view().name(
                "redirect:/reservations/{reserveNo}/update?complete"));
        results.andExpect(flash().attribute("output", notNullValue()));
        return;
    } catch (Exception e) {
        e.printStackTrace();
    }
    fail(); // FAIL when exception is thrown
}