assertTrue(anonC.contains(_id1));
assertTrue(_id1.getLocations().contains(anonC));
assertTrue(((YTask) _netRunner1._net.getNetElement("b-top")).t_enabled(null));
assertTrue(_netRunner1.isAlive());
assertTrue("" + _id1.getLocations(), _netRunner1.getEnabledTasks().size() == 1);
YAtomicTask btop = (YAtomicTask) _netRunner1.getNetElement("b-top");
List btopChildren = null;
try {
btopChildren = _netRunner1.attemptToFireAtomicTask(null, "b-top");
} catch (YDataStateException e) {
e.printStackTrace();
fail();
}
int i = 0;
for (; i < btopChildren.size() && i < btop.getMultiInstanceAttributes().getThreshold();
i++) {
_netRunner1.startWorkItemInTask(null, (YIdentifier) btopChildren.get(i), "b-top");
if (i + 1 == btopChildren.size() || i + 1 == btop.getMultiInstanceAttributes().getThreshold()) {
assertTrue(_netRunner1.completeWorkItemInTask(null, null, (YIdentifier) btopChildren.get(i), "b-top", _d));
} else {
assertFalse(_netRunner1.completeWorkItemInTask(null, null, (YIdentifier) btopChildren.get(i), "b-top", _d));
//System.out.println("i " + i + " childrensize " + btopChildren.size());
}