AgencyController extends AbstractFormController { @Override protected ModelAndView showForm(HttpServletRequest aReq, HttpServletResponse aRes, BindException aError) throws Exception { return populateAgencyList(); } AgencyController(); @Override void initBinder(HttpServletRequest request, ServletRequestDataBinder binder); void setAgencyUserManager(AgencyUserManager agencyUserManager); void setMessageSource(MessageSource messageSource); void setTypeList(WCTTreeSet typeList);  }
@Test public final void testShowForm() { try { MockHttpServletRequest request = new MockHttpServletRequest(); MockHttpServletResponse response = new MockHttpServletResponse(); BindException aError = new BindException(new AgencyCommand(), AgencyCommand.ACTION_EDIT); AgencyUserManager manager = new MockAgencyUserManagerImpl(testFile); testInstance.setAgencyUserManager(manager); testInstance.showForm(request, response, aError); } catch (Exception e) { String message = e.getClass().toString() + " - " + e.getMessage(); log.debug(message); fail(message); } }