@Test void delete() { String backend = "backend"; when(entityType1.getBackend()).thenReturn(backend); when(dataService.getMeta()).thenReturn(metaDataService); when(metaDataService.getBackend(backend)).thenReturn(repositoryCollection); Attribute attr0 = mock(Attribute.class); Attribute attr1 = mock(Attribute.class); when(entityType1.getOwnAttributes()).thenReturn(newArrayList(attr0, attr1)); repo.delete(entityType1); verify(delegateRepository).delete(entityType1); verify(repositoryCollection).deleteRepository(entityType1); @SuppressWarnings("unchecked") ArgumentCaptor<Stream<Attribute>> attrCaptor = ArgumentCaptor.forClass(Stream.class); verify(dataService).delete(eq(ATTRIBUTE_META_DATA), attrCaptor.capture()); assertEquals(newArrayList(attr0, attr1), 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);  }