DatePropertyEditorRegistrar implements PropertyEditorRegistrar { public void setDateFormat(DateFormat dateFormat) { this.dateFormat = dateFormat; }  void setDateFormat(DateFormat dateFormat); @Override void registerCustomEditors(PropertyEditorRegistry registry);  }
@Test public void testSetDateFormat01() throws Exception { DatePropertyEditorRegistrar registrar = new DatePropertyEditorRegistrar(); DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd"); registrar.setDateFormat(dateFormat); assertSame(dateFormat, ReflectionTestUtils.getField(registrar, "dateFormat")); }