ChangePasswordController extends AbstractFormController { @Override public void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception { NumberFormat nf = NumberFormat.getInstance(request.getLocale()); binder.registerCustomEditor(java.lang.Long.class, new CustomNumberEditor(java.lang.Long.class, nf, true)); } ChangePasswordController(); @Override void initBinder(HttpServletRequest request, ServletRequestDataBinder binder); void setEncoder(PasswordEncoder encoder); void setSalt(SystemWideSaltSource salt); void setAgencyUserManager(AgencyUserManager agencyUserManager); void setMessageSource(MessageSource messageSource); void setAuthorityManager(AuthorityManager authorityManager);  }
@Test public final void testInitBinder() { MockHttpServletRequest request = new MockHttpServletRequest(); ServletRequestDataBinder binder = new ServletRequestDataBinder(new CreateUserCommand(), "command"); try { testInstance.initBinder(request, binder); } catch (Exception e) { String message = e.getClass().toString() + " - " + e.getMessage(); log.debug(message); fail(message); } }