@Test void testDeleteAll() { Plugin plugin0 = when(mock(Plugin.class).getId()).thenReturn("plugin0").getMock(); Plugin plugin1 = when(mock(Plugin.class).getId()).thenReturn("plugin1").getMock(); when(delegateRepository.iterator()).thenReturn(Stream.of(plugin0, plugin1).iterator()); pluginSecurityRepositoryDecorator.deleteAll(); verify(delegateRepository).deleteAll(); verify(mutableAclService).deleteAcl(new PluginIdentity("plugin0"), true); verify(mutableAclService).deleteAcl(new PluginIdentity("plugin1"), true); }
@Override public void deleteAll() { iterator().forEachRemaining(this::deleteAcl); super.deleteAll(); }
PluginSecurityRepositoryDecorator extends AbstractRepositoryDecorator<Plugin> { @Override public void deleteAll() { iterator().forEachRemaining(this::deleteAcl); super.deleteAll(); } }
PluginSecurityRepositoryDecorator extends AbstractRepositoryDecorator<Plugin> { @Override public void deleteAll() { iterator().forEachRemaining(this::deleteAcl); super.deleteAll(); } PluginSecurityRepositoryDecorator(
      Repository<Plugin> delegateRepository, MutableAclService mutableAclService); }
PluginSecurityRepositoryDecorator extends AbstractRepositoryDecorator<Plugin> { @Override public void deleteAll() { iterator().forEachRemaining(this::deleteAcl); super.deleteAll(); } PluginSecurityRepositoryDecorator(
      Repository<Plugin> delegateRepository, MutableAclService mutableAclService); @Override void add(Plugin plugin); @Override Integer add(Stream<Plugin> pluginStream); @Override void delete(Plugin plugin); @Override void deleteById(Object pluginId); @Override void deleteAll(); @Override void delete(Stream<Plugin> pluginStream); @Override void deleteAll(Stream<Object> ids); }
PluginSecurityRepositoryDecorator extends AbstractRepositoryDecorator<Plugin> { @Override public void deleteAll() { iterator().forEachRemaining(this::deleteAcl); super.deleteAll(); } PluginSecurityRepositoryDecorator(
      Repository<Plugin> delegateRepository, MutableAclService mutableAclService); @Override void add(Plugin plugin); @Override Integer add(Stream<Plugin> pluginStream); @Override void delete(Plugin plugin); @Override void deleteById(Object pluginId); @Override void deleteAll(); @Override void delete(Stream<Plugin> pluginStream); @Override void deleteAll(Stream<Object> ids);  }