@Test void testDeleteAllStream() { Object roleId = mock(Role.class); roleRepositoryDecorator.deleteAll(Stream.of(roleId)); verify(cachedRoleHierarchy).markRoleHierarchyCacheDirty(); @SuppressWarnings("unchecked") ArgumentCaptor<Stream<Object>> roleStreamCaptor = ArgumentCaptor.forClass(Stream.class); verify(delegateRepository).deleteAll(roleStreamCaptor.capture()); assertEquals(roleStreamCaptor.getValue().collect(toList()), singletonList(roleId)); }
@Override public void deleteAll() { clearRoleHierarchyCache(); super.deleteAll(); }
RoleRepositoryDecorator extends AbstractRepositoryDecorator<Role> { @Override public void deleteAll() { clearRoleHierarchyCache(); super.deleteAll(); } }
RoleRepositoryDecorator extends AbstractRepositoryDecorator<Role> { @Override public void deleteAll() { clearRoleHierarchyCache(); super.deleteAll(); } RoleRepositoryDecorator(
      Repository<Role> delegateRepository, CachedRoleHierarchy cachedRoleHierarchy); }
RoleRepositoryDecorator extends AbstractRepositoryDecorator<Role> { @Override public void deleteAll() { clearRoleHierarchyCache(); super.deleteAll(); } RoleRepositoryDecorator(
      Repository<Role> delegateRepository, CachedRoleHierarchy cachedRoleHierarchy); @Override void add(Role role); @Override Integer add(Stream<Role> roleStream); @Override void update(Role role); @Override void update(Stream<Role> roleStream); @Override void deleteAll(); @Override void deleteById(Object id); @Override void deleteAll(Stream<Object> ids); @Override void delete(Role role); @Override void delete(Stream<Role> roleStream); }
RoleRepositoryDecorator extends AbstractRepositoryDecorator<Role> { @Override public void deleteAll() { clearRoleHierarchyCache(); super.deleteAll(); } RoleRepositoryDecorator(
      Repository<Role> delegateRepository, CachedRoleHierarchy cachedRoleHierarchy); @Override void add(Role role); @Override Integer add(Stream<Role> roleStream); @Override void update(Role role); @Override void update(Stream<Role> roleStream); @Override void deleteAll(); @Override void deleteById(Object id); @Override void deleteAll(Stream<Object> ids); @Override void delete(Role role); @Override void delete(Stream<Role> roleStream);  }