@Test void testUpdateRoleStream() { Role role = mock(Role.class); roleRepositoryDecorator.update(Stream.of(role)); verify(cachedRoleHierarchy).markRoleHierarchyCacheDirty(); @SuppressWarnings("unchecked") ArgumentCaptor<Stream<Role>> roleStreamCaptor = ArgumentCaptor.forClass(Stream.class); verify(delegateRepository).update(roleStreamCaptor.capture()); assertEquals(roleStreamCaptor.getValue().collect(toList()), singletonList(role)); }
@Override public void update(Role role) { validateInclusion(role); clearRoleHierarchyCache(); super.update(role); }
RoleRepositoryDecorator extends AbstractRepositoryDecorator<Role> { @Override public void update(Role role) { validateInclusion(role); clearRoleHierarchyCache(); super.update(role); } }
RoleRepositoryDecorator extends AbstractRepositoryDecorator<Role> { @Override public void update(Role role) { validateInclusion(role); clearRoleHierarchyCache(); super.update(role); } RoleRepositoryDecorator(
      Repository<Role> delegateRepository, CachedRoleHierarchy cachedRoleHierarchy); }
RoleRepositoryDecorator extends AbstractRepositoryDecorator<Role> { @Override public void update(Role role) { validateInclusion(role); clearRoleHierarchyCache(); super.update(role); } 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 update(Role role) { validateInclusion(role); clearRoleHierarchyCache(); super.update(role); } 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);  }