@Test void testDeleteById() { User user = mock(User.class); String roleMembershipId = "MyRoleMemberShipId"; RoleMembership roleMembership = mock(RoleMembership.class); when(roleMembership.getUser()).thenReturn(user); when(delegateRepository.findOneById(roleMembershipId)).thenReturn(roleMembership); roleMembershipDecorator.deleteById(roleMembershipId); verify(sessionSecurityContextUpdater).resetAuthorities(user); }
@Override public void deleteById(Object id) { preDeleteById(id); super.deleteById(id); }
RoleMembershipDecorator extends AbstractRepositoryDecorator<RoleMembership> { @Override public void deleteById(Object id) { preDeleteById(id); super.deleteById(id); } }
RoleMembershipDecorator extends AbstractRepositoryDecorator<RoleMembership> { @Override public void deleteById(Object id) { preDeleteById(id); super.deleteById(id); } RoleMembershipDecorator(
      Repository<RoleMembership> delegateRepository,
      RoleMembershipValidator roleMembershipValidator,
      SessionSecurityContextUpdater securityContextUpdater); }
RoleMembershipDecorator extends AbstractRepositoryDecorator<RoleMembership> { @Override public void deleteById(Object id) { preDeleteById(id); super.deleteById(id); } RoleMembershipDecorator(
      Repository<RoleMembership> delegateRepository,
      RoleMembershipValidator roleMembershipValidator,
      SessionSecurityContextUpdater securityContextUpdater); @Override void add(RoleMembership roleMembership); @Override Integer add(Stream<RoleMembership> roleMembershipStream); @Override void update(RoleMembership roleMembership); @Override void update(Stream<RoleMembership> roleMembershipStream); @Override void delete(RoleMembership roleMembership); @Override void deleteById(Object id); @Override void deleteAll(); @Override void delete(Stream<RoleMembership> roleMembershipStream); @Override void deleteAll(Stream<Object> ids); }
RoleMembershipDecorator extends AbstractRepositoryDecorator<RoleMembership> { @Override public void deleteById(Object id) { preDeleteById(id); super.deleteById(id); } RoleMembershipDecorator(
      Repository<RoleMembership> delegateRepository,
      RoleMembershipValidator roleMembershipValidator,
      SessionSecurityContextUpdater securityContextUpdater); @Override void add(RoleMembership roleMembership); @Override Integer add(Stream<RoleMembership> roleMembershipStream); @Override void update(RoleMembership roleMembership); @Override void update(Stream<RoleMembership> roleMembershipStream); @Override void delete(RoleMembership roleMembership); @Override void deleteById(Object id); @Override void deleteAll(); @Override void delete(Stream<RoleMembership> roleMembershipStream); @Override void deleteAll(Stream<Object> ids);  }