MembersRemovedEventPropagator { public void runEventChain() { Set<GroupMember> parents = group.getParents(); for(GroupMember gm: parents) { recurseUp(gm.getParent(), true); } for(Schedule schedule : group.getSchedules()) { ancestorScheduleOids.add(schedule.getOid()); } for(AbstractTarget removedTarget: removedTargets) { recurseDown(removedTarget); } } MembersRemovedEventPropagator(TargetManager targetManager, TargetInstanceManager instanceManager, TargetGroup parent, List<AbstractTarget> members);  MembersRemovedEventPropagator(TargetManager targetManager, TargetInstanceManager instanceManager, TargetGroup parent, AbstractTarget item); void runEventChain(); Map<User, Set<TargetGroup>> getUpdatedGroups();  }
@Test public final void testRunEventChain() { TargetGroup parentGroup = targetManager.loadGroup(15001L); TargetGroup childGroup = targetManager.loadGroup(15000L); try { testInstance = new MembersRemovedEventPropagator(targetManager, instanceManager, parentGroup, childGroup); TargetInstance ti = instanceManager.getTargetInstance(5003L); assertTrue(ti != null); testInstance.runEventChain(); ti = instanceManager.getTargetInstance(5003L); assertTrue(ti == null); } catch(Exception e) { fail(e.getMessage()); } }