@Test void deleteAbstract() { when(entityType1.isAbstract()).thenReturn(true); Attribute attr0 = mock(Attribute.class); when(entityType1.getOwnAttributes()).thenReturn(singletonList(attr0)); repo.delete(entityType1); verify(delegateRepository).delete(entityType1); verify(repositoryCollection, times(0)).deleteRepository(entityType1); @SuppressWarnings("unchecked") ArgumentCaptor<Stream<Attribute>> attrCaptor = ArgumentCaptor.forClass(Stream.class); verify(dataService).delete(eq(ATTRIBUTE_META_DATA), attrCaptor.capture()); assertEquals(singletonList(attr0), attrCaptor.getValue().collect(toList())); }
@Override public void delete(EntityType entity) { deleteEntityType(entity); }
EntityTypeRepositoryDecorator extends AbstractRepositoryDecorator<EntityType> { @Override public void delete(EntityType entity) { deleteEntityType(entity); } }
EntityTypeRepositoryDecorator extends AbstractRepositoryDecorator<EntityType> { @Override public void delete(EntityType entity) { deleteEntityType(entity); } EntityTypeRepositoryDecorator(
      Repository<EntityType> delegateRepository,
      DataService dataService,
      EntityTypeDependencyResolver entityTypeDependencyResolver); }
EntityTypeRepositoryDecorator extends AbstractRepositoryDecorator<EntityType> { @Override public void delete(EntityType entity) { deleteEntityType(entity); } EntityTypeRepositoryDecorator(
      Repository<EntityType> delegateRepository,
      DataService dataService,
      EntityTypeDependencyResolver entityTypeDependencyResolver); @Override void update(EntityType entity); @Override void update(Stream<EntityType> entities); @Override void delete(EntityType entity); @Override void delete(Stream<EntityType> entities); @Override void deleteById(Object id); @Override void deleteAll(Stream<Object> ids); @Override void deleteAll(); @Override void add(EntityType entity); @Override Integer add(Stream<EntityType> entities); }
EntityTypeRepositoryDecorator extends AbstractRepositoryDecorator<EntityType> { @Override public void delete(EntityType entity) { deleteEntityType(entity); } EntityTypeRepositoryDecorator(
      Repository<EntityType> delegateRepository,
      DataService dataService,
      EntityTypeDependencyResolver entityTypeDependencyResolver); @Override void update(EntityType entity); @Override void update(Stream<EntityType> entities); @Override void delete(EntityType entity); @Override void delete(Stream<EntityType> entities); @Override void deleteById(Object id); @Override void deleteAll(Stream<Object> ids); @Override void deleteAll(); @Override void add(EntityType entity); @Override Integer add(Stream<EntityType> entities);  }