@Test
  public void addsRepositoryForEntityIfAvailableInAppContext() throws Exception {

    registrar.setApplicationContext(context);
    registrar.registerCustomEditors(registry);

    verify(registry).registerCustomEditor(eq(Entity.class), any(DomainClassPropertyEditor.class));
  }
  @Test
  public void doesNotAddDaoAtAllIfNoDaosFound() throws Exception {

    registrar.registerCustomEditors(registry);

    verify(registry, never())
        .registerCustomEditor(eq(Entity.class), any(DomainClassPropertyEditor.class));
  }