Program: 37627
Project: 37627
Buggy source:
@Test public void testParentProxyReassignmentUponProxyTaskGroupActivation(){
  final LinkedList<String> group1Items=new LinkedList<>();
  final TaskGroup group1=createSampleTaskGroup("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",group1Items);
  final List<String> group2Items=new ArrayList<>();
  final TaskGroup group2=createSampleTaskGroup("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",group2Items);
  group2.addDependencyTaskGroup(group1);
  Assert.assertEquals(1,group1.parentDAGs.size());
  Assert.assertTrue(group1.parentDAGs.contains(group2));
  final LinkedList<String> group3Items=new LinkedList<>();
  final TaskGroup group3=createSampleTaskGroup("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",group3Items);
  group1.addPostRunDependentTaskGroup(group3);
  Assert.assertEquals(2,group1.parentDAGs.size());
  Assert.assertTrue(group1.parentDAGs.contains(group3));
  Assert.assertTrue(group1.parentDAGs.contains(group1.proxyTaskGroupWrapper.proxyTaskGroup()));
  Assert.assertEquals(1,group1.proxyTaskGroupWrapper.proxyTaskGroup().parentDAGs.size());
  Assert.assertTrue(group1.proxyTaskGroupWrapper.proxyTaskGroup().parentDAGs.contains(group2));
  final LinkedList<String> group4Items=new LinkedList<>();
  final TaskGroup group4=createSampleTaskGroup("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",group4Items);
  final LinkedList<String> group5Items=new LinkedList<>();
  final TaskGroup group5=createSampleTaskGroup("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",group5Items);
  group4.addPostRunDependentTaskGroup(group5);
  group1.addPostRunDependentTaskGroup(group4);
  Map<String,Set<String>> shouldNotSee=new HashMap<>();
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str"}));
  Set<String> seen=new HashSet<>();
  TaskGroup group1Proxy=group1.proxyTaskGroupWrapper.proxyTaskGroup();
  group1Proxy.prepareForEnumeration();
  for (TaskGroupEntry<TaskItem> entry=group1Proxy.getNext(); entry != null; entry=group1Proxy.getNext()) {
    Assert.assertTrue(shouldNotSee.containsKey(entry.key()));
    Assert.assertFalse(seen.contains(entry.key()));
    Sets.SetView<String> common=Sets.intersection(shouldNotSee.get(entry.key()),seen);
    if (common.size() > 0) {
      Assert.assertTrue("String_Node_Str" + common + "String_Node_Str"+ entry.key(),false);
    }
    seen.add(entry.key());
    group1Proxy.reportCompletion(entry);
  }
  Assert.assertEquals(26,seen.size());
  Set<String> expectedToSee=new HashSet<>();
  expectedToSee.addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  Sets.SetView<String> diff=Sets.difference(seen,expectedToSee);
  Assert.assertEquals(0,diff.size());
  seen.clear();
  TaskGroup group4Proxy=group4.proxyTaskGroupWrapper.proxyTaskGroup();
  group4Proxy.prepareForEnumeration();
  for (TaskGroupEntry<TaskItem> entry=group4Proxy.getNext(); entry != null; entry=group4Proxy.getNext()) {
    Assert.assertTrue(shouldNotSee.containsKey(entry.key()));
    Assert.assertFalse(seen.contains(entry.key()));
    Sets.SetView<String> common=Sets.intersection(shouldNotSee.get(entry.key()),seen);
    if (common.size() > 0) {
      Assert.assertTrue("String_Node_Str" + common + "String_Node_Str"+ entry.key(),false);
    }
    seen.add(entry.key());
    group4Proxy.reportCompletion(entry);
  }
  Assert.assertEquals(19,seen.size());
  expectedToSee.clear();
  expectedToSee.addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  diff=Sets.difference(seen,expectedToSee);
  Assert.assertEquals(0,diff.size());
  seen.clear();
  group2.prepareForEnumeration();
  for (TaskGroupEntry<TaskItem> entry=group2.getNext(); entry != null; entry=group2.getNext()) {
    Assert.assertTrue(shouldNotSee.containsKey(entry.key()));
    Assert.assertFalse(seen.contains(entry.key()));
    Sets.SetView<String> common=Sets.intersection(shouldNotSee.get(entry.key()),seen);
    if (common.size() > 0) {
      Assert.assertTrue("String_Node_Str" + common + "String_Node_Str"+ entry.key(),false);
    }
    seen.add(entry.key());
    group2.reportCompletion(entry);
  }
  expectedToSee.clear();
  expectedToSee.addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  diff=Sets.difference(seen,expectedToSee);
  Assert.assertEquals(0,diff.size());
}

Fixed version (ground truth):
@Test public void testParentProxyReassignmentUponProxyTaskGroupActivation(){
  final LinkedList<String> group1Items=new LinkedList<>();
  final TaskGroup group1=createSampleTaskGroup("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",group1Items);
  final List<String> group2Items=new ArrayList<>();
  final TaskGroup group2=createSampleTaskGroup("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",group2Items);
  group2.addDependencyTaskGroup(group1);
  Assert.assertEquals(1,group1.parentDAGs.size());
  Assert.assertTrue(group1.parentDAGs.contains(group2));
  final LinkedList<String> group3Items=new LinkedList<>();
  final TaskGroup group3=createSampleTaskGroup("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",group3Items);
  group1.addPostRunDependentTaskGroup(group3);
  Assert.assertEquals(2,group1.parentDAGs.size());
  Assert.assertTrue(group1.parentDAGs.contains(group3));
  Assert.assertTrue(group1.parentDAGs.contains(group1.proxyTaskGroupWrapper.taskGroup()));
  Assert.assertEquals(1,group1.proxyTaskGroupWrapper.taskGroup().parentDAGs.size());
  Assert.assertTrue(group1.proxyTaskGroupWrapper.taskGroup().parentDAGs.contains(group2));
  final LinkedList<String> group4Items=new LinkedList<>();
  final TaskGroup group4=createSampleTaskGroup("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",group4Items);
  final LinkedList<String> group5Items=new LinkedList<>();
  final TaskGroup group5=createSampleTaskGroup("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",group5Items);
  group4.addPostRunDependentTaskGroup(group5);
  group1.addPostRunDependentTaskGroup(group4);
  Map<String,Set<String>> shouldNotSee=new HashMap<>();
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str"}));
  shouldNotSee.put("String_Node_Str",new HashSet<String>());
  shouldNotSee.get("String_Node_Str").addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str"}));
  Set<String> seen=new HashSet<>();
  TaskGroup group1Proxy=group1.proxyTaskGroupWrapper.taskGroup();
  group1Proxy.prepareForEnumeration();
  for (TaskGroupEntry<TaskItem> entry=group1Proxy.getNext(); entry != null; entry=group1Proxy.getNext()) {
    Assert.assertTrue(shouldNotSee.containsKey(entry.key()));
    Assert.assertFalse(seen.contains(entry.key()));
    Sets.SetView<String> common=Sets.intersection(shouldNotSee.get(entry.key()),seen);
    if (common.size() > 0) {
      Assert.assertTrue("String_Node_Str" + common + "String_Node_Str"+ entry.key(),false);
    }
    seen.add(entry.key());
    group1Proxy.reportCompletion(entry);
  }
  Assert.assertEquals(26,seen.size());
  Set<String> expectedToSee=new HashSet<>();
  expectedToSee.addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  Sets.SetView<String> diff=Sets.difference(seen,expectedToSee);
  Assert.assertEquals(0,diff.size());
  seen.clear();
  TaskGroup group4Proxy=group4.proxyTaskGroupWrapper.taskGroup();
  group4Proxy.prepareForEnumeration();
  for (TaskGroupEntry<TaskItem> entry=group4Proxy.getNext(); entry != null; entry=group4Proxy.getNext()) {
    Assert.assertTrue(shouldNotSee.containsKey(entry.key()));
    Assert.assertFalse(seen.contains(entry.key()));
    Sets.SetView<String> common=Sets.intersection(shouldNotSee.get(entry.key()),seen);
    if (common.size() > 0) {
      Assert.assertTrue("String_Node_Str" + common + "String_Node_Str"+ entry.key(),false);
    }
    seen.add(entry.key());
    group4Proxy.reportCompletion(entry);
  }
  Assert.assertEquals(19,seen.size());
  expectedToSee.clear();
  expectedToSee.addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  diff=Sets.difference(seen,expectedToSee);
  Assert.assertEquals(0,diff.size());
  seen.clear();
  group2.prepareForEnumeration();
  for (TaskGroupEntry<TaskItem> entry=group2.getNext(); entry != null; entry=group2.getNext()) {
    Assert.assertTrue(shouldNotSee.containsKey(entry.key()));
    Assert.assertFalse(seen.contains(entry.key()));
    Sets.SetView<String> common=Sets.intersection(shouldNotSee.get(entry.key()),seen);
    if (common.size() > 0) {
      Assert.assertTrue("String_Node_Str" + common + "String_Node_Str"+ entry.key(),false);
    }
    seen.add(entry.key());
    group2.reportCompletion(entry);
  }
  expectedToSee.clear();
  expectedToSee.addAll(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}));
  diff=Sets.difference(seen,expectedToSee);
  Assert.assertEquals(0,diff.size());
}